@Override public boolean matchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException { return getBasePattern().matchesBeneathAnchor(node, anchor, context) && matchesPredicate(node, context); }
@Override public boolean matchesBeneathAnchor(NodeInfo node, NodeInfo anchor, XPathContext context) throws XPathException { return getBasePattern().matchesBeneathAnchor(node, anchor, context) && matchesPredicate(node, context); }
/** * Determine whether this Pattern matches the given Node. * * @param item The NodeInfo representing the Element or other node to be tested against the Pattern * @param context The dynamic context. Only relevant if the pattern * uses variables, or contains calls on functions such as document() or key(). * @return true if the node matches the Pattern, false otherwise */ @Override public boolean matches(Item<?> item, XPathContext context) throws XPathException { if (!getBasePattern().matches(item, context)) { return false; } return matchesPredicate(item, context); }
/** * Determine whether this Pattern matches the given Node. * * @param item The NodeInfo representing the Element or other node to be tested against the Pattern * @param context The dynamic context. Only relevant if the pattern * uses variables, or contains calls on functions such as document() or key(). * @return true if the node matches the Pattern, false otherwise */ @Override public boolean matches(Item<?> item, XPathContext context) throws XPathException { if (!getBasePattern().matches(item, context)) { return false; } return matchesPredicate(item, context); }