W
wabr7030
I have two xml file
1) xml source:
<Indici>
<F1>xxx</F1>
<F2>yyy</F2>
</Indici>
2) File colsDef.xml:
<Columns>
<Column>
<evento>F1</evento>
</Column>
</columns>
I want to take text of node where node name is defined in file colsDef.xml
I use this xsl:
<xsl:variable name="doc" select="document('colsDef.xml')"/>
<table>
<xsl:for-each select="Indici">
<tr>
<xsl:variable name="nodo" select="."/>
<xsl:for-each select="$doc/Columns/Column">
<td>
<xsl:variable name="evento" select="evento"/>
<!--HERE IS THE PROBLEM -->
<xsl:value-of select="$nodo[name()=$evento]"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
Can anyone help me?
Thank you
1) xml source:
<Indici>
<F1>xxx</F1>
<F2>yyy</F2>
</Indici>
2) File colsDef.xml:
<Columns>
<Column>
<evento>F1</evento>
</Column>
</columns>
I want to take text of node where node name is defined in file colsDef.xml
I use this xsl:
<xsl:variable name="doc" select="document('colsDef.xml')"/>
<table>
<xsl:for-each select="Indici">
<tr>
<xsl:variable name="nodo" select="."/>
<xsl:for-each select="$doc/Columns/Column">
<td>
<xsl:variable name="evento" select="evento"/>
<!--HERE IS THE PROBLEM -->
<xsl:value-of select="$nodo[name()=$evento]"/>
</td>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
Can anyone help me?
Thank you