Changes

Jump to navigation Jump to search
57 bytes removed ,  12:46, 6 May 2024
no edit summary
|- valign="top"
| {{Code|util:map-entries}}
| [https://qt4cg.org/specifications/xpath-functions-40/Overview.html#func-map-pairs entries <code>map:pairsentries</code>]
|- valign="top"
| {{Code|util:map-values}}
let $count := count($sequence)
return $count >= $min and $count <= $max
</syntaxhighlightpre>
|- valign="top"
| '''Examples'''
<pre lang='xquery'>
subsequence($sequence, $first, $last - $first + 1)
</syntaxhighlightpre>
|- valign="top"
| '''Examples'''
|- valign="top"
| '''Summary'''
|Returns nodes in ''distinct document order'': duplicate nodes will be removed, and the remaining nodes will be returned in [https://www.w3.org/TR/xquery-31/#dt-document-order document order]. As results of path expressions are brought into distinct document order before they are returned, the function is equivalent to:
<pre lang='xquery'>
$nodes/self::node()
</syntaxhighlightpre>
|}
|Returns the document nodes of the specified {{Code|$nodes}}. The path expression <code>/abc</code> is internally represented as <code>util:root(.)/abc</code>. Equivalent to:
<pre lang='xquery'>
util:ddo($nodes x ! /)</syntaxhighlightpre>
|}
(: yields :)
<xml name='value'><child/></xml>
</syntaxhighlightpre>
* Remove all default namespaces:
<pre lang='xquery'>
<xml xmlns='uri1'><child xmlns='uri2'/></xml>
=> util:strip-namespaces('')
</syntaxhighlightpre>
|}
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu