Well - but are such concerns related to using maps as the output? I do not
think so, and therefore I suggest to avoid mixing specific how-to's with
general challenges. By now you know the idiom how to construct maps
dynamically, as you had already known how to construct node trees dynamically.
On Fri, May 27, 2022 at 03:37:57PM +0200, Markus Elfring scripsit:
> > Gaps? First, to avoid a misunderstanding: whereas map keys must not
> > be the empty sequence, map values may.
>
> Special data sources might contain challenges for further
> clarification of the desired referential integrity.
> Gaps? First, to avoid a misunderstanding: whereas map keys must not be the
> empty sequence, map values may.
Special data sources might contain challenges for further clarification of
the desired referential integrity.
Regards,
Markus
Hi Markus, you wrote
"How would you determine where unexpected gaps occur?"
Gaps? First, to avoid a misunderstanding: whereas map keys must not be the
empty sequence, map values may.
An elegant way to construct map entries safely - taking care that the key is
not empty - is to use the map
On Fri, May 27, 2022 at 10:50:57AM +0200, Markus Elfring scripsit:
> > This code may for example be (most often is) a FLWOR expression. In
> > this code, each entry is constructed by a call of function
> > map:entry().
>
> Now I stumble on the error message “[XPTY0004] Item expected, empty
>
> although I do not quite understand your description
Which wording variant would you have found clearer for the mentioned use case?
> (why should I care for the representation of the map I construct?),
* Selection of a general data structure for the handling of key/value pairs
* I guess that
Note that the optional options argument in map:merge can change the way it
handles duplicate keys.
I’ve used this to create maps of normalized document ids from two different
collections to de-dup,
Where the ids SHOULD be uniq within a collection, but actually aren’t, or are
missing.
Hi Markus,
although I do not quite understand your description (why should I care for the
representation of the map I construct?), it may be that one piece of
information is useful to you, as it is not obvious from the spec: it's about
how to construct a map dynamically, that is,
(1) when the
o 10
return map:entry($i, $i*$i)
)
Best
Michael
Von: BaseX-Talk im Auftrag von
Markus Elfring
Datum: Mittwoch, 25. Mai 2022 um 17:35
An: Graydon Saunders
Cc: basex-talk@mailman.uni-konstanz.de
Betreff: Re: [basex-talk] Constructing and querying map structures in a dynamic
way
&g
Am 25.05.2022 um 17:35 schrieb Markus Elfring:
The standard specification just shows examples for topics like “days”
and “books” with map constructors based on literal data.
Perhaps https://www.w3.org/TR/xquery-31-requirements/ shows some more
complex queries.
> 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
Hi Markus --
On Wed, May 25, 2022 at 05:00:22PM +0200, Markus Elfring scripsit:
> I would like to construct a map structure based on a dynamic selection by
> the means of a FLWOR expression.
> https://www.w3.org/TR/2017/REC-xquery-31-20170321/#id-maps
>
> The keys and associated values should be
Hello,
I would like to construct a map structure based on a dynamic selection by
the means of a FLWOR expression.
https://www.w3.org/TR/2017/REC-xquery-31-20170321/#id-maps
The keys and associated values should be presented as a CSV-like file by
a subsequent data processing step.
Can it become
13 matches
Mail list logo