# HG changeset patch # User paulb # Date 1134334241 0 # Node ID 4dcbe1c2c243ad75439701dc66ebba7d24d9cc74 # Parent a91beee3ca40abd83d3dd281cbb085459876c675 [project @ 2005-12-11 20:50:41 by paulb] Fixed the namespace setting for non-empty prefixes. diff -r a91beee3ca40 -r 4dcbe1c2c243 libxml2dom/macrolib/macrolib.py --- a/libxml2dom/macrolib/macrolib.py Sun Dec 11 20:48:47 2005 +0000 +++ b/libxml2dom/macrolib/macrolib.py Sun Dec 11 20:50:41 2005 +0000 @@ -231,9 +231,10 @@ new_ns = libxml2mod.xmlNewNs(new_node, ns, prefix) libxml2mod.xmlSetNs(new_node, new_ns) # If the namespace is empty, set a "null" declaration. + elif prefix is not None: + new_ns = libxml2mod.xmlNewNs(new_node, "", prefix) + libxml2mod.xmlSetNs(new_node, new_ns) else: - #new_ns = libxml2mod.xmlNewNs(new_node, "", prefix) - #libxml2mod.xmlSetNs(new_node, new_ns) libxml2mod.xmlSetNs(new_node, None) Node_setAttribute(new_node, "xmlns", "") return new_node