{
  public boolean matches(Node node, int pos, int len)  {    short nodeType = node.getNodeType();    switch (nodeType)      {      case Node.ELEMENT_NODE:      case Node.ATTRIBUTE_NODE:      case Node.TEXT_NODE:      case Node.CDATA_SECTION_NODE:      case Node.COMMENT_NODE:      case Node.PROCESSING_INSTRUCTION_NODE:        if (type > 0)          {            if (nodeType != type)              {                return false;              }            if (data != null && !data.equals(node.getNodeValue()))              {                return false;              }          }        return true;      default:        // Not part of XPath data model        return false;      }  }