This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Selecting all descendants with no child nodes
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: Selecting all descendants with no child nodes
- From: "Evan Lenz" <elenz at xyzfind dot com>
- Date: Tue, 3 Oct 2000 14:49:28 -0700
- Reply-To: xsl-list at mulberrytech dot com
try:
//*[not(*)]
* in the context of a predicate (where the expression automatically gets
converted to a boolean) is converted to true if the node-set it returns is
not empty. Surround it with not() and the expression will return all
leaves.
Evan Lenz
elenz@xyzfind.com
http://www.xyzfind.com
XYZFind, the search engine *designed* for XML
Download our free beta software: http://www.xyzfind.com/beta
-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Taras Tielkes
Sent: Tuesday, October 03, 2000 1:25 PM
To: xsl-list@mulberrytech.com
Subject: Selecting all descendants with no child nodes
Hi,
(I hope people don't mind a beginner xpath question now and then)
I'm using the XPath expression "//*[count(*)=0]" to locate all "endpoint"
nodes.
Is there any other way to achieve this, an alternative syntax?
Thanks in advance,
Taras
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list