/**
   * Use an XPath string to select a nodelist. XPath namespace prefixes are resolved from the
   * namespaceNode.
   *
   * @param contextNode The node to start searching from.
   * @param xpathnode
   * @param namespaceNode The node from which prefixes in the XPath will be resolved to namespaces.
   * @return A NodeIterator, should never be null.
   * @throws TransformerException
   */
  public static NodeList selectNodeList(Node contextNode, Node xpathnode, Node namespaceNode)
      throws TransformerException {

    // Execute the XPath, and have it return the result
    XObject list = eval(contextNode, xpathnode, namespaceNode);

    // Return a NodeList.
    return list.nodelist();
  }