code: function dispatch(methodName, inDocument, xpath, contextNode, namespaceResolver) {
          xpath = preprocess(xpath);
  
          if (! contextNode) {
              contextNode = inDocument;
          }
  
          var result = getEngineFor(inDocument)
              .setIgnoreAttributesWithoutValue(ignoreAttributesWithoutValue)
              [methodName](xpath, contextNode, namespaceResolver);
  
          return result;
      }
docs: Dispatches an XPath evaluation method on the relevant engine for the
  given document, and returns the result