MIXUPDATES exists, it works, and it is used in practice. However, you
imported modules. If you e.g. put MIXUPDATES=true in your .basex file,
you’ll see that you can mix updates and return values.
On Tue, Jan 12, 2016 at 11:34 PM, Hans-Juergen Rennau <
hrennau@yahoo.de> wrote:
> Dear BaseX team,
>
> version 3.0 of the XQuery Update Facility (XQUF) allows expressions to
> perform an updating operation *and* return a value (e.g. [1]). Presently,
> BaseX supports probably only version 1.0 of the XQUF, so the mixing of
> update and value creates an error - and option MIXUPDATES equal "true" does
> not change this.:
>
> Query:
> ===============================
> declare option db:mixupdates 'true';
>
> 100,
> insert node <elem/> into *
> ===============================
> =>
> Stopped at C:/projects/act/updateQuery.xq, 5/1:
> [XUST0001] List expression: all expressions must be updating or return an
> empty sequence.
>
> In my opinion, the possibility to mix updating and value construction is
> very important, as otherwise it is impossible to develop versatile tools
> which may, dependent on call parameters, either return a result or perform
> an update.
>
> So my Q U E S T I O N is - are there already plans to support XQUF 3.0 -
> or as a first step the mixing of update and value - soon? Would be
> phantastic!
>
> Cheers,
> Hans-Jürgen
>
> [1]
http://www.w3.org/TR/xquery-update-30/#id-comma-expr> "The operand expressions of the comma expression are evaluated, and the XDM
> instances and pending update lists returned are concatenated in operand
> order. Pending update lists are concatenated by the upd:mergeUpdates
> operation."