if (block == null) {
// body of for-each is empty: it's a no-op.
return Literal.makeEmptySequence();
}
try {
return new ForEach(sortedSequence, makeExpressionVisitor().simplify(block), containsTailCall);
} catch (XPathException err) {
compileError(err);
return null;
}
}