<?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>28811</bug_id>
          
          <creation_ts>2015-06-15 09:12:25 +0000</creation_ts>
          <short_desc>[SER 3.1] Serializing function items in the adaptive method</short_desc>
          <delta_ts>2015-06-19 08:48:07 +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>Serialization 3.1</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</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="Andrew Coleman">andrew_coleman</assigned_to>
          <cc>andrew_coleman</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>120985</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-06-15 09:12:25 +0000</bug_when>
    <thetext>It&apos;s not clear in the adaptive method how the QName of a function is to be handled. The text says

A function item is serialized to the representation &quot;function fn:name#A&quot; where fn:name is the function name and A is the arity. If the function is anonymous, fn:name is replaced by the string &quot;(anonymous)&quot;.
Note:
The following examples illustrate this rule:
exists#1 is serialized as function exists#1
fn:exists#1 is serialized as function fn:exists#1
Q{http://www.w3.org/2005/xpath-functions}exists#1 is serialized as function exists#1

Now, &quot;fn:name&quot; suggests using a lexical QName. But the examples then confuse this. What is &quot;exists#1&quot;? If we assume the default namespace for functions, it&apos;s the same thing as &quot;fn:exists#1&quot;. The system can&apos;t be expected to remember how the QName was originally written.

I suggest:

A function item is serialized to the representation &quot;function name#A&quot; where name is a representation of the function name and A is the arity. If the function name is in one of the namespaces (...) then the name is output as a lexical QName using the conventional prefix &quot;fn&quot;, &quot;math&quot;, &quot;map&quot;, &quot;array&quot;, or &quot;xs&quot; as appropriate; if it is in any other namespace or in no namespace, then the name is output as a URI-qualified name (that is, &quot;Q{uri}local&quot;). If the function is anonymous, name is replaced by the string &quot;(anonymous)&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121220</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2015-06-19 08:48:07 +0000</bug_when>
    <thetext>At the teleconference on 2015-06-16, the WG agreed to adopt the proposed wording.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>