[xquery-talk] XQuery and id()/idref();
Controlling the children of nodes in the result sequence
Andrew Welch
andrew.j.welch at gmail.com
Thu Apr 24 11:04:39 PDT 2008
On 24/04/2008, Florent Georges <lists at fgeorges.org> wrote:
> Andrew Welch wrote:
>
> > if you rewrote
>
> > not(ancestor::* intersect $e)
>
> > to be
>
> > not(some $x in ancestor::* satisfies $x is $e)
>
>
> That's not the same thing because 'is' compares two nodes. So your
> second expression would be rather equivalent to:
>
> not(ancestor::* intersect exactly-one($e))
>
> I'd say you should write instead:
>
>
> not(
> some $x in ancestor::* satisfies
>
> some $y in $e satisfies
> $x is $y
> )
Or more concisely:
some $x in ancestor::*, $y in $e satisfies $x is $y
which is the same as:
ancestor::* intersect $e
in the boolean sense.
:0)
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
More information about the talk
mailing list