RE: [Xquery] 3.3.2 Filter Expressions (editorial comment on example)

> why can't ForwardStep | ReverseStep be moved into PrimaryExpression so
> that AxisStep can be deleted and filterexpression unified with
> stepexpression
>  that would unify all uses of [...] into one place 

The main reason is that there is a semantic distinction: the old problem of
the difference between (ancestor::*)[1] and ancestor::*[1]. Specifically,
position() is computed differently in the two different kinds of predicate.
We therefore need a syntactic way of distinguishing the two kinds of
predicate, so that the syntactic difference can steer the choice of
semantics.

Michael Kay

Received on Wednesday, 4 August 2004 04:15:05 UTC