Hi,
I have a recursive template so that I can update a count. In the template, I want to be able to use the current count to be able to access the node whose index is the current count.
<!-- in the template -->
<xsl:param name="i"/>
<xsl:param name="count"/>
<NewNode>
<xsl:value-of select="//ACommonElementInTheDocument[$i]/MyElement"/> : <xsl:value-of select="$i"/>
</NewNode>
I get $i printed out correctly, as expected, but I'm not able to reference the element, although this works perfectly when I use XMLSpy to test the XPath.
Could anyone point out the glaring mistake I'm making please?...
Many thanks