I need to transform an xml to some custom xml format.
In the new format i would have many sections node and for each node i am creating a unique id using:
<xsl:attribute name="identifier">
<xsl:variable name="uid" select="util:randomUUID()"/>A<xsl:value-of select="util:toString($uid)"/>
</xsl:attribute>
I need a way to store all of these Ids in a list or array so that i can refer it back from some other template and use them in for-each loop.
Is there a way to do this with xsl?
Thanks for any help
Have these globally declared:
Then later use:
Using XSLT 2.0: