Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

XSL Select Problem

This is my first attempt at making "real" modifications to an xsl stylesheet, and I'm completely stumped now. This is probably something simple, so try not to laugh too much. ;)

Here's the code I'm having trouble with:

<xsl:variable name="reportName">
<xsl:value-of select="NodeName"/>
</xsl:variable>

<xsl:value-of select="$reportName"/>

<!--Does not work-->
<xsl:value-of select="//PageXML/Document/report[name = $reportName]/regionalFlag"/>

<!--Works fine-->
<xsl:value-of select="//PageXML/Document/report[name = 'workordertime']/regionalFlag"/>

Now, I'm printing the value of $reportName every time and it IS coming up as workordertime, but for some reason it isn't selecting any value. If I hardcode the report name, however, it DOES work... so the basic XSL is right. I'm fairly sure that's how I'd use a variable to do the select, as the same technique is used in other places... I have no idea what could be causing the problem...
[1146 byte] By [Telos] at [2007-11-11 9:42:24]