Lets say you have an xml document like
<parents>
<parent>
<element />
<element />
</parent>
<parent>
<element />
<element />
</parent>
</parents>
While processing I need to know that the elements are 1, 2, 3, 4 in the document, not that but calling position() will return 1, 2, 1, 2. Normally I would modify the xml, but, in this case, it is not possible, while I am processing parent 2, I somehow need to know that it’s first element, is really element 3.
Thanks,
-c
Use
<xsl:number>This transformation:
when applied on the provided XML document:
produces the wanted result: