@Override
    public void visitElement(@NotNull PsiElement psiElement) {
      super.visitElement(psiElement);

      if (myProblems != null) {
        final TextRange textRange = psiElement.getTextRange();
        for (ProblemDescriptor problem : myProblems) {
          if (textRange.contains(problem.getPsiElement().getTextRange())) {
            return;
          }
        }
      }

      if (psiElement instanceof XPathExpression) {
        checkExpression((XPathExpression)psiElement);
      }
      else if (psiElement instanceof XPathNodeTest) {
        checkNodeTest((XPathNodeTest)psiElement);
      }
      else if (psiElement instanceof XPathPredicate) {
        checkPredicate((XPathPredicate)psiElement);
      }
    }
@Override
    public void visitElement(@NotNull PsiElement psiElement)