code: protected final boolean executePredicates(
            XPathContext xctxt, DTM dtm, int currentNode)
              throws javax.xml.transform.TransformerException
    {
  
      boolean result = true;
      boolean positionAlreadySeen = false;
      int n = getPredicateCount();
  
      try
      {
        xctxt.pushSubContextList(this);
  
        for (int i = 0; i < n; i++)
        {
          xctxt.pushPredicatePos(i);
  
          try
          {
            XObject pred = m_predicates[i].execute(xctxt);
  
            try
            {
              if (XObject.CLASS_NUMBER == pred.getType())
              {
                int pos = (int) pred.num();
    
                if (positionAlreadySeen)
                {
                  result = (pos == 1);
    
                  break;
                }
                else
                {
                  positionAlreadySeen = true;
    
                  if (!checkProximityPosition(xctxt, i, dtm, currentNode, pos))
                  {
                    result = false;
    
                    break;
                  }
                }
              
              }
              else if (!pred.boolWithSideEffects())
              {
                result = false;
    
                break;
              }
            }
            finally
            {
              pred.detach();
            }
          }
          finally
          {
            xctxt.popPredicatePos();
          }
        }
      }
      finally
      {
        xctxt.popSubContextList();
      }
  
      return result;
    }
docs: Execute the predicates on this step to determine if the current node
  should be filtered or accepted.
  
  @param xctxt The XPath runtime context.
  @param dtm The DTM of the current node.
  @param currentNode The current node context.
  
  @return true if the node should be accepted, false otherwise.
  
  @throws javax.xml.transform.TransformerException