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

Re: Empty nodes

Subject: Re: Empty nodes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 4 Jul 2001 14:51:49 +0100
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


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.