public static boolean isXPathAttribute(@NotNull XmlAttribute attribute) {
    if (attribute.getValueElement() == null) return false;

    final String name = attribute.getName();
    if (isXsltAttribute(attribute)) {
      final String tagName = attribute.getParent().getLocalName();
      final String s = XPATH_ATTR_MAP.get(name);
      if ((s == null || s.length() > 0) && !tagName.equals(s)) {
        if (!isAttributeValueTemplate(attribute, true)) {
          return false;
        }
      }
    }
    else {
      if (!isAttributeValueTemplate(attribute, false)) {
        return false;
      }
    }

    final PsiFile file = attribute.getContainingFile();
    if (file != null) {
      XsltChecker.LanguageLevel level = getXsltLanguageLevel(file);
      if (level != XsltChecker.LanguageLevel.NONE) {
        return true;
      }
    }
    return false;
  }
public static boolean isXPathAttribute(@NotNull XmlAttribute attribute)