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

  
> 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 Tuesday, 3 February 2004 18:23:42 UTC