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

Re: Single Node XPath Evaluation Is Ambiguous

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Mon, 11 Nov 2002 09:41:37 -0500
To: "Dominic Chambers" <dominic.chambers@bigfoot.com>
Cc: "WWW DOM" <www-dom@w3.org>
Message-ID: <OF4D6B8C67.C3EA9FDC-ON85256C6E.004F4410-85256C6E.0050DBCB@us.ibm.com>

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

True. I believe they were added in an attempt to optimize cases where you 
knew there was only going to be a single match, or where you didn't care 
which of several matches would be returned.

> document order and evaluation order are not the same.

As far as I can tell -- I just searched the docs to be sure I was 
remembering correctly -- neither XPath nor XSLT defines the concept of 
evaluation order. Indeed, XSLT was very careful *not* to specify order of 
evaluation, in order to avoid constraining implementations and allow space 
for optimization.

I may have missed it. If so, I'd appreciate a pointer to the appropriate 
sections of the XPath or XSLT spec.

I can see why you'd like this concept to be nailed down and made more 
interoperable even when multiple matches are possible. But given the 
potential impact on real-world code of doing so -- forcing an ordering 
which may neither be document order nor that specific implementation's 
natural evaluation order -- I really have trouble with this proposal.

Joe Kesselman  / IBM Research
Received on Monday, 11 November 2002 09:42:12 UTC

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