Hi All
I have a sequence of tags, some repeating, in no particular order
<parenttag>
<othertag/>
<tag attrib="1"/>
<tag attrib="2"/>
<tag attrib="2"/>
<tag attrib="3"/>
<tag attrib="4"/>
<tag attrib="4"/>
<tag attrib="5"/>
<tag attrib="2"/>
<tag attrib="5"/>
<tag attrib="5"/>
<tag attrib="6"/>
</parenttag>
I need to loop through all repeated tags (with the same attrib number) and add a number reference to the attrib value.
e.g.
<parenttag>
<othertag/>
<tag attrib="1"/>
<tag attrib="2"/> => <tag attrib="2[1]"/>
<tag attrib="2"/> => <tag attrib="2[2]"/>
<tag attrib="3"/>
<tag attrib="4"/>
<tag attrib="4"/>
<tag attrib="5"/>
<tag attrib="2"/> => <tag attrib="2[3]"/>
<tag attrib="5"/>
<tag attrib="5"/>
<tag attrib="6"/>
</parenttag>
Furthermore, I don't know the values of the attrib's in advance so I need the rule to use the attrib values found in the document.
Thanks in advance
Edward
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|