Changes

Jump to navigation Jump to search
377 bytes added ,  06:54, 29 November 2019
no edit summary
|-
| '''Summary'''
|Returns {{Code|$items}} if it is a non-empty sequence. Otherwise, returns {{Code|$default}}. The function is equivalent to one of the expression following expressions:* <code>if(exists($items)) then $items else $default</code>.* <code>$items ?: $default</code> (see [[XQuery Extensions#Elvis Operator|Elvis Operator]] for more details)
|-
| '''Examples'''
==util:item==
 
{{Mark|Updated with Version 9.2}}: Renamed (before: {{Code|util:item-at}}).
{| width='100%'
==util:range==
 
{{Mark|Updated with Version 9.2}}: Renamed (before: {{Code|util:item-range}}).
{| width='100%'
==util:last==
 
{{Mark|Updated with Version 9.2}}: Renamed (before: {{Code|util:last-from}}).
{| width='100%'
==util:init==
 
{{Mark|Introduced with Version 9.2:}}
{| width='100%'
==util:chars==
 
{{Mark|Introduced with Version 9.2:}}
{| width='100%'
|
* <code>util:chars('AB')</code> returns the two strings <code>A</code> and <code>B</code>.
|}
 
==util:ddo==
 
{{Mark|Introduced with Version 9.3:}}
 
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|util:ddo|$nodes as node()*|node()*}}<br/>
|-
| '''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]. All results of path expression are in distinct document order, so the function is equivalent to the expression <code>$nodes/self::node()</code>.
|}
=Changelog=
 
;Version 9.3
* Added: [[#util:ddo|util:ddo]]
;Version 9.2
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu