public void visitXPathFile(XPathFile file, AnnotationHolder holder) {
    final XmlAttribute context = PsiTreeUtil.getContextOfType(file, XmlAttribute.class, true);
    if (context != null) {
      if (XsltSupport.isPatternAttribute(context)) {
        XsltPatternValidator.validate(holder, file);
      }
      else if (file.getText().trim().isEmpty() && file.getExpression() == null && !file.getText().isEmpty()) {
        holder.newAnnotation(HighlightSeverity.ERROR, XPathBundle.message("annotator.error.empty.xpath.expression")).create();
      }
      if (XsltSupport.isXsltAttribute(context) && !XsltSupport.mayBeAVT(context)) {
        final ASTNode node = file.getNode();
        if (node.findChildByType(XPathTokenTypes.LBRACE) != null) {
          holder.newAnnotation(HighlightSeverity.ERROR,
                               XPathBundle.message("annotator.error.attribute.value.template.not.allowed.here")).create();
        }
      }
    }
  }
public void visitXPathFile(XPathFile file, AnnotationHolder holder)