[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: Need an XPath expression for: $B is not contained in $A
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Jun 2018 21:39:47 -0000
> "empty($A intersect $B//*)"
>
> XPath 1.0:
>
> "count($B/**) = count($B//* | $A)"
>
> Cheers, Wendell
>

Getting all the ancestors of $A is likely to be a lot faster than getting all
the descendants of $B, simply because a node typically has many descendants
but few ancestors.

Michael Kay
Saxonica

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member