|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] XQuery and id()/idref(); Controlling the children of nodes in the result sequenceFlorent Georges lists at fgeorges.orgThu Apr 24 11:43:40 PDT 2008
Andrew Welch wrote:
Hi
> 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
)
I didn't test them, but I guess even a naive processor would have
enough info in the second case to know it can stop as soon as it finds
a node that satisfies the identity (because of 'some').
For the first case Saxon seems to wrap the intersection into an
'exists' instead of 'not', and I am confident that in this case it
stops when it finds a node. But Mike can tell you more on that.
But when I see the two expressions, my first reaction is to prefer to
trust my processor's optimizer and make the intent as clear as possible
for other developers...
Regards,
--drkm
__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






