[XML-SIG] Minidom bugs/questions
Martin v. Loewis
Mon, 5 Feb 2001 08:14:15 +0100
> minidom should be fixed to put out an XML declaration, preferably
> with the encoding. This is hardly a burden, and is *highly*
> recommended XML practice.
Certainly. I'll look into that once Guido has committed his patches;
there is also a "pretty-print" patch pending that I'll have to commit.
> > The original idea of minidom was that it should be "minimal"; clearly
> > that has not worked out, so we probably should review it carefully to
> > achieve completeness (with respect to "DOM 2 Core").
> Well, we should think about exactly what makes minidom "mini". It's
> debatable whether it is possible to implement all of DOM Level 2
> core and still be "mini". And what about DOm level 3?
I think the original understanding was that everything that is
"convenience", ie. can be composed from other interfaces, should not
be included. In addition, minidom originally had no DOMImplementation,
you had to know the implementation class names to build a tree.
That approach has failed; people have been contributing bits and
pieces so that what they wanted to use is there. These days, I think
it is mini by only implementing DOM Core. That probably makes it a AA
> Of course if it isn't Level 2 compliant, it needn't do so. I
> wouldn't consider it unreasonable to have minidom L1 only. If users
> want Level 2, they install PyXML or other.
I'd say that this is a matter of internal consistency. Since the SAX
part in Python supports namespaces, the DOM part should do so as
well. That means L2. It also turns out that what I hope is the larger
half of NS support is already in minidom as of Python 2.0, so ripping
it out would not be sensible.
As for supporting L3, following your advice to not do anything until
the spec nears completion is reasonable. If there is any interest,
providing a standard definition for the enumerations (inside Node3)
would be feasible, if the exact version of the draft is documented in