Project

Profile

Help

Revision bb6955db

Added by Michael Kay over 12 years ago

2798641 - In XQuery Update, errors in updating functions not detected

View differences:

latest9.1/bj/net/sf/saxon/query/XQueryFunction.java
432 432
     */
433 433

  
434 434
    public void optimize() throws XPathException {
435
        body.checkForUpdatingSubexpressions();
435 436
        if (isUpdating) {
436 437
            if (!ExpressionTool.isAllowedInUpdatingContext(body)) {
437 438
                XPathException err = new XPathException(
......
440 441
                throw err;
441 442
            }
442 443
        } else {
443
            body.checkForUpdatingSubexpressions(); 
444
            //body.checkForUpdatingSubexpressions();
444 445
            if (body.isUpdatingExpression()) {
445 446
                XPathException err = new XPathException(
446 447
                         "The body of a non-updating function must be a non-updating expression", "XUST0001");

Also available in: Unified diff