# HG changeset patch # User paulb # Date 1134322050 0 # Node ID 8b6c436dfebfd01ba9023742a0372d0ed10f9a3d # Parent c9107c0605f9fa1e46812adbecc6c92ffe01483f [project @ 2005-12-11 17:27:30 by paulb] Fixed null namespaceURI usage so that appropriate declarations are set on elements. Updated release information. diff -r c9107c0605f9 -r 8b6c436dfebf libxml2dom/macrolib/__init__.py --- a/libxml2dom/macrolib/__init__.py Sun Dec 11 17:26:25 2005 +0000 +++ b/libxml2dom/macrolib/__init__.py Sun Dec 11 17:27:30 2005 +0000 @@ -2,7 +2,7 @@ "DOM macro library for libxml2." -__version__ = "0.3" +__version__ = "0.3.1" # Expose all functions here. diff -r c9107c0605f9 -r 8b6c436dfebf libxml2dom/macrolib/macrolib.py --- a/libxml2dom/macrolib/macrolib.py Sun Dec 11 17:26:25 2005 +0000 +++ b/libxml2dom/macrolib/macrolib.py Sun Dec 11 17:27:30 2005 +0000 @@ -217,10 +217,15 @@ prefix, localName = _get_prefix_and_localName(name) new_node = libxml2mod.xmlNewNode(localName) - # NOTE: Does it make sense to set the namespace if it is empty? + + # If the namespace is not empty, set the declaration. if ns is not None: new_ns = libxml2mod.xmlNewNs(new_node, ns, prefix) libxml2mod.xmlSetNs(new_node, new_ns) + # If the namespace is empty, set a "null" declaration. + else: + new_ns = libxml2mod.xmlNewNs(new_node, "", prefix) + libxml2mod.xmlSetNs(new_node, new_ns) return new_node def Node_createElement(node, name):