code: protected Expression matchPattern(int opPos) throws TransformerException
    {
      locPathDepth++;
      try
      {
        // First, count...
        int nextOpPos = opPos;
        int i;
  
        for (i = 0; getOp(nextOpPos) == OpCodes.OP_LOCATIONPATHPATTERN; i++)
        {
          nextOpPos = getNextOpPos(nextOpPos);
        }
  
        if (i == 1)
          return compile(opPos);
  
        UnionPattern up = new UnionPattern();
        StepPattern[] patterns = new StepPattern[i];
  
        for (i = 0; getOp(opPos) == OpCodes.OP_LOCATIONPATHPATTERN; i++)
        {
          nextOpPos = getNextOpPos(opPos);
          patterns[i] = (StepPattern) compile(opPos);
          opPos = nextOpPos;
        }
  
        up.setPatterns(patterns);
  
        return up;
      }
      finally
      {
        locPathDepth--;
      }
    }
docs: Compile an entire match pattern expression.
  
  @param opPos The current position in the m_opMap array.
  
  @return reference to {@link org.apache.xpath.patterns.UnionPattern} instance.
  
  @throws TransformerException if a error occurs creating the Expression.