@Nullable
  public static String getLocalName(@NotNull XmlAttributeValue value) {
    final PsiElement parent = value.getParent();
    if (parent instanceof XmlAttribute) {
      return ((XmlAttribute)parent).getLocalName();
    }
    else if (parent instanceof XmlProcessingInstruction) {
      PsiElement prev = value.getPrevSibling();
      if (!(prev instanceof XmlToken) || ((XmlToken)prev).getTokenType() != XmlTokenType.XML_EQ) return null;
      prev = prev.getPrevSibling();
      if (!(prev instanceof XmlToken) || ((XmlToken)prev).getTokenType() != XmlTokenType.XML_NAME) return null;
      return prev.getText();
    }
    else {
      return null;
    }
  }
@Nullable
  public static String getLocalName(@NotNull XmlAttributeValue value)