LPX-01129
[XUST0001] Updating expression in a wrong position
Cause
It is a static error if an updating expression is used in any position other than one of the following:
- The topmost expression in the body of a query.
- The modify clause of a transform expression.
- The return clause of a FLWOR expression.
- The return clauses of a typeswitch expression in which every return clause contains an updating expression, an empty expression ( ), or a call to the fn:error function.
- The then and else clauses of a conditional statement in which both the then and else clauses contain either an updating expression, an empty expression ( ), or a call to the fn:error function.
- An operand of a comma expression in which each operand is either an updating expression, an empty expression ( ), or a call to the fn:error function.
- The content of a parenthesized expression.
- The body of a function declaration in which the keyword updating is specified.