[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Sibling text nodes

Subject: RE: Sibling text nodes
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 16 Jul 2002 18:26:22 +0100
xsl sibling text
> 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), ' &#x9;&#xa;&#xd;', '')='')]

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> 
> 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@xxxxxxxxxxx
> 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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.