code: public boolean visitPredicate(ExpressionOwner owner, Expression pred)
    {
      m_predDepth++;
  
      if(m_predDepth == 1)
      {
        if((pred instanceof Variable) || 
           (pred instanceof XNumber) ||
           (pred instanceof Div) ||
           (pred instanceof Plus) ||
           (pred instanceof Minus) ||
           (pred instanceof Mod) ||
           (pred instanceof Quo) ||
           (pred instanceof Mult) ||
           (pred instanceof org.apache.xpath.operations.Number) ||
           (pred instanceof Function))
            m_hasPositionalPred = true;
        else
        	pred.callVisitors(owner, this);
      }
  
      m_predDepth--;
  
      // Don't go have the caller go any further down the subtree.
      return false;
    }
docs: Visit a predicate within a location path.  Note that there isn't a
  proper unique component for predicates, and that the expression will
  be called also for whatever type Expression is.
  
  @param owner The owner of the expression, to which the expression can
  be reset if rewriting takes place.
  @param pred The predicate object.
  @return true if the sub expressions should be traversed.