<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>9298</bug_id>
          
          <creation_ts>2010-03-22 18:40:39 +0000</creation_ts>
          <short_desc>[XPath21] namespace-node() as a KindTest in an Axis Step</short_desc>
          <delta_ts>2013-06-19 08:15:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XPath 3.0</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>33764</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-03-22 18:40:39 +0000</bug_when>
    <thetext>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: &quot;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. &quot;

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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33765</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-03-22 18:43:12 +0000</bug_when>
    <thetext>&gt;The current spec says that you can write A/B/namespace-node() and it will never
select anything, which also seems highly unsatisfactory.

I should add (and this is how I got here) that it also makes it near-impossible to maintain the symmetry in XSLT between path expressions and match patterns.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35414</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-05-04 17:13:14 +0000</bug_when>
    <thetext>In today&apos;s telcon, the XQuery WG reached the following decision:

Default axis for namespace() is the namespace axis.

In an implementation that does not support the namespace axis,
e.g. XQuery, it always raises an error.

In an XPath implementation, is is deprecated, but required in XSLT
implementations. If the implementation supports the namespace axis, it
returns the namespace node.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>