<?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>9571</bug_id>
          
          <creation_ts>2010-04-21 15:07:45 +0000</creation_ts>
          <short_desc>There is no zero-arity node-name() function</short_desc>
          <delta_ts>2011-06-08 11:43:38 +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>Functions and Operators 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="Michael Kay">mike</assigned_to>
          <cc>jonathan.robie</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>35184</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-04-21 15:07:45 +0000</bug_when>
    <thetext>The node-name() function is anomalous. Other functions that return a property of a node, for example base-uri(), name(), local-name(), namespace-uri(), generate-id(), string() have a zero-arity form that takes the context item as the implicit first argument. Some other functions that do this: number(), string-length(), normalize-space().

node-name() might be expected to follow this pattern, but doesn&apos;t.

Similarly, though perhaps with less usability impact, document-uri() and data().

We ought to be consistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35185</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-04-21 15:09:41 +0000</bug_when>
    <thetext>root() is another one that DOES have a zero-arity variant (proving that it&apos;s not only a design that was adopted for 1.0 functions and abandoned in 2.0).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35189</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2010-04-21 17:46:20 +0000</bug_when>
    <thetext>I agree - we should allow this for node-name(),document-uri(), and
data().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41923</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2010-11-01 17:09:00 +0000</bug_when>
    <thetext>According to my records this we agreed on 2010-05-14 to add zero-argument forms of the three functions node-name(), data(), and document-uri(), and I am therefore closing this belatedly as FIXED/RESOLVED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>