[XML-SIG] xmllib compatibility
Mon, 3 Apr 2000 13:48:49 +0100
I'm new to the group so my apologies if I am dredging up an old problem.
The ReportLab package (http://www.reportlab.com/ )contains a demo called
PythonPoint, which has an xml language for doing presentation slides and can
convert them to PDF documents, along with fancy presentation effects. I'm
beefing this up, as I want people to use it at the Open Source conference
This currently uses the xmllib in the standard (1.5.2) distribution, so
everyone can get it running. I have two problems:
(1) One of our users complained that this broke when the Python XML package
was installed. He uses Debian, and says that the installer overwrites the
standard Python library xmllib with the one in xml.parsers. Is this
correct? If so, how can it be justified? It seems guaranteed to cause
problems and is not necessary, as the user can choose which xml parser to
(2) Anyway, he would like to use it, and if I can make things compatible I
will do. I tried to change "import xmllib" to "from xml.parsers import
xmllib" and ran the script anyway, and discover that default keywords are no
longer supported. For example, I had a tag like this...
<rectangle x="20" y="510" width="800" height="65" fill="(0,0,1)"/>
...and the defaults for the old parser specified an 'stroke' attribute of
'None', so I did not have to define the stroke for every shape in my XML
file. As far as I can see, xml.parsers.xmllib.Fast/SlowXMLParser no longer
supports default attributes. Is ths correct, or is there just another way
of doing it I have missed?