This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Matching Siblings
- To: "Xsl-List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Matching Siblings
- From: "Ciaran Byrne" <ciaran dot byrne at 3tl dot com>
- Date: Thu, 24 May 2001 14:48:58 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi all,
I'm attempting to transform the following
<go/><postfield id="A"/><refresh/><postfield id="B"/>
into....
<go><postfield id="A"/></go><refresh><postfield id="B"/></refresh>
i.e. Wrap the 'postfield' element in a 'go' until a
sibling is encountered which isn't a 'postfield'.
In this case it's 'refresh'. The same rules apply for 'refresh'.
At the moment I'm attempting to recurse through each individual
following-sibling of the 'go' or 'refresh', checking if it's a 'postfield'.
If it's a 'postfield' then I copy it into the 'go' otherwise I move on.
I won't include my code since it's useless ;) but any help is appreicated.
Cheers.
Ciaran.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list