<?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>28175</bug_id>
          
          <creation_ts>2015-03-09 12:05:01 +0000</creation_ts>
          <short_desc>[XP3.1] Statically known functions, and XSLT 3.0 packages</short_desc>
          <delta_ts>2015-07-14 00:54:10 +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.1</component>
          <version>Candidate Recommendation</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="Jonathan Robie">jonathan.robie</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>118446</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-03-09 12:05:01 +0000</bug_when>
    <thetext>The description of the static context in XPath 3.1 says:

&lt;quote&gt;
[Definition: Statically known function signatures. This is a mapping from (expanded QName, arity) to function signatureDM31. ] The entries in this mapping define the set of statically known functions — those functions that are available to be called from a static function call, or referenced from a named function reference. Each such function is uniquely identified by its expanded QName and arity (number of parameters). Given a statically known function&apos;s expanded QName and arity, this component supplies the function&apos;s signatureDM31, which specifies various static properties of the function, including types.
&lt;/quote&gt;

Most of the time, the spec is careful to make clear that it is only the function signatures that are present in the static context -- not actual function implementations.

For XSLT 3.0 packages, this is essential. For example, XSLT 3.0 makes it possible to reference an abstract function whose implementation will be supplied later in a different package. The function signature is known statically, but the implementation is not.

The only place where the XPath 3.1 spec slips up on this distinction is in fact in the paragraph cited above, which is the only place that talks of &quot;statically known functions&quot; rather than statically known function signatures.

Suggested rewording:

&lt;quote&gt;
[Definition: Statically known function signatures. This is a mapping from (expanded QName, arity) to function signatureDM31. ] The entries in this mapping define the signatures of the functions that are available to be called from a static function call, or referenced from a named function reference. Each such function signature is uniquely identified by its expanded QName and arity (number of parameters). The function signatureDM31 defines various static properties of the function, including types.
&lt;/quote&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119875</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Coleman">andrew_coleman</who>
    <bug_when>2015-04-24 10:29:16 +0000</bug_when>
    <thetext>At the teleconference on 2015-04-21, the WG agreed to adopt the proposed wording.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121778</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-06 08:58:34 +0000</bug_when>
    <thetext>This change has not been [fully] applied in the current draft specification. There is still a reference to &quot;statically known functions&quot; which was removed by the accepted revision.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122009</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-14 00:54:10 +0000</bug_when>
    <thetext>Nice catch.  Fixed now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>