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: "John Dreystadt" <jdreysta at arbortext dot com>
- Date: Tue, 3 Oct 2000 16:32:32 -0400
- Reply-To: xsl-list at mulberrytech dot com
Since an empty nodelist evaluates to false, "//*[*]" works just as
well and should run faster. I assume you wanted a faster version (if
you had a different reason for wanting an alternative, speak up).
Yours requires some extra operations to compute than the option above.
But I suspect that performance will not matter much.
John Dreystadt
> -----Original Message-----
> From: owner-xsl-list@mulberrytech.com
> [mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Taras Tielkes
> Sent: Tuesday, October 03, 2000 4: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