code: public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
    {
  
      XObject bestScore = null;
      int n = m_patterns.length;
  
      for (int i = 0; i < n; i++)
      {
        XObject score = m_patterns[i].execute(xctxt);
  
        if (score != NodeTest.SCORE_NONE)
        {
          if (null == bestScore)
            bestScore = score;
          else if (score.num() > bestScore.num())
            bestScore = score;
        }
      }
  
      if (null == bestScore)
      {
        bestScore = NodeTest.SCORE_NONE;
      }
  
      return bestScore;
    }
docs: Test a node to see if it matches any of the patterns in the union.
  
  @param xctxt XPath runtime context.
  
  @return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST},
  {@link org.apache.xpath.patterns.NodeTest#SCORE_NONE},
  {@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD},
  {@link org.apache.xpath.patterns.NodeTest#SCORE_QNAME}, or
  {@link org.apache.xpath.patterns.NodeTest#SCORE_OTHER}.
  
  @throws javax.xml.transform.TransformerException