Re: Maps in exslt2?

"Michael Kay" <[email protected]> Mon, 15 Mar 2010 14:52:05 -0000
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <E2AA38E38D884A578A4E5E3F7CACD505@Sealion>
> The suggestion has been declined (probably my arguments were 
> not convincing). 

You can probably assume that different people voted against it for different
reasons. Some may have felt the arguments unconvincing; some may have felt
that it was outside the scope of the 1.1/2.1 release (which some people
think is almost finished); some may have felt the priority was to get
higher-order functions into this release and richer data structures would be
easier to define once that was done. It may have failed because those who
thought the idea was good weren't prepared to do the extensive leg-work to
define the facility in detail. And of course there will be a lot of debate
about the detail, such as what kinds of values are permitted as map keys (I
would say anything with an "eq" operator), whether there is a difference
between a key being absent versus mapping to an empty sequence, 

While there are certainly (in my view) many use cases for maps and other
richer data structures, I'd be more confortable if there was some kind of
unifying strategy rather than adding things one-by-one. 

One design approach is that a map is nothing more than an extensional
function from keys to values. But that still leaves the question as to how
the mapping is initialized. And it gives no ability to iterate over the
keys, which is often important.

As it happens we were struggling with a piece of design in XSLT 2.1 last
week where the ability to have a function that returned a map would have
made life much easier. Perhaps I'll try to bring it back in as a solution to
that specific problem.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay