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