// determine the set of potential ancestors for which the predicate has to
// be re-evaluated to filter out wrong matches
if (selection.isEmpty())
{ancestors = selection;}
else if (contextStep == null || current > 0) {
ancestors = selection.selectAncestorDescendant(contextSequence.toNodeSet(), NodeSet.ANCESTOR,
true, contextId, true);
} else {
// NodeSelector selector;
final long start = System.currentTimeMillis();
// selector = new AncestorSelector(selection, contextId, true, false);