Re: referencing a map produced from a function

Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> Tue, 27 Oct 2020 16:34:17 +0000
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
On the whole, with some exceptions, the language design is othogonal, so if you can write $M($K) where $M is a map, then you can replace $M with any expression that returns a map, including for example a function call F(a,b,c)($K).

Of course in some cases the replacement expression has to go in parentheses.

There are a few exceptions: pseudo-operators like "?" whose operands are not general expressions, but are more restricted.

Michael Kay
Saxonica

> On 27 Oct 2020, at 15:51, Ihe Onwuka <[email protected]> wrote:
> 
> A variable called a that contains a map can be referenced as $a and you can simulate a map:get with with the function call $a($keyValue).
> 
> Suppose the map was instead created by a function that takes a parameter that determines what kind of map to create.
> 
>  So local:createMap($typeOfMap) returns a map. Do we know have use the explicit map:get form, if not what does the function call form look like.
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help