[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] [xslt] enhance match condition for next node referance


Subject: Re: [xsl] [xslt] enhance match condition for next node referance
From: Ronan Klyne <ronan.klyne@xxxxxxxxxxx>
Date: Thu, 19 Mar 2009 15:40:00 +0000

David Carlisle wrote:
>> "following-sibling::node()[1][self::exit]".
> 
> unless you are stripping white space on input, that needs to be
> 
> "following-sibling::*[1][self::exit]"
> 
> as otherwise the following node will be the white space text node
> indenting <exit/>.

David, it was my understanding that any text node containing only
whitespace was always stripped. Is this an option, or am I just wrong?

Michalmas, this is a very good point - text nodes are nodes, but not
elements. In practical terms, this means that "*" will not match text,
but "node()" will.


-- 
Ronan Klyne
Business Collaborator Developer
Tel: +44 01189 028518
ronan.klyne@xxxxxxxxxxx
www.groupbc.com


Current Thread