SelectorStep parentStep = selectorSteps[index.i - 1];
if(parentStep.isTargetedAtElement(parentElement)) {
if(!parentStep.isStarStar()) {
XPathExpressionEvaluator evaluator = parentStep.getPredicatesEvaluator();
if(evaluator == null) {
logger.debug("Predicate Evaluators for resource [" + this + "] is null. XPath step predicates will not be evaluated.");
} else if(!evaluator.evaluate(parentElement, index.executionContext)) {
return false;
}
}
index.i--;
}
} else if (!selectorSteps[index.i].isTargetedAtElement(element)) {
return false;
} else {
if(!selectorSteps[index.i].isStarStar()) {
XPathExpressionEvaluator evaluator = selectorSteps[index.i].getPredicatesEvaluator();
if(evaluator == null) {
logger.debug("Predicate Evaluators for resource [" + this + "] is null. XPath step predicates will not be evaluated.");
} else if(!evaluator.evaluate(element, index.executionContext)) {
return false;
}
}
index.i--;
}