/src/main/java/org/htmlunit/html/xpath/XPathHelper.java
if ( contextNode.getPage( )  == Node.DOCUMENT_NODE) {
if ( contextNode.getNodeType ( ) == Node.DOCUMENT_NODE ) {
return PROCESS_XPATH_.get().booleanValue(); } private static XObject evaluateXPath(final DomNode contextNode, final String str, final PrefixResolver prefixResolver) throws TransformerException { final XPathContext xpathSupport = new XPathContext(); final Node xpathExpressionContext; <extra_id_0> xpathExpressionContext = ((Document) contextNode).getDocumentElement(); } else { xpathExpressionContext = contextNode; } PrefixResolver resolver = prefixResolver;