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 5452 - [FS] Static type of namespace axis
Summary: [FS] Static type of namespace axis
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Formal Semantics 1.0 (show other bugs)
Version: Recommendation
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Michael Dyck
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-06 10:58 UTC by Oliver Hallam
Modified: 2009-06-22 20:40 UTC (History)
2 users (show)

See Also:


Attachments

Description Oliver Hallam 2008-02-06 10:58:05 UTC
Section 8.2.2.1.6 of formal semantics says:
The type for the namespace axis is always empty.

However this does not match up with the definition of the namespace axis in section 3.2.1 of the XPath 2.0 specification.  Since formal semantics assumes compatibility mode is set to false then "support for the namespace axis is implementation-defined" and either:

a) the namespace axis is supported, in which case it does not always return empty, and a namespace type should be added.

b) the namespace axis is not supported, in which case an implementation "must raise a static error [err:XPST0010] if it is used", and so arguably the type should be none.
Comment 1 Michael Dyck 2008-02-12 22:29:18 UTC
This will go to the XSL Working Group for discussion.
Comment 2 Michael Kay 2008-10-23 14:42:49 UTC
The XSL Working Group discussed this on 9 Oct 2008.

We felt that the work needed to handle the namespace axis in the formal semantics is probably not justified, since the intersection of products (necessarily XPath rather than XQuery) that implement the static typing rules and products that support the namespace axis is probably rather small. Nevertheless the FS document ought to make it explicit that this case is excluded; and it should not say that the type of an expression using the namespace axis is empty, which would automatically make it an error.

I would propose replacing the content of section 8.2.2.1.6 (Inference rules for the namespace axis) by:

This document does not specify inference rules for the namespace axis (which is allowed, though deprecated, in XPath 2.0, and is not allowed in XQuery 1.0). Implementations choosing to support the namespace axis will need to define an additional node kind for namespace nodes in the type hierarchy, and to add the appropriate inference rules.
Comment 3 Jonathan Robie 2009-02-24 21:00:59 UTC
I agree with Mike Kay. Our XPath spec says:

In [XPath 1.0], the in-scope namespaces of an element node are represented by a collection of namespace nodes arranged on a namespace axis. In XPath Version 2.0, the namespace axis is deprecated and need not be supported by a host language. A host language that does not support the namespace axis need not represent namespace bindings in the form of nodes.

I see little value in spending time providing additional support for a deprecated feature.
Comment 4 Michael Dyck 2009-03-06 01:44:08 UTC
At their meeting last week, the Working Groups approved Michael
Kay's proposal in comment #2, and directed me to mark this issue
resolved-WONTFIX.

If you accept this resolution, please mark the issue CLOSED.
Comment 5 Michael Dyck 2009-03-07 04:55:02 UTC
This issue has been entered as FS erratum E062, and the proposed fix has
been committed to the source files for the next edition of the FS document.
Comment 6 Michael Dyck 2009-06-22 20:40:02 UTC
The approved change for this issue appears in the Proposed Edited
Recommendation for the FS.

After 3 months with no response from the original reporter,
I am marking this issue CLOSED.  Feel free to reopen it
if you disagree with this outcome.