Changes

Jump to navigation Jump to search
8 bytes added ,  13:52, 30 March 2016
===update===
 
The {{Code|update}} expression is a BaseX-specific convenience operator for the {{Code|copy/modify/return}}
construct. Similar to the [[XQuery 3.0#Simple Map Operator|XQuery 3.0 map operator]], the value of the first
expression is bound as context item, and the second expression performs updates on this item.
The updated item is returned as result. An example:
<pre class="brush:xquery">
return $item update delete node text()
</pre>
 
The {{Code|update}} expression is a BaseX-specific convenience operator for the {{Code|copy/modify/return}}
construct. Similar to the [[XQuery 3.0#Simple Map Operator|XQuery 3.0 map operator]], the value of the first
expression is bound as context item, and the second expression performs updates on this item.
The updated item is returned as result.
With {{Version|8.5}}, the update expression was extended:
 
* In analogy with [[#transform with|transform with]], the updating expressions can now be wrapped with curly braces.
* More than one node can now be specified as source:
<pre class="brush:xquery">
db:open('data')//item update { delete node text() }
</pre>
 
* In analogy with [[#transform with|transform with]], the updating expressions can now be wrapped with curly braces.
* Update expressions can now be chained:
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu