[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] assigning sequence numbers to repeated tags.
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|