[XML-SIG] Python DOM Unification -- level
Fred L. Drake
Fred L. Drake, Jr." <email@example.com
Tue, 27 Apr 1999 11:47:28 -0400 (EDT)
Mike Olson writes:
> Node, no, but NodeList and NamedNodeMap are just containers and I see no
> reason why a client should not be able to create them.
> Maybe they are doing some post processing ontop of the DOM but want to
> keep a DOMish interface. Then they will need to create NodeLists and
> NamedNodeMaps to repackage nodes.
Do you think this would be doable in a way portable across DOM
implementations? I've not looked at 4DOM (even though I intended to
;), so I don't know how much it differs from PyDOM under the hood. I
would expect that if building these is important, factory methods
should be created on the Document object in the same way that there
are factory methods for elements, etc.
It's not that I object to having the classes available, it's that I
don't see any requirement that they be available or that different DOM
implementations share the implementation, even as a base class.
I'm not convinced of Andrew's claim that having Node available for
type tests would be useful, either. ;-) That would also make it
difficult to create an all-C implementation of the DOM. (No, I don't
have one in the works.)
Fred L. Drake, Jr. <firstname.lastname@example.org>
Corporation for National Research Initiatives