What I'd like to do is replace linkList/link/@source with the corresponding node position (e.g. 1,2,3) from nodeList.
i.e. something like
<xsl:for-each select="linkList/link">
<link id="1">
<xsl:attribute name="source">
<xsl:value-of select="../../linkList/link[@id=@source]"/>
</xsl:attribute>
</link>
</xsl:for-each)
The above value-of gets me to the node I require but to get the node number e.g. c6 -> 1, c8 -> 2 etc.
Also @source seems to need to have the full path which then ignores the for-each (always picks the first element).