RE: ORA-XQ-339-C: Should "/a/(1 to 5)[2]" raise type error?

> SECTION 3.2.1: Steps
> 
> It says in section 3.2, "This sequence of steps is then 
> evaluated from left to right. Each operation E1/E2 is 
> evaluated as follows: Expression E1 is evaluated, and if the 
> result is not a sequence of nodes, a type error is raised." 
> So query "/a/(1 to 5)[2]" should raise a type error because 
> (1 to 5) does not return a sequence of nodes.
> 
> However, it also says in section 3.2.1, "A filter step 
> consists simply of a primary expression followed by zero or 
> more predicates. ... This result may contain nodes, atomic 
> values, or any combination of these." This should be 
> clarified, e.g. by saying "a filter step must return a set of 
> nodes when used in a path expression."
> 
You are confusing filter steps and axis steps. I think the latest draft
is putting these into separate sections which should reduce this
confusion. Also, filter steps are being renamed filter expressions
(which is what they were in XPath 1.0) which will also help to make it
clearer that they are unrelated to path expressions.

Michael Kay

Received on Monday, 16 February 2004 18:09:38 UTC