[Bug 9298] New: namespace-node() as a KindTest in an Axis Step

http://www.w3.org/Bugs/Public/show_bug.cgi?id=9298

           Summary: namespace-node() as a KindTest in an Axis Step
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 2.1
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


XPath 2.1 has introduced the syntax namespace-node() as a new kind of KindTest.
As such it can be used in an AxisStep, for example we can write
A/B/namespace-node().

Section 3.2.4 says: "If the axis name is omitted from an axis step, the default
axis is child unless the axis step contains an AttributeTest or
SchemaAttributeTest; in that case, the default axis is attribute. "

Logically, this rule should be extended so that when the axis step contains the
KindTest namespace-node(), the default axis is namespace.

The only difficulty here of course is that the namespace axis is deprecated,
which means that the KindTest namespace-node() when used as an AxisStep should
be deprecated, but it seems odd to introduce new syntax and deprecate it at the
same time. Yet the alternative, of introducing an asymmetry between a KindTest
used in an AxisStep and a KindTest used as an ItemType seems worse.

The current spec says that you can write A/B/namespace-node() and it will never
select anything, which also seems highly unsatisfactory.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 22 March 2010 18:40:41 UTC