Changes

Jump to navigation Jump to search
33 bytes added ,  16:22, 7 August 2022
<syntaxhighlight lang="xquery">
(: if/then/else :)if ($test ok) then 1 else 0,(: ternary if :)$ok ?? 'ok' 1 !! 'fails'0
</syntaxhighlight>
<syntaxhighlight lang="xquery">
let $number := 123return ( (: if/then/else :) if (exists($numberargument)) then $number argument else 0, (: elvis operator :) $number argument ?: 0)-1
</syntaxhighlight>
<syntaxhighlight lang="xquery">
declare option db:chop catalog 'falseetc/w3-catalog.xml';
doc('doc.xml')
</syntaxhighlight>
(# db:enforceindex #) {
for $db in ('persons1', 'persons2', 'persons3')
return db:preget($db)//name[text() = 'John']
}
</syntaxhighlight>
'wrapped-db-nodes.xml',
(# db:copynode false #) {
<xml>{ db:preget('huge') }</xml>
}
)
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu