1.1 --- a/libxml2dom/macrolib/__init__.py Sun Dec 11 17:26:25 2005 +0000
1.2 +++ b/libxml2dom/macrolib/__init__.py Sun Dec 11 17:27:30 2005 +0000
1.3 @@ -2,7 +2,7 @@
1.4
1.5 "DOM macro library for libxml2."
1.6
1.7 -__version__ = "0.3"
1.8 +__version__ = "0.3.1"
1.9
1.10 # Expose all functions here.
1.11
2.1 --- a/libxml2dom/macrolib/macrolib.py Sun Dec 11 17:26:25 2005 +0000
2.2 +++ b/libxml2dom/macrolib/macrolib.py Sun Dec 11 17:27:30 2005 +0000
2.3 @@ -217,10 +217,15 @@
2.4
2.5 prefix, localName = _get_prefix_and_localName(name)
2.6 new_node = libxml2mod.xmlNewNode(localName)
2.7 - # NOTE: Does it make sense to set the namespace if it is empty?
2.8 +
2.9 + # If the namespace is not empty, set the declaration.
2.10 if ns is not None:
2.11 new_ns = libxml2mod.xmlNewNs(new_node, ns, prefix)
2.12 libxml2mod.xmlSetNs(new_node, new_ns)
2.13 + # If the namespace is empty, set a "null" declaration.
2.14 + else:
2.15 + new_ns = libxml2mod.xmlNewNs(new_node, "", prefix)
2.16 + libxml2mod.xmlSetNs(new_node, new_ns)
2.17 return new_node
2.18
2.19 def Node_createElement(node, name):