+void AttributeExtensibleXMLObject::setAttribute(const QName& qualifiedName, const QName& value)
+{
+ if (!value.hasLocalPart())
+ return;
+
+ if (value.hasPrefix()) {
+ xstring buf(value.getPrefix());
+ buf = buf + chColon + value.getLocalPart();
+ setAttribute(qualifiedName, buf.c_str());
+ }
+ else {
+ setAttribute(qualifiedName, value.getLocalPart());
+ }
+
+ // Attach a non-visibly used namespace.
+ Namespace newNamespace(value.getNamespaceURI(), value.getPrefix(), false, false);
+ addNamespace(newNamespace);
+}
+