Changes

Jump to navigation Jump to search
530 bytes added ,  13:39, 30 March 2016
</pre>
The {{Code|update}} expression is a convenience operator for writing simple transform expressionsthe {{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.
Please note that With {{Version 8.5}}, the update expression was extended: * More than one node can 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 – and should – be wrapped with curly braces. * The update expression can now be chained: <pre class="brush:xquery">(<root1/>, <root2/>) update { insert node <child/> into .} update { insert node "text" into child}</pre> ===transform with=== {{Mark|Introduced with Version 8.5}}: The {{Code|updatetransform with}} expression is not part of the official XQuery Update Facility yet.It is currently being discussed in the [https://www.w3.org/BugsTR/Publicxquery-update-30/show_bug#id-transform-with XQuery Update 3.cgi?id=23643 W3 Bug Tracker0]];your feedback working draft. It is welcomealso available in BaseX.
==Functions==
Bureaucrats, editor, reviewer, Administrators
13,551

edits

Navigation menu