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 21128 - [XT30] map() reserved name
Summary: [XT30] map() reserved name
Status: RESOLVED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 16:44 UTC by Tim Mills
Modified: 2013-05-11 08:45 UTC (History)
2 users (show)

See Also:


Attachments

Description Tim Mills 2013-02-26 16:44:38 UTC
If map() is a type, it will presumably find its way onto the list of reserved function names in XPath (and XQuery).  This is unfortunate given the existence of the function fn:map.
Comment 1 Michael Kay 2013-04-18 16:55:00 UTC
The XSL WG reviewed this and considered that there is a strong case for changing the name of the fn:map() function, and would recommend fn:for-each as an alternative name. This is a late change to 3.0 but we feel it is the best way forward.
Comment 2 Jonathan Robie 2013-04-23 16:04:07 UTC
(In reply to comment #1)
> The XSL WG reviewed this and considered that there is a strong case for
> changing the name of the fn:map() function, and would recommend fn:for-each
> as an alternative name. This is a late change to 3.0 but we feel it is the
> best way forward.

I would support this change.
Comment 3 Adam Retter 2013-04-23 17:48:36 UTC
I would also like to raise a question about the order of the arguments to the function, which could be dealt with at the same time as a potential rename of the function - https://www.w3.org/Bugs/Public/show_bug.cgi?id=21797
Comment 4 Michael Kay 2013-05-11 08:45:02 UTC
The WGs decided in meeting #538:

DECISION: J4.2.5: fn:map will be renamed to fn:for-each and
fn:map-pairs will be renamed to fn:for-each-pair.

Subsequently in meeting #539, the WGs made a decision on the related bug #21797:

Voted for changing order of arguments.  The sequence argument will come first.  The function argument will be last in all 5 higher order functions.