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%22The operand expressions of the comma expression are evaluated,and the XDMinstances and pending update lists returned areconcatenated in operand order. Pending update lists are concatenatedby the upd:mergeUpdates operation."
Hi Hans-Jürgen,
MIXUPDATES exists, it works, and it is used in practice. However, you cannot specify it in the prolog of a query, because it also affects imported modules. If you e.g. put MIXUPDATES=true in your .basex file, you’ll see that you can mix updates and return values.
Hope this helps, Christian
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."
Super, Christian, that's very helpful! In order to make versatile tools *portable* (independent of .basex files on the tool user's machine), it would of course be great if sooner or later the XQUF 3.0 will be supported. Such support would make the option obsolete, I think. Cheers,Hans-Jürgen
Christian Grün christian.gruen@gmail.com schrieb am 0:07 Mittwoch, 13.Januar 2016:
Hi Hans-Jürgen,
MIXUPDATES exists, it works, and it is used in practice. However, you cannot specify it in the prolog of a query, because it also affects imported modules. If you e.g. put MIXUPDATES=true in your .basex file, you’ll see that you can mix updates and return values.
Hope this helps, Christian
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."
basex-talk@mailman.uni-konstanz.de