Re: [xsl] Empty nodes

Subject: Re: [xsl] Empty nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Jul 2001 14:51:49 +0100
> 1. "has no child nodes"
<a/> and <a x="y"/> would be true
<a><!-- --></a> <a> </a> would be false (unless white space nodes are
stripped in which case <a> </a> would be the same as <a/>

2. "has zero-length string value"
<a/>  <a x="y"/> <a><!-- --></a> <a><b/></a> would all be true

> 3. "has no child elements or text nodes"
test="not(* or text())"
<a/> and <a><!-- --></a>  ture

> 4. node does not exist
That is what you had, not(.) but this is always false
as you can't ask "does this node exist" or rather you can ask because it
is always true. 

> 1. <c/> means "has no child nodes" or "has zero-length string value" or "has
> no child elements or text nodes" ?

all of those are true about <c/>

> 2. <b code="123"> means "has zero-length string value" ?
It doesn't mean that, but "has zero-length string value" is a true
property of that element.


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:

Current Thread