[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] Checking element to see if it has children...
Subject: Re: [xsl] Checking element to see if it has children... From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 9 Dec 2003 12:50:53 GMT |
> 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 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Checking element to see if it, JCS | Thread | Re: [xsl] Checking element to see i, JCS |
RE: [xsl] Selecting specific portio, Paul Barclay | Date | Re: [xsl] Checking element to see i, David Carlisle |
Month |
Keywords