operand0 = visitor.typeCheck(operand0, contextItemType);
operand1 = visitor.typeCheck(operand1, contextItemType);
// if both operands are known, pre-evaluate the expression
try {
if ((operand0 instanceof Literal) && (operand1 instanceof Literal)) {
Value v = Value.asValue(evaluateItem(visitor.getStaticContext().makeEarlyEvaluationContext()));
return Literal.makeLiteral(v);
}
} catch (XPathException err) {
// if early evaluation fails, suppress the error: the value might
// not be needed at run-time