This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Conditional Selection of Nodes
- To: "Xsl-List" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Conditional Selection of Nodes
- From: "Ciaran Byrne" <ciaran dot byrne at 3tl dot com>
- Date: Wed, 9 May 2001 21:41:44 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi all,
The following question has been teasing me lately
and I was hoping someone has an answer.
I have the following XML ...
<foo>
<b>content</b>
<b>more content</b>
<p>yet more content</p>
<i>some more conent</i>
</foo>
and what I want is to put all child elements of 'foo' that
are not in 'p' elements into a 'p' element, in order.
<foo>
<p>
<b>content</b>
<b>more content</b>
</p>
<p>yet more content</p>
<p>some more content</p>
</foo>
The key issue is to avoid putting 'p' elements around every sibling i.e.
<foo>
<p>
<b>content</b>
</p>
<p>
<b>more content</b>
</p>
etc.
</foo>
I've tried a few approaches yet no joy ;o( Any help is appreciated
Ciaran.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list