[cxml-devel] DOM classes not exported?

David Lichteblau david at lichteblau.com
Sun Aug 20 12:35:06 UTC 2006


Quoting Sunil Mishra (smishra at sfmishras.com):
> I want to be able to refer to the types present in the DOM IDL
> definitions in the DOM Core2 definitions. However, classes such as
> element and node are not present in the DOM package, let alone be
> exported from that package. Is this intentional? Can you recommend a
> reliable way of defining methods specialized on the different DOM classes?

Oh well, an old topic.  I never was quite sure what to do here.

I used to think that exporting these classes would be the wrong thing to
do, because it restricts the DOM implementation to use CLOS internally.
It would be perfectly possible to implement DOM with structure classes
instead, or even some other non-object-oriented data structure, leaving
dom:node-type as the only way to distinguish between different nodes for
users.

However, the patch I once wrote to use structure classes instead of
standard classes did not seem to make DOM faster or anything.  Perhaps
it is time to revisit this decision.


So.  What I done now (checked into cxml CVS) is to add "interface"
classes under exported names like dom:node (which rune-dom::node and
utf8-dom::node both inherit from).  All DOM interfaces are included
except DomImplementation and NodeList.

However, I still consider this to be a kind of "undocumented" feature
for now...


Please test!

d.



More information about the cxml-devel mailing list