void (@NotNull XmlTag tag) { final Map<String, String> namespaceDeclarations = tag.getLocalNamespaceDeclarations(); final Set<String> localPrefixes = namespaceDeclarations.keySet(); for (String prefix : localPrefixes) { // More namespace fun... // [IDEA-5883] XmlTag.getLocalNamespaceDeclarations() return "xmlns" for default ("") namespace addNamespace("xmlns".equals(prefix) ? "" : prefix, namespaceDeclarations.get(prefix)); } addElement(tag); super.visitXmlTag(tag); }