@Override
    public void visitXPathStep(XPathStep step) {
      final XPathPredicate[] predicates = step.getPredicates();
      for (XPathPredicate predicate : predicates) {
        if (predicate.getPredicateExpression() == myExpression) {
          myExpectedType = getPredicateType(myExpression);
          return;
        }
      }

      if (isXPath1(step)) {
        myExpectedType = XPathType.NODESET;
      } else {
        if (step.getStep() != null) {
          myExpectedType = XPath2Type.SEQUENCE;
        } else {
          myExpectedType = XPath2Type.NODE;
        }
      }
    }
@Override
    public void visitXPathStep(XPathStep step)