I'm trying to evaluate an XPath varable I'm building dynamically based on the position of the node.
I can create the XPath string in a variable but when I select the value of this just get the string and not the node set I need.
I use the following to create the XPath query.
<xsl:variable name="xpathstring"
select="normalize-space(concat("//anAttribute[@key='pos",position(),"']"))"/>
And try to output the value with the following.
<xsl:value-of select="$xpathstring"/>
If I execute the XPath query in my debugger I get the nodeset but in my XML output only get the XPath string which looks like this //anAttribute[@key='pos1']
.
I had a look at exslt dyn:evaluate
which seems to enable this but this seems to be only supported by certain processors and doesn't provide a standalone implementation or at least as far as I could see (currently using the standard .NET 2.0 XSLT which is only XSLT 1.0 as far as I recall.)
Is there any way to handle this without changing processor?