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.
This will go to the XSL Working Group for discussion.
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.
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.
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.
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.
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.