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

Re: finding "empty" text nodes where element has a spe

Subject: Re: finding "empty" text nodes where element has a specificattribute
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 12 Sep 2003 16:41:43 +0100
spe element
as always involving tests for empty, it depends what you mean bey empty


 //*[@name][(not(node()))]
tests for no element children at all (and a name attribute) so

<a name=""> </a> is non-empty, as is
<a name=""><!-- this --></a>
If you want want white space to count as empty then 
 //*[@name][not(normalize-space()))]

now the two above are selected (ie counted as empty) but
so is

<a name=""> <b/> </a>

If sub elements may be there you may want somnething like

 //*[@name][not(*)][not(normalize-space()))]

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.