Changes

Jump to navigation Jump to search
11 bytes removed ,  10:21, 9 March 2023
m
Text replacement - "<br />" to "<br/>"
|- valign="top"
| width='120' | '''Signatures'''
|{{Func|xquery:eval|$query as xs:anyAtomicType|item()*}}<br />{{Func|xquery:eval|$query as xs:anyAtomicType, $bindings as map(*)?|item()*}}<br />{{Func|xquery:eval|$query as xs:anyAtomicType, $bindings as map(*)?, $options as map(*)?|item()*}}<br />
|- valign="top"
| '''Summary'''
| '''Examples'''
|
* {{Code|xquery:eval("1+3")}} returns {{Code|4}}.<br />
* If a URI is supplied, the query in the specified file will be evaluated:
<syntaxhighlight lang="xquery">
xquery:eval(xs:anyURI('cleanup.xq'))
</syntaxhighlight>
* You can bind the context and e.g. operate on a certain database only:<br />
<syntaxhighlight lang="xquery">
xquery:eval("//country", map { '': db:get('factbook') })
|- valign="top"
| width='120' | '''Signatures'''
|{{Func|xquery:eval-update|$query as xs:anyAtomicType|item()*}}<br />{{Func|xquery:eval-update|$query as xs:anyAtomicType, $bindings as map(*)?|item()*}}<br />{{Func|xquery:eval-update|$query as xs:anyAtomicType, $bindings as map(*)?, $options as map(*)?|item()*}}<br />
|- valign="top"
| '''Summary'''
|Evaluates a query as updating expression. All updates will be added to the [[XQuery Update#Pending Update List|Pending Update List]] of the main query and performed after the evaluation of the main query.<br />The rules for all arguments are the same as for {{Function||xquery:eval}}.
|- valign="top"
| '''Errors'''
|- valign="top"
| width='120' | '''Signatures'''
|{{Func|xquery:parse|$query as xs:anyAtomicType|item()?}}<br />{{Func|xquery:parse|$query as xs:anyAtomicType, $options as map(*)?|item()?}}<br />
|- valign="top"
| '''Summary'''
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu