This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The current XQUF spec forbids path expressions to be updating. This in contrast to other iterating expressions, such as FLWOR, which allows the RETURN clause to be simple, vacuous, or updating. As path and FLWOR expressions have similar semantics, the path semantics could be extended and relaxed to the simple rule that (only) the last step of a path may be updating. The following queries would then be valid: * //item/(delete node text()) * (1, <x/>) ! (if(. instance of node()) then insert node text { 'X' } into . else ()) The queries can be currently be formulated as follows: * for $i in //item return delete node $i/text() * for $i in (1, <x/>) return if($i instance of node()) then insert node text { 'X' } into $i else ())
That functionality might just be better off using the "!" operator.
The Working Group decided not to add this functionality.