/** returns true if context node is equal to variable target. * i.e. $target.equals(.) * @param ctxt * @return */ public static boolean matchTarget(ExpressionContext ctxt) { Object candidate = ctxt.getContextNodePointer().getValue(); Object target = ctxt.getJXPathContext().getVariables().getVariable("target"); return target.equals(candidate); }