This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Empty nodes



> 1. "has no child nodes"
test="not(node())"
<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"
test="not(string(.))"
<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.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]