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 28045 - Higher order function feature - list of supported functions
Summary: Higher order function feature - list of supported functions
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3.1 (show other bugs)
Version: Candidate Recommendation
Hardware: SGI Windows NT
: P2 normal
Target Milestone: ---
Assignee: Jonathan Robie
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-18 13:45 UTC by Priscilla Walmsley
Modified: 2015-07-16 15:50 UTC (History)
4 users (show)

See Also:


Attachments

Description Priscilla Walmsley 2015-02-18 13:45:19 UTC
Section 5.2.6 says "If an implementation provides the Higher-Order Function Feature, then it must provide fn:function-lookup, fn:function-name, fn:function-arity, fn:for-each, fn:filter, fn:fold-left, fn:fold-right, and fn:for-each-pair."

Should this list also include new 3.1 functions that use higher-order functions, such as fn:apply, array:filter, array:fold-left, array:fold-right, array:for-each, array:for-each-pair, map:for-each?

Also, should the 2-argument versions of fn:sort and array:sort be included?
Comment 1 Andrew Coleman 2015-03-20 11:02:15 UTC
The Working Group discussed this bug at the teleconference on 2015-03-17 and agreed to add these functions to the list as you suggest.

Many thanks for reviewing the documents and raising this.
Comment 2 Michael Kay 2015-07-06 09:21:44 UTC
The change has been applied as agreed. However, there are other functions that need to be included in the list, for example fn:random-number-generator.

I propose that we don't try to enumerate the affected functions here, but instead label affected functions in F+O as having a dependency on this feature.
Comment 3 Jonathan Robie 2015-07-09 18:05:52 UTC
(In reply to Michael Kay from comment #2)
> The change has been applied as agreed. However, there are other functions
> that need to be included in the list, for example fn:random-number-generator.
> 
> I propose that we don't try to enumerate the affected functions here, but
> instead label affected functions in F+O as having a dependency on this
> feature.

I agree that we should not enumerate these functions in XQuery. 

But labelling functions as dependent on the feature doesn't mean that they have to be implemented, which was the intent here.  I'd prefer to have a list of functions, maintained in F&O, that I can point to from XQuery's conformance section.
Comment 4 Michael Kay 2015-07-09 20:31:33 UTC
Perhaps we should try to defined the affected functions intensionally, e.g.: any function whose signature includes an argument or result whose declared type is a SequenceType that contains a FunctionTest.
Comment 5 Josh Spiegel 2015-07-09 21:09:32 UTC
fn:load-xquery-module should probably be in the list but I think it escapes your criteria.
Comment 6 Jonathan Robie 2015-07-09 22:03:11 UTC
(In reply to Michael Kay from comment #4)
> Perhaps we should try to defined the affected functions intensionally, e.g.:
> any function whose signature includes an argument or result whose declared
> type is a SequenceType that contains a FunctionTest.

Any reason not to generate that list in the F&O specification, adding in fn:load-xquery-module?

It would be nice to have a list to link to.
Comment 7 John Snelson 2015-07-16 15:50:17 UTC
This has been resolved under bug 28810.

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28810