[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Grouping siblings according to attribute sequence

Subject: RE: Grouping siblings according to attribute sequence
From: Christian Sestier <christiansestier@xxxxxxxxxxx>
Date: Sat, 9 Apr 2011 00:09:48 +0200
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.