This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Sibling text nodes
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 16 Jul 2002 18:26:22 +0100
- Subject: RE: [xsl] Sibling text nodes
- Reply-to: xsl-list at lists dot mulberrytech dot com
> These are the two questions, then:
> * Is my next sibling a text node?
> * If so, does its content begin with a non-whitespace character?
if test="following-sibling::node()[self::text()]
[not(translate(substring(.,1,1), ' 	

', '')='')]
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
>
> 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
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list