W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2002

Re: Single Node XPath Evaluation Is Ambiguous

From: Dominic Chambers <dominic.chambers@bigfoot.com>
Date: Sat, 9 Nov 2002 04:50:42 +0100
Message-ID: <003801c287a3$894c1940$0100a8c0@hp>
To: "WWW DOM" <www-dom@w3.org>

I feel that I am being consistently misunderstood. If you could kindly read
all of the mail before replying, I would be grateful.

> If you aren't going to specify the order as explicitly called out by the
> XPath spec, I think it's wiser to not specify any order.

XPath does not mention single node queries, so that is not possible. Single
node queries are added by DOM - not XPath.

>> If this does not happen, then an XPath processor that works differently
>> the rest, will mean the node returned from an unordered, single node
>> evaluation will be ambiguous

> It _IS_ inherently and deliberately ambiguous.  Unordered means no
> promises about order order, not a promise of interoperability with some
> ad-hoc most-common-this-week behavior.

Most common this week? If that is how you define XSLT (the only Reccomended
W3C spec that mentions single order queries) then what can we trust?

> If that isn't acceptable, don't use the "unordered single node" call; ask
> for the ordered set and take the appropriate member thereof, and hope that
> your implementation was clever enough to compute this incrementally and
> not waste time on the ones you don't care about.

No, that would not work, but would provide different results. As I have
previously stated, on two seperate occasions, document order and evaluation
order are not the same.

>> I am just asking that DOM XPath is aligned with XSLT for its
>> unsorted, single node behaviour.

> You're fairly explicitly asking for alignment with the current behavior of
> specific implementations.

No, I am not. I am asking that DOM XPath be aligned with XSLT in this
matter, since evaluation order is almost always what you want when you do a
single node query.

> That's not an appropriate space for the DOM to
> be playing in, until and unless the XPath folks make that behavior part of
> their standard.

DOM is already playing in this area. Single node evaluation is not specified
in XPath, yet DOM adds this feature. It even creates two possible
orderings - document order or undefined. XSLT on the other hand, provides
only one ordering for single node evaluation, the only totally sensible
one - evaluation order.

Please read my previous mails on this subject to see why this ordering is so
Received on Friday, 8 November 2002 22:55:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC