ctxExpr = sfce(axisFn,
treat(ctxExpr, SequenceType.create(AnyNodeType.INSTANCE, Quantifier.QUANT_STAR)),
ce(SequenceType.create(BuiltinTypeRegistry.XS_INT, Quantifier.QUANT_ONE), ntCode));
asc = isForwardAxis(axis);
} else if (ASTTag.FILTER_EXPRESSION.equals(pathNode.getTag())) {
FilterExprNode filterNode = (FilterExprNode) pathNode;
predicates = filterNode.getPredicates();
ctxExpr = vre(translateExpression(filterNode.getExpr(), tCtx));
} else {
throw new IllegalStateException("Unknown path node: " + pathNode.getTag());
}
if (predicates != null && !predicates.isEmpty()) {
ctxExpr = sfce(asc ? BuiltinOperators.SORT_DISTINCT_NODES_ASC_OR_ATOMICS