[Distutils] [XML PyXML-0.7-1] fix to demo/dom/generate_xml1.py

Eric Boix frog@creatis.insa-lyon.fr
Thu Feb 7 13:36:01 2002


	Hi,

	Apparentrly the demo/dom/generate_xml1.py is broken:
Traceback (most recent call last):
  File "PyXML/demo/dom/generate_xml1.py", line 17, in ?
    doc = implementation.createHTMLDocument('', 'mydoc', dt)
TypeError: createHTMLDocument() takes exactly 2 arguments (4 given)

	I could have it running with the following changes :

----------------------------------------
   doc = implementation.createHTMLDocument('', 'mydoc', dt)
---
>     doc = implementation.createDocument(None, 'mydoc', dt)
23c18
<     new_elem = doc.createElementNS('', 'spam')
---
>     new_elem = doc.createElementNS(None, 'spam')
26c21
<     new_elem.setAttributeNS('', 'eggs', 'sunnysideup')
---
>     new_elem.setAttributeNS(None, 'eggs', 'sunnysideup')
38,39c33,34
<     import xml.doc.ext
<     xml.doc.ext.Print(doc)
---
>     from xml.dom import ext
>     ext.Print(doc)
----------------------------------------

Am I correct or am I missing something ?


I also was unable to run an Aspn Python Cookbook XML example 
(http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52242)
because I hit the bug registered with request ID 510080, see
 http://sourceforge.net/tracker/index.php?func=detail&aid=510080&group_id=6473&atid=106473

Any one with a work around or fix on this ?

	Yours,
	Eric Boix

Creatis : Medical imaging lab
http://www.creatis.insa-lyon.fr/~frog