xsl-list
[Top] [All Lists]

RE: [xsl] Grouping siblings according to attribute sequence

2011-04-08 17:09:58

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>THREE
 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(_at_)hotmail(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Date: Sat, 9 Apr 2011 00:02:09 +0200
Subject: [xsl] Grouping siblings according to attribute sequence


Hi all,
I am using Saxonica\SaxonHE9.3N
I have the following source xml
áá á ááá á á ááá á á á áONEáá á á ááá á á ááá á á á áTWOáá á á ááá á á ááá á 
á á áTHREEáá á á ááá á á ááá á á á áONE BISáá á á ááá á á ááá á á á áTWO 
BISáá á á ááá á á ááá á á á áTHREE BISáá á á ááá á á ááá á á á áTHREE TERáá á 
á ááá á á ááá á á á áONE FOURTHáá á á ááá á á
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 :
áá á ááá á á ááá á á á áTHREE/TWO/ONEáá á á ááá á á ááá á á á áTHREE BIS/TWO 
BIS/ONE BISáá á á ááá á á ááá á á á áTHREE TER/TWO BIS/ONE BISáá á á ááá á á 
ááá á á á áONE FOURTHáá á á

Thank you to help me get started.
Christian
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
--~--

                                          
--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>