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

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

From: Michael Kay <mhk@mhk.me.uk>
Date: Mon, 16 Feb 2004 23:10:16 -0000
To: "'Stephen Buxton'" <Stephen.Buxton@oracle.com>, <public-qt-comments@w3.org>
Message-ID: <000f01c3f4e2$0c925a10$6401a8c0@pcukmka>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:54 UTC