W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

[FO31] map:entry superfluous?

From: Thomas Fischer <fischer.th@gmail.com>
Date: Wed, 30 Nov 2016 15:38:54 +0100
Message-ID: <CAEWx8V1z4kzaUP5wiCD+-d6Hi92Qo5M9YTG_vnwxXakpJxfH0A@mail.gmail.com>
To: public-qt-comments@w3.org
the documentation for map:entry

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 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

Th. Fischer
Received on Wednesday, 30 November 2016 14:45:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC