title: Using XSLT/XML to generate styles for HTML tags? (xsl:attribute-set)
body: <p>Okay, it's been a tough hour or so... I'm having difficulties generating table cells with different widths. I'm using XML/XSLT to spit out my HTML, so basically the widths are stored in XML format:</p>
  
  <pre><code>&lt;size&gt;
  &lt;width1&gt;5&lt;/width1&gt;
  &lt;width2&gt;4&lt;/width2&gt;
  &lt;width3&gt;7&lt;/width3&gt;
  &lt;/size&gt;
  </code></pre>
  
  <p>Using XSLT's attribute-set I should have a table row and cells with 5px, 4px, 7px widths respectively. However, the trouble with this is that <code>attribute-set</code> needs to be a child of <code>&lt;xsl:stylesheet&gt;</code> for it to work. I CAN'T do this: (forgive the missing px)</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;
          &lt;xsl:attribute-set name="style"&gt;
              &lt;xsl:attribute name="width"&gt;&lt;xsl:value-of select="size/width1"/&gt;&lt;/xsl:attribute&gt;
          &lt;/xsl:attribute-set&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;xsl:attribute-set name="style"&gt;
              &lt;xsl:attribute name="width"&gt;&lt;xsl:value-of select="size/width2"/&gt;&lt;/xsl:attribute&gt;
          &lt;/xsl:attribute-set&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;xsl:attribute-set name="style"&gt;
              &lt;xsl:attribute name="width"&gt;&lt;xsl:value-of select="size/width3"/&gt;&lt;/xsl:attribute&gt;
          &lt;/xsl:attribute-set&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>Is there any way to generate html tag using XML data to style them?</p>