This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
<xsl:value-of select="/ROW[$row]/@$col"/>
- To: <xsl-list at mulberrytech dot com>
- Subject: <xsl:value-of select="/ROW[$row]/@$col"/>
- From: "Ian Sparks" <isparks at wmute dot u-net dot com>
- Date: Mon, 6 Nov 2000 14:37:02 -0000
- Reply-To: xsl-list at mulberrytech dot com
This must come up a lot, but I can't find any references to it :
A document structured like :
<LIST>
<HEADINGS>
<ITEM NAME="ONE"/>
<ITEM NAME="TWO"/>
</HEADINGS>
<ROWS>
<ROW ONE="a" TWO="b"/>
<ROW ONE="x" TWO="y"/>
</ROWS>
</LIST>
So a XSLT stylesheet (fragment) like :
<xsl:for-each select="/LIST/ROWS/ROW">
<xsl:variable name="row"><xsl:number/></xsl:variable>
<xsl:for-each select="/LIST/HEADINGS/ITEM">
<xsl:variable name="col"><xsl:value-of select="@CAPTION"/></xsl:variable>
<xsl:value-of select="/LIST/ROWS/ROW[$row]/@$col">
</xsl:for-each>
</xsl:for-each>
Is not valid so how is this best done?
- Ian Sparks.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list