[XML-SIG] minidom changes & additional modules

Fred L. Drake, Jr. fdrake@acm.org
Fri, 15 Feb 2002 10:33:21 -0500

Martin v. Loewis writes:
 > Please do; this all sounds very reasonable. I think the most
 > controversial one is
 > > Building a minidom DOM builder directly on top of pyexpat allows us to
 > > avoid about a third of the overhead, and such an implementation can be
 > > based on some code I wrote for the "Parsed XML" product for Zope.

I wasn't expecting this to be controversial!

I was expecting the removal of the Node.__init__() method to be
controversial since it makes it more difficult to debug leaks, which
are still good to catch since minidom uses an explicit unlinking
step.  (I've had a few thoughts about how to make that less painful,
but that doesn't help the performance story.)

 > The issue here is that there are atleast three competing such
 > implementations: xml.dom.ext.reader.PyExpat.Reader,
 > Ft.Xml.pDomlette.PyExpatReader, and your ParsedXML reader, so the
 > question is which one to use.

I'm sure the compatibility code can be written without a lot of
difficulty; I'll take a look at that soon (probably this weekend).

 > Mike Olson is interested in dumping pDomlette in favour of minidom,
 > but that would require that there is a pDomlette compatible reader.

One nice thing about the DOM 3 Load interface is that it can be used
to do just about anything reasonable while loading a document.

 > We could probably still use the API and implementation you've been
 > designing (especially since it appears to follow DOM Level 3); hoping
 > that we can provide the 4Suite-style reader API on top of that.

Since "designing" means "substantially complete implementation", I
glad you think it'll be useful.  ;-)

 > The one feature that Mike wants to see in the reader is optional
 > XInclude support; it should be possible to incorporate that from
 > 4Suite once you have committed your changes.

That would be cool!

Another thing that would be good to support is xml:base; I'm not sure
what others have done for that, if anything.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation