[Python-checkins] CVS: python/dist/src/Lib/xml/dom minidom.py,1.28,1.29

Martin v. L?wis loewis@users.sourceforge.net
Sat, 31 Mar 2001 08:30:43 -0800


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

Modified Files:
	minidom.py 
Log Message:
Initialize Attr.value with empty string in createAttribute*, as per DOM
spec. Closes bug #412036.
Also reindent toprettyxml.


Index: minidom.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/xml/dom/minidom.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** minidom.py	2001/03/13 10:50:13	1.28
--- minidom.py	2001/03/31 16:30:40	1.29
***************
*** 88,96 ****
  
      def toprettyxml(self, indent="\t", newl="\n"):
!       # indent = the indentation string to prepend, per level
!       # newl = the newline string to append
!       writer = _get_StringIO()
!       self.writexml(writer, "", indent, newl)
!       return writer.getvalue()
  
      def hasChildNodes(self):
--- 88,96 ----
  
      def toprettyxml(self, indent="\t", newl="\n"):
!         # indent = the indentation string to prepend, per level
!         # newl = the newline string to append
!         writer = _get_StringIO()
!         self.writexml(writer, "", indent, newl)
!         return writer.getvalue()
  
      def hasChildNodes(self):
***************
*** 795,798 ****
--- 795,799 ----
          a = Attr(qName)
          a.ownerDocument = self
+         a.value = ""
          return a
  
***************
*** 807,810 ****
--- 808,812 ----
          a = Attr(qualifiedName, namespaceURI, localName, prefix)
          a.ownerDocument = self
+         a.value = ""
          return a