W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

Re: [XQuery] 3.2 Path expressions returning non-nodes

From: Sarah Wilkin <swilkin@apple.com>
Date: Wed, 4 Feb 2004 10:27:30 -0800
Message-Id: <CAB6A050-573F-11D8-BA08-0003935B7D94@apple.com>
Cc: public-qt-comments@w3.org
To: Michael Kay <mhk@mhk.me.uk>

I see what you mean. However, I don't want the proposed solution to get 
in the way of the problem. Our new proposal:
If each evaluation of E2 results in a sequences of nodes, they are 
combined in document order, removing duplicates.
If each evaluation of E2 results in a sequence of atomic values of the 
same type, they are returned in the order of the result from the 
primary expression.
Otherwise a type error is raised.

--Sarah

On Feb 3, 2004, at 3:24 PM, Michael Kay wrote:

>
>> The rule seems simple:
>> If the path ends with an AxisStep, proceed as usual (eliminate
>> duplicate nodes and return in sequence order)
>> If the path ends with a FilterStep, order the sequence in the same
>> order as the result from the primary expression.
>
> I think it's not generally a good idea for the semantics of an operator
> to depend on the syntactic form of its operands; it should depend only
> on their value and type. Otherwise you get a lack of composability: you
> can't safely replace an expression with a function that evaluates that
> expression.
>
> It also means that A/B gives a different answer from A/(B).
>
> Michael Kay
>
Received on Wednesday, 4 February 2004 13:27:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:32 GMT