@NotNull
 public Map<String, String> getLocalNamespaceDeclarations() {
   Map<String, String> namespaces = new THashMap<String, String>();
   for (final XmlAttribute attribute : getAttributes()) {
     if (!attribute.isNamespaceDeclaration() || attribute.getValue() == null) continue;
     // xmlns -> "", xmlns:a -> a
     final String localName = attribute.getLocalName();
     namespaces.put(localName.equals(attribute.getName()) ? "" : localName, attribute.getValue());
   }
   return namespaces;
 }
  public String getAttributeValue(String qname) { // todo ?
    Map<String, String> map = myAttributeValueMap;
    while (map == null) {
      getAttributes();
      map = myAttributeValueMap;

      if (map == null) {
        myAttributes = null;
      }
    }
    return map.get(qname);
  }
Exemple #3
0
 public static void putInfo(PsiFile psiFile, Map<String, String> info) {
   info.put("fileName", psiFile.getName());
   info.put("fileType", psiFile.getFileType().toString());
 }
 protected void cacheOneAttributeValue(
     String name, String value, final Map<String, String> attributesValueMap) {
   attributesValueMap.put(name, value);
 }