[XML-SIG] minidom/pulldom connection

Martin v. Loewis martin@loewis.home.cs.tu-berlin.de
Thu, 23 Nov 2000 23:03:27 +0100

>   There is some concern that the minidom implementation does not
> perform as many safety checks as it could; there is a competing
> concern that adding the checks would cause it to be slow.  This seems
> a perfect opportunity to support multiple DOM implementations; one
> that's fast & light and another that's heavier but includes all the
> safety checks.

Indeed, multiple DOM implementations are a good thing. This is in fact
what we have - in minidom and 4DOM.

=46rom the conformance point of view, minidom is *wrong* by not raising
exceptions in appropriate places. However, I doubt anybody fixing this
would start with pulldom.

>   I'm proposing the attached patch to pulldom.  This modifies
> PullDOM.__init__() to accept a Document object as a parameter, and
> changes PullDOM.startDocument() to use that object or create a one
> using minidom if necessary.  This allows all existing client code to
> continue to work unchanged.
>   Objections?  Comments?  Am I just being to weird about this?

I don't see the need to provide this kind of extensibility until
somebody actually wants to implement an alternative minidom on top of
pulldom. However, if this is added now, I'd agree with Mike that it
would be better to support DOMImplementation objects in minidom.