[XML-SIG] Minidom bugs/questions
Wed, 07 Feb 2001 13:09:57 -0800
"Martin v. Loewis" wrote:
> > .
> > 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
First, would implementing DOM core include entities, notations, document
types, entity references etc.? If so, I think you're increasing the
conceptual load quite a bit.
I also originally wanted minidom to be readonly but yes, that has gone
> [supporting namespaces]
> > 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.
I put off namespace support as long as I could trying to keep it simple.
The tricky part of doing namespaces "right" is doing movement of nodes
across namespace boundaries right. You've got issues of prefix clashes,
element type renaming and so forth.
Having proper namespace support would not be trivial. I admittedly
should have not have started adding any namespace support at all until I
had figured out the end-game...is it too late to go back and make it
readonly again? :)