code: public boolean canTraverseOutsideSubtree()
    {
  
      int n = getPredicateCount();
  
      for (int i = 0; i < n; i++)
      {
        if (getPredicate(i).canTraverseOutsideSubtree())
          return true;
      }
  
      return false;
    }
docs: Tell if this expression or it's subexpressions can traverse outside
  the current subtree.
  
  NOTE: Ancestors tests with predicates are problematic, and will require
  special treatment.
  
  @return true if traversal outside the context node's subtree can occur.