Re: [FO31] map:entry superfluous?

I have logged this at

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

because we manage all external comments on the spec through Bugzilla. Please track this bugzilla entry for a response.

Provisional personal response: yes, I think map:entry() is now in a technical sense redundant. However, the fact that something can be done using custom syntax doesn't necessarily mean it's wrong to have a function as well, and at this stage of the game, I don't think redundancy is a good enough reason to pull something out of the spec.

At one time I believe that the XSLT working group was trying to ensure that maps could be manipulated using XPath 2.0 without syntax extensions, purely as a function library, and that may still be a relevant argument for some people.

Michael Kay
Saxonica


> On 30 Nov 2016, at 14:38, Thomas Fischer <fischer.th@gmail.com> wrote:
> 
> Hi,
> the documentation for map:entry <https://www.w3.org/XML/Group/qtspecs/specifications/xpath-functions-31/html/#func-map-entry> says:
> 
> Unlike the map expression (map{...}), this technique can be used to construct a map with a variable number of entries, for example:
>     map:merge(for $b in //book return map:entry($b/isbn, $b))
> 
> At least with Saxon-HE 9.7.0.8J you can achieve the same result with a simple map constructor
>     map:merge(for $b in //book return map{$b/isbn: $b})
> 
> I wonder, if this is just a "special feature" of Saxon or if there is any other reason to keep map:entry in the proposal
> 
> salute
> Th. Fischer
> 

Received on Wednesday, 30 November 2016 17:17:25 UTC