This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Sibling text nodes
- From: "John R. Daily" <jdaily at progeny dot com>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Tue, 16 Jul 2002 10:38:13 -0500
- Subject: [xsl] Sibling text nodes
- Reply-to: xsl-list at lists dot mulberrytech dot com
Given an XML fragment like:
<outer><inner>blah</inner> following text.</outer>
Before I can finish processing the "inner" element, I need to
examine the next sibling node (following-sibling::*[1]?) to
determine if it is a text node whose contents begin with a
non-whitespace character.
These are the two questions, then:
* Is my next sibling a text node?
* If so, does its content begin with a non-whitespace character?
How can I accomplish this with XPath and XSLT? I spent a few
hours experimenting with following-sibling to no avail.
Thanks.
An example of XML that should trigger special handling:
<inner>blah</inner>, following text.
XML that should not trigger it:
<inner>blah</inner><othertag>...
--
John R. Daily jdaily@progeny.com
Projects Manager Progeny Linux Systems
Master of the ephemeral epiphany
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list