RE: Variables in XPath expressions

Subject: RE: Variables in XPath expressions
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 29 Mar 2000 08:58:09 +0100
> <xsl:variable name="i">
>   <xsl:value-of select="el1/aPosition"/>
> </xsl:variable>
> 
> <xsl:value-of select="el1/*[position()={$i}]"/>
> 

Write <xsl:value-of select="el1/*[position()=$i]"/>
or <xsl:value-of select="el1/*[number($i)]"/>

You should never have curly brackets inside an XPath expression.

Mike Kay


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


Current Thread