Hi,
I've been working on this for a few hours, I hope you can help.
I am using XSLT 1.0
Take the following XML:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<manual>
<gin>
<ginwp/>
</gin>
<sin>
<sinwp/>
<sinwp/>
</sin>
<fin>
<finwp/>
</fin>
</manual>
</root>
How would I get the position of the following elements in relation to its grandparent <manual>.
<ginwp/>
<sinwp/>
<sinwp/>
<finwp/>
Desired output would be:
1 <ginwp/>
2 <sinwp/>
3 <sinwp/>
4 <finwp/>
I've tried:
<xsl:number level="any" count="child::*" from="/root/manual"/>
But this returns a count of all descendants. e.g. (4567).
Thanks for the help,
Bones