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 XQuery Update Working Draft from 1/27/06 allows expressions (e.g. the expressions created by the "," operator) to return both a pending update list and a value (i.e. a normal XDM instance). The pros and cons and the consequences of such a decision are still under discussion.
Is there any way to weigh in on this issue? If I'm not misreading it, the current spec as of 2006-07-11 disallows expressions to return both values and pending update lists (by disallowing expressions that have updating and non-updating children). I'm not entirely sure about that, as the wording is pretty strange: 1. If any branch contains an updating expression, the conditional expression is an updating expression; otherwise it is a non-updating expression. ... 3.If the conditional expression is an updating expression, then both of its branches must contain either an updating expression, an empty expression ( ), or a call to the fn:error function; otherwise a static error is raised [err:XUST0001]. In this case, the test expression is evaluated and the then or else clause is selected and evaluated as specified in Section 3.10 of [XQuery 1.0]. The result of the conditional expression is the pending update list returned by the selected branch. This seems like a very complicated way of saying "If one of the branches of a conditional expression is an updating expression, the other has to be one too". I think Mary Holsteges comment in bug #2796 is very valid, disallowing this will forbid so many use cases that it renders the whole thing entirely useless.
This will not be included in version 1.0 of the XQuery Update Facility. It may be reconsidered for some future version of the Update Facility.