[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Grouping siblings according to attribute sequence
same reposted with (I hope) proper indentation Hi all, I am using Saxonica\SaxonHE9.3N I have the following source xml <terms><term level="1" termid="10" > <value>ONE</value></term><term level="2" termid="8" > <value>TWO</value></term><term level="3" termid="6" > <value>THREE</value></term><!-- end of sequence = level number restart at 1 --><term level="1" termid="3" > <value>ONE BIS</value></term><term level="2" termid="1" > <value>TWO BIS</value></term><term level="3" termid="58" > <value>THREE BIS</value></term><term level="3" termid="45" > <value>THREE TER</value></term><!-- end of sequence = level number restart at 1 --><term level="1" termid="5" > <value>ONE FOURTH</value></term></terms> Sequence always start with level = 1term are in sequence levels that are always in increasing order, 1, 2, 3, etc.Last item in the sequence can be duplicated (more that twice) there can be up to 5 levels max I would like to get the following : <terms><sequence> <value>THREE/TWO/ONE</value></sequence><sequence> <value>TH REE BIS/TWO BIS/ONE BIS</value></sequence><sequence> <value>THREE TER/TWO BIS/ONE BIS</value></sequence><sequence><value>ONE FOURTH</value></terms> Thank you to help me get started. Christian ---------------------------------------- > From: christiansestier@xxxxxxxxxxx > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Date: Sat, 9 Apr 2011 00:02:09 +0200 > Subject: Grouping siblings according to attribute sequence > > > Hi all, > I am using Saxonica\SaxonHE9.3N > I have the following source xml > aa a aaa a a aaa a a a aONEaa a a aaa a a aaa a a a aTWOaa a a aaa a a aaa a a a aTHREEaa a a aaa a a aaa a a a aONE BISaa a a aaa a a aaa a a a aTWO BISaa a a aaa a a aaa a a a aTHREE BISaa a a aaa a a aaa a a a aTHREE TERaa a a aaa a a aaa a a a aONE FOURTHaa a a aaa a a > Sequence always start with level = 1term are in sequence levels that are always in increasing order, 1, 2, 3, etc.Last item in the sequence can be duplicated (more that twice)athere can be up to 5 levels max > I would like to get the following : > aa a aaa a a aaa a a a aTHREE/TWO/ONEaa a a aaa a a aaa a a a aTHREE BIS/TWO BIS/ONE BISaa a a aaa a a aaa a a a aTHREE TER/TWO BIS/ONE BISaa a a aaa a a aaa a a a aONE FOURTHaa a a > > Thank you to help me get started. > Christian
|
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
|