@Override
  public String getName(PsiElement context) {

    String name = getName();
    if (context == null) {
      return name;
    }

    final XmlTag rootTag = (((XmlFile) myTag.getContainingFile())).getRootTag();
    assert rootTag != null;
    String targetNs = rootTag.getAttributeValue("targetNamespace");
    if (targetNs == null) return name;

    XmlTag contextTag = (XmlTag)context;
    if (QUALIFIED_ATTR_VALUE.equals(myTag.getAttributeValue("form")) ||
        QUALIFIED_ATTR_VALUE.equals(rootTag.getAttributeValue("attributeFormDefault")) ||
        shouldBeQualified(targetNs, contextTag)) {
      final String prefixByNamespace = contextTag.getPrefixByNamespace(targetNs);
      if (prefixByNamespace!= null && prefixByNamespace.length() > 0) {
        name = prefixByNamespace + ":" + name;
      }
    }

    return name;
  }
@Override
  public String getName(PsiElement context)