[Lxml-checkins] r54449 - in lxml/trunk: . src/lxml

scoder at codespeak.net scoder at codespeak.net
Mon May 5 21:43:17 CEST 2008


Author: scoder
Date: Mon May  5 21:43:16 2008
New Revision: 54449

Modified:
   lxml/trunk/   (props changed)
   lxml/trunk/src/lxml/proxy.pxi
Log:
 r4162 at delle:  sbehnel | 2008-05-05 17:43:28 +0200
 cleanup in _copyParentNamespaces()


Modified: lxml/trunk/src/lxml/proxy.pxi
==============================================================================
--- lxml/trunk/src/lxml/proxy.pxi	(original)
+++ lxml/trunk/src/lxml/proxy.pxi	Mon May  5 21:43:16 2008
@@ -203,10 +203,8 @@
                                     c_parent.type == tree.XML_DOCUMENT_NODE):
         c_new_ns = c_parent.nsDef
         while c_new_ns is not NULL:
-            # check if prefix is already defined
-            c_ns = tree.xmlSearchNs(c_to_node.doc, c_to_node, c_new_ns.prefix)
-            if c_ns is NULL:
-                tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix)
+            # libxml2 will check if the prefix is already defined
+            tree.xmlNewNs(c_to_node, c_new_ns.href, c_new_ns.prefix)
             c_new_ns = c_new_ns.next
         c_parent = c_parent.parent
 


More information about the lxml-checkins mailing list