Hi Markus,

 

The standard specification just shows examples for topics like “days”
and “books” with map constructors based on literal data.

If you are looking for functions to construct maps dynamically, maybe map:merge & map:entry are what you are after?

 

map:merge(

  for $i at $pos in 1 to 10

  return map:entry($i, $i*$i)

)

 

 

Best

Michael

 

Von: BaseX-Talk <basex-talk-bounces@mailman.uni-konstanz.de> im Auftrag von Markus Elfring <Markus.Elfring@web.de>
Datum: Mittwoch, 25.
Mai 2022 um 17:35
An: Graydon Saunders <graydonish@gmail.com>
Cc: basex-talk@mailman.uni-konstanz.de <basex-talk@mailman.uni-konstanz.de>
Betreff: Re: [basex-talk] Constructing and querying map structures in a dynamic way

> Maps are a derivative of the function type and highly general.

I got informed that the data structure “map” got a clear meaning according to
XQuery programming interfaces.



> You're in effect asking for examples of using a function with no other
> information provided.

I came along another clarification desire according to the mentioned standard
data structure.


> It's just about impossible to answer usefully.

The standard specification just shows examples for topics like “days”
and “books” with map constructors based on literal data.
How would the XQuery code look like if a detailed FLWOR expression would
be applied instead?

The subsequent CSV result output should show finally that keys and associated
values were properly determined before.

Regards,
Markus