void (XmlAttribute xmlAttribute) { final String namespace = xmlAttribute.getNamespace(); final String localName = xmlAttribute.getLocalName(); // [IDEA-5206] XmlAttribute.getNamespace() returns namespace of parent element if no prefix in attribute name. That's wrong final String name = xmlAttribute.getName(); if (name.indexOf(':') == -1) { attributes.add(new QName("", localName)); } else { attributes.add(new QName(namespace, localName)); } }