Hello,
I'm trying to do a easy dynamic with an input XML. My XML code looks like:
<table>
<col size="5%">#</col>
<col size="55%">Title</col>
<col size="10%">Author</col>
<col size="10%">Date</col>
<col size="10%">Modification</col>
<col size="10%">Actions</col>
<output>
<row>1</row>
<row>Title of the entry</row>
<row>Administrator</row>
<row>dd/mm/yyyy hh:mm</row>
<row>dd/mm/yyyy hh:mm</row>
<row>Edit Delete</row>
</output>
</table>
I'm generating this because I wan't to have one XSLT for the backend panel, that transforms my output XML to a depending on the variables of the different sections.
I did this XSLT code:
<table>
<tr>
<xsl:for-each select="page/index/table/col">
<td>
<xsl:attribute name="width"><xsl:value-of select="size" /></xsl:attribute>
<xsl:value-of select="." />
</td>
</xsl:for-each>
</tr>
<xsl:for-each select="page/index/table/output">
<tr>
<xsl:for-each select="row">
<td>
<xsl:value-of select="." />
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
I generate the table, but I can't get the attribute WIDTH filled with the value of col/size.
How can I do it?
Thanks in advance, Isern