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

Re: Checking element to see if it has children...

Subject: Re: Checking element to see if it has children...
From: JCS <subscriber@xxxxxxxxxxxxx>
Date: Wed, 10 Dec 2003 03:06:48 +1300
Re:  Checking element to see if it has children...
On 10/12/03 1:50 AM, "David Carlisle" <davidc@xxxxxxxxx> wrote:

> 
> 
>> I want the path to end with the element only if it doesn't contain other
>> elements, i.e. what railroad fans might call a "stub":
> 
> Since xml is normally called a tree rather than a network, that's a leaf
> not a stub.
> 
> <xsl:for-each select="/*//*">
> 
> selects ever descendent of the first child, ie every element except teh
> document element, you want every element with no child element that's
> <xsl:for-each select="//*[not(*)">
> 
> (testing for no children (and generating path expressions) are both in
> the faq for this list at www.dpawson.co.uk)
> 
> David
> 

This worked like a charm--why is it every time I think you don't know what
I'm talking about (because I can be unclear at 3AM as if you haven't already
noticed) I find out you know exactly what I'm looking for?

Thanks again,

/johnny :)




-- 
INTIMACY = In-to-me-I-see 


 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.