Iterator nsDecls = this.namespaces.keySet().iterator();
while (nsDecls.hasNext()) {
String prefix = (String) nsDecls.next();
if (prefix != null && !"".equals(prefix)
&& !prefix.equals(OMConstants.XMLNS_NS_PREFIX)) {
OMNamespace ns = (OMNamespace) this.namespaces.get(prefix);
AttrImpl attr = new AttrImpl(this.ownerNode, prefix, ns
.getName(), this.factory);
attr.setOMNamespace(new NamespaceImpl(
OMConstants.XMLNS_NS_URI,
OMConstants.XMLNS_NS_PREFIX, this.factory));
attributeMap.addItem(attr);