Bugzilla – Bug 21128
[XT30] map() reserved name
Last modified: 2013-05-11 08:45:02 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.
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.
(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.
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
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.