[Python-checkins] CVS: python/dist/src/Lib/xml/dom pulldom.py,1.20,1.21

Fred L. Drake fdrake@users.sourceforge.net
Thu, 22 Mar 2001 20:39:26 -0800


Update of /cvsroot/python/python/dist/src/Lib/xml/dom
In directory usw-pr-cvs1:/tmp/cvs-serv18983/Lib/xml/dom

Modified Files:
	pulldom.py 
Log Message:

When creating an attribute node using createAttribute() or
createAttributeNS(), use the parallel setAttributeNode() or
setAttributeNodeNS() to add the node to the document -- do not assume
that setAttributeNode() will operate properly for both.


Index: pulldom.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/pulldom.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** pulldom.py	2001/03/13 10:50:13	1.20
--- pulldom.py	2001/03/23 04:39:24	1.21
***************
*** 84,91 ****
                      qname = a_localname
                  attr = self.document.createAttributeNS(a_uri, qname)
              else:
                  attr = self.document.createAttribute(a_localname)
              attr.value = value
-             node.setAttributeNode(attr)
  
          self.lastEvent[1] = [(START_ELEMENT, node), None]
--- 84,92 ----
                      qname = a_localname
                  attr = self.document.createAttributeNS(a_uri, qname)
+                 node.setAttributeNodeNS(attr)
              else:
                  attr = self.document.createAttribute(a_localname)
+                 node.setAttributeNode(attr)
              attr.value = value
  
          self.lastEvent[1] = [(START_ELEMENT, node), None]