/** * Check to ensure that this expression does not contain any inappropriate updating * subexpressions. This check is overridden for those expressions that permit updating * subexpressions. * * @throws net.sf.saxon.trans.XPathException if the expression has a non-permitted updateing * subexpression */ public void checkForUpdatingSubexpressions() throws XPathException { sequence.checkForUpdatingSubexpressions(); if (sequence.isUpdatingExpression()) { XPathException err = new XPathException( "An updating expression cannot be used to initialize a variable", "XUST0001"); err.setLocator(sequence); throw err; } action.checkForUpdatingSubexpressions(); }
/** * Determine whether this is an updating expression as defined in the XQuery update specification * * @return true if this is an updating expression */ public boolean isUpdatingExpression() { return action.isUpdatingExpression(); }