protected @Nullable String getAttributeValue(@Nullable String _name, @Nullable String namespace) {
    if (namespace == null) {
      return myTag.getAttributeValue(_name);
    }

    XmlTag current = myTag;
    while (true) {
      BidirectionalMap<String, String> map = getNamespaceMap(current);
      if (map != null) {
        List<String> keysByValue = map.getKeysByValue(namespace);
        if (keysByValue != null && !keysByValue.isEmpty()) {

          for (String prefix : keysByValue) {
            if (prefix != null && !prefix.isEmpty()) {
              final String value = myTag.getAttributeValue(prefix + ":" + _name);
              if (value != null) return value;
            }
          }
        }
      }

      PsiElement parent = current.getParent();
      if (!(parent instanceof XmlTag)) {
        break;
      }
      current = (XmlTag)parent;
    }

    if (namespace.isEmpty() || myTag.getNamespace().equals(namespace)) {
      return myTag.getAttributeValue(_name);
    }
    return null;
  }
protected @Nullable String getAttributeValue(@Nullable String _name, @Nullable String namespace)