1.1 --- a/libxml2dom/macrolib/macrolib.py Sun Dec 11 20:46:06 2005 +0000
1.2 +++ b/libxml2dom/macrolib/macrolib.py Sun Dec 11 20:48:31 2005 +0000
1.3 @@ -232,8 +232,10 @@
1.4 libxml2mod.xmlSetNs(new_node, new_ns)
1.5 # If the namespace is empty, set a "null" declaration.
1.6 else:
1.7 - new_ns = libxml2mod.xmlNewNs(new_node, "", prefix)
1.8 - libxml2mod.xmlSetNs(new_node, new_ns)
1.9 + #new_ns = libxml2mod.xmlNewNs(new_node, "", prefix)
1.10 + #libxml2mod.xmlSetNs(new_node, new_ns)
1.11 + libxml2mod.xmlSetNs(new_node, None)
1.12 + Node_setAttribute(new_node, "xmlns", "")
1.13 return new_node
1.14
1.15 def Node_createElement(node, name):
1.16 @@ -359,11 +361,8 @@
1.17 # NOTE: Fixed to use version 1.0 only.
1.18 d = libxml2mod.xmlNewDoc("1.0")
1.19 if localName is not None:
1.20 - # NOTE: Verify that this is really what should occur.
1.21 - if namespaceURI is not None:
1.22 - root = Node_createElementNS(d, namespaceURI, localName)
1.23 - else:
1.24 - root = Node_createElement(d, localName)
1.25 + # NOTE: Verify that this is always what should occur.
1.26 + root = Node_createElementNS(d, namespaceURI, localName)
1.27 Node_appendChild(d, root)
1.28 if doctype is not None:
1.29 libxml2mod.xmlCreateIntSubset(d, doctype.localName, doctype.publicId, doctype.systemId)