This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29190 - [QT3TS] K2-Axes-54
Summary: [QT3TS] K2-Axes-54
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: O'Neil Delpratt
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-09 14:11 UTC by Debbie Lockett
Modified: 2015-11-04 10:29 UTC (History)
2 users (show)

See Also:


Attachments

Description Debbie Lockett 2015-10-09 14:11:18 UTC
XQuery 3.0 includes the error:
XQST0134: XQuery 3.0 does not support the namespace axis.
(With generalized wording in the XQuery 3.1 spec - XQST0134: The namespace axis is not supported.)

So I think the following test should be split in two, a test for XQ10 which expects error XPST0003, and a test for XQ30+ which expects the error XQST0134:

<test-case name="K2-Axes-54">
      <description> The namespace axis is not recognized in XQuery.</description>
      <created by="Frans Englich" on="2007-11-26+01:00"/>
      <dependency type="spec" value="XQ10+"/>
      <test>namespace::*</test>
      <result>
         <error code="XPST0003"/>
      </result>
   </test-case>
Comment 1 Debbie Lockett 2015-10-09 14:14:10 UTC
Should've said, the test K2-Axes-54 is in the prod-AxisStep test set.
Comment 2 Michael Kay 2015-10-09 18:00:50 UTC
Hmmm.

namespace::* is not allowed by the XQuery 3.1 grammar, so I think XPST0003 is appropriate. The only place XQuery tells you to raise XPST0134 is

if the NodeTest in an axis step is a NamespaceNodeTest then a static error is raised [err:XQST0134].

that is, if you encounter something like a/child::namespace-node()

Since that's not actually using the namespace axis, the text for XQST0134 is unhelpful, but the error texts aren't normative.

XPath 3.1 defines a different error: "An implementation that does not support the namespace axis when XPath 1.0 compatibility mode is false must raise a static error [err:XPST0010] if it is used. "

So I think the correct error codes are:

for an axis step namespace::*
- XQuery: XPST0003
- XPath: if namespace axis not supported: XPST0010 (doesn't apply to Saxon)

for a node-test namespace-node():
- XQuery: XPST0134
- XPath: if namespace axis not supported: XPST0134 (doesn't apply to Saxon)

If you encounter both in combination
namespace::namespace-node()

then I think you get to take your pick.
Comment 3 Debbie Lockett 2015-10-13 12:57:04 UTC
Ah ha, my mistake, thanks for the explanation. I guess the text for error XQST0134 added to my confusion, but basically I didn't understand it properly.