|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Can I use variables in location paths?
Hi,
> What I'd like to do is this (note use of variable)
>
> <xsl:variable name="Scenario">BASECASE</xsl:variable>
> <xsl:variable name="Date">20030408</xsl:variable>
>
> <xsl:for-each
> select="PositionFactorLevels/Scenario[ @Name='${Scenario}'
> ]/Factor/Data[ @Date= '${Date}' ]">
> <xsl:value-of select="../@Name"
> /> = <xsl:value-of select="." /> <br></br>
> </xsl:for-each>
@Name='${Scenario}'
Means you're testing if the Name attribute is equal to the string "${Scenario}"; see <http://www.w3.org/TR/xpath#NT-VariableReference>. Instead use
<xsl:for-each select="PositionFactorLevels/Scenario[@Name = $Scenario]/Factor/Data[@Date = $Date]">
Cheers,
Jarno - Neurotic Fish: Prostitute
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








