This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 28282 - [XP3.1] 2.1.1 static content "built-in"
Summary: [XP3.1] 2.1.1 static content "built-in"
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XPath 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: SGI Linux
: P2 minor
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
: 28305 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-23 00:36 UTC by Patrick Durusau
Modified: 2015-07-16 14:27 UTC (History)
3 users (show)

See Also:


Attachments

Description Patrick Durusau 2015-03-23 00:36:24 UTC
2.1.1 Static Content

"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],..."

The phrase "built-in" 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 "functions defined by [XQuery and XPath Functions and Operators 3.1]?
Comment 1 Jonathan Robie 2015-07-14 00:38:29 UTC
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.
Comment 2 Michael Kay 2015-07-14 08:19:55 UTC
The proposed text doesn't actually provide a precise definition of which the built-in functions are, for example it'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: "[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.]"
Comment 4 Michael Kay 2015-07-14 14:01:52 UTC
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 "a variety of sources including" is vague enough that perhaps it doesn't need ultimate precision. Is there a more precise statement elsewhere?
Comment 5 Jonathan Robie 2015-07-14 14:05:17 UTC
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.
Comment 6 Jonathan Robie 2015-07-14 18:50:44 UTC
*** Bug 28305 has been marked as a duplicate of this bug. ***
Comment 7 Jonathan Robie 2015-07-16 14:08:21 UTC
Areas that still need attention:

- ensure that all uses of the term "built-in function(s)" are consistent with this definition
- ensure that the static and dynamic context are consistent with this definition
Comment 8 Jonathan Robie 2015-07-16 14:17:19 UTC
In static context:

<current>
Statically known function signatures 

functions in fn namespace, and constructors for built-in simple types
</current>

Problems:

- Need to list all namespaces for built-in functions
- Need to provide constructors for user-defined types
Comment 9 Josh Spiegel 2015-07-16 14:19:29 UTC
The text for "Named functions" in the dynamic context (appendix c) also needs to be updated.  (See comment 8)
Comment 10 Jonathan Robie 2015-07-16 14:27:03 UTC
(In reply to Josh Spiegel from comment #9)
> The text for "Named functions" in the dynamic context (appendix c) also
> needs to be updated.  (See comment 8)

Thanks.

In both cases, the initial value is now the set of built-in functions.