[xquery-talk] XQuery and id()/idref(); Controlling the children of nodes in the result sequence

Michael Kay mike at saxonica.com
Thu Apr 24 10:36:22 PDT 2008

> if you rewrote
> not(ancestor::* intersect $e)
> to be
> not(some $x in ancestor::* satisfies $x is $e)
> ...would that potentially stop searching when it found a 
> match?  Or would that generate the same code as the top version?

They're likely to be pretty much equivalent in Saxon.


will find all the descendant elements and test them against the predicate,
there are no rewrites that recognize that particular predicates might enable
the search scope to be reduced, other than the indexing optimisations in
Saxon-SA which handle predicates such as [relativePath=value].

Michael Kay

More information about the talk mailing list