Changes

Jump to navigation Jump to search
72 bytes removed ,  18:33, 1 December 2023
m
Text replacement - "</syntaxhighlight>" to "</pre>"
0: "Sun", 1: "Mon", 2: "Tue", 3: "Wed", 4: "Thu", 5: "Fri", 6: "Sat"
};
</syntaxhighlightpre>
==map:contains==
map:entry("Sat", "Saturday")
))
</syntaxhighlightpre>
Unlike the <code>map { ... }</code> expression, this technique can be used to construct a map with a variable number of entries, for example:
<pre lang='xquery'>map:merge(for $b in //book return map:entry($b/isbn, $b))</syntaxhighlightpre>
|- valign="top"
| '''Examples'''
function($key, $value) { $key + $value }
)
</syntaxhighlightpre>
|}
<pre lang='xquery'>
map:merge(($week, map { 7: "---" }))
</syntaxhighlightpre>
* In the following example, the values of all maps are combined, resulting in a map with a single key (<code>map { "key": (1, 2, 3) }</code>):
<pre lang='xquery'>
map { 'duplicates': 'combine' }
)
</syntaxhighlightpre>
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu