void (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().length() == 0 && file.getExpression() == null) { 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(); } } } }