<xsl:value-of select="/ROW[$row]/@$col"/>

Subject: <xsl:value-of select="/ROW[$row]/@$col"/>
From: "Ian Sparks" <isparks@xxxxxxxxxxxxxxx>
Date: Mon, 6 Nov 2000 14:37:02 -0000
This must come up a lot, but I can't find any references to it :

A document structured like :

       <ITEM NAME="ONE"/>
       <ITEM NAME="TWO"/>
     <ROW ONE="a" TWO="b"/>
     <ROW ONE="x" TWO="y"/>

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">

Is not valid so how is this best done?

- Ian Sparks.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread