<?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>28282</bug_id>
          
          <creation_ts>2015-03-23 00:36:24 +0000</creation_ts>
          <short_desc>[XP3.1] 2.1.1 static content &quot;built-in&quot;</short_desc>
          <delta_ts>2015-07-16 14:27:03 +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>SGI</rep_platform>
          <op_sys>Linux</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>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Durusau">patrick</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          <cc>jim.melton</cc>
    
    <cc>josh.spiegel</cc>
    
    <cc>mike</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>118799</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Durusau">patrick</who>
    <bug_when>2015-03-23 00:36:24 +0000</bug_when>
    <thetext>2.1.1 Static Content

&quot;The statically known function signatures include the signatures of functions from a variety of sources, including built-in functions described in [XQuery and XPath Functions and Operators 3.1],...&quot;

The phrase &quot;built-in&quot; occurs 28 times and only with reference to datatypes, save for four (4) times in notes in 16.1.1 fn:function-lookup.

Do you mean &quot;functions defined by [XQuery and XPath Functions and Operators 3.1]?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122007</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-14 00:38:29 +0000</bug_when>
    <thetext>For XQuery the definition now reads:

[Definition: The built-in functions supported by XQuery 3.1 are defined in [XQuery and XPath Functions and Operators 3.1]. The set of built-in functions is specified in 5.1 Minimal Conformance and 5.2 Optional Features.] Additional functions may be declared in a Prolog, imported from a library module, or provided by the external environment as part of the static context.

For XPath it now reads:

[Definition: The built-in functions supported by XPath 3.1 are defined in [XQuery and XPath Functions and Operators 3.1]. The set of built-in functions is specified by the host language. ] Additional functions may be provided in the static context. XPath per se does not provide a way to declare named functions, but a host language may provide such a mechanism.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122017</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-14 08:19:55 +0000</bug_when>
    <thetext>The proposed text doesn&apos;t actually provide a precise definition of which the built-in functions are, for example it&apos;s not clear whether the term includes constructor functions for built-in types, or whether it includes the pseudo-functions in the op: namespace.

cf XSLT section 2.1: &quot;[Definition: The core functions are: functions specified in [Functions and Operators 3.0] in either the standard function namespace or the namespace http://www.w3.org/2005/xpath-functions/math; plus functions defined in this specification in namespace http://www.w3.org/2005/xpath-functions/map.]&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122020</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-14 13:50:00 +0000</bug_when>
    <thetext>I would assume we want functions from all of these namespaces?

http://www.w3.org/2005/xpath-functions 
http://www.w3.org/2001/XMLSchema
http://www.w3.org/2005/xpath-functions/math
http://www.w3.org/2005/xpath-functions/map
http://www.w3.org/2005/xpath-functions/array</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122021</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-07-14 14:01:52 +0000</bug_when>
    <thetext>As far as I can see from a quick scan of usages of the term that definition is OK, but it needs care. E.g. in 2.1.1 we say 

The statically known function signatures include the signatures of functions from a variety of sources, including built-in functions described in [XQuery and XPath Functions and Operators 3.1], and constructor functions .

Now if constructor functions in the xs namespace are built-in, but constructor functions for user-defined types are not, then that sentence might need rephrasing; but the language &quot;a variety of sources including&quot; is vague enough that perhaps it doesn&apos;t need ultimate precision. Is there a more precise statement elsewhere?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122022</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-14 14:05:17 +0000</bug_when>
    <thetext>It currently looks like this for XQuery:

[Definition: The built-in functions are the functions defined in [XQuery and XPath Functions and Operators 3.1] in the http://www.w3.org/2005/xpath-functions, http://www.w3.org/2001/XMLSchema, http://www.w3.org/2005/xpath-functions/math, http://www.w3.org/2005/xpath-functions/map, and http://www.w3.org/2005/xpath-functions/array namespaces.] The set of built-in functions is specified in 5.1 Minimal Conformance and 5.2 Optional Features. Additional functions may be declared in a Prolog, imported from a library module, or provided by the external environment as part of the static context.

And like this for XPath:

[Definition: The built-in functions are the functions defined in [XQuery and XPath Functions and Operators 3.1] in the http://www.w3.org/2005/xpath-functions, http://www.w3.org/2001/XMLSchema, http://www.w3.org/2005/xpath-functions/math, http://www.w3.org/2005/xpath-functions/map, and http://www.w3.org/2005/xpath-functions/array namespaces.] The set of built-in functions is specified by the host language. Additional functions may be provided in the static context. XPath per se does not provide a way to declare named functions, but a host language may provide such a mechanism.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122039</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-14 18:50:44 +0000</bug_when>
    <thetext>*** Bug 28305 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122139</commentid>
    <comment_count>7</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-16 14:08:21 +0000</bug_when>
    <thetext>Areas that still need attention:

- ensure that all uses of the term &quot;built-in function(s)&quot; are consistent with this definition
- ensure that the static and dynamic context are consistent with this definition</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122141</commentid>
    <comment_count>8</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-16 14:17:19 +0000</bug_when>
    <thetext>In static context:

&lt;current&gt;
Statically known function signatures 

functions in fn namespace, and constructors for built-in simple types
&lt;/current&gt;

Problems:

- Need to list all namespaces for built-in functions
- Need to provide constructors for user-defined types</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122142</commentid>
    <comment_count>9</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-07-16 14:19:29 +0000</bug_when>
    <thetext>The text for &quot;Named functions&quot; in the dynamic context (appendix c) also needs to be updated.  (See comment 8)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>122144</commentid>
    <comment_count>10</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-07-16 14:27:03 +0000</bug_when>
    <thetext>(In reply to Josh Spiegel from comment #9)
&gt; The text for &quot;Named functions&quot; in the dynamic context (appendix c) also
&gt; needs to be updated.  (See comment 8)

Thanks.

In both cases, the initial value is now the set of built-in functions.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>