[XML-SIG] Accessing internal entities with minidom or 4DOM

Martin v. Loewis martin@v.loewis.de
22 Jul 2002 22:21:07 +0200


"Phil Glaser" <StillSmallVoice@DirectvInternet.com> writes:

> Ok, I see the problem. But according to the spec I should at least have
> read-only access to the internal subset. The existence of minimdom's
> internalSubset property lead me to believe that I should be able to do this
> at least with minidom, but that maybe I'm doing something wrong in my code.
> Or are you saying that this particular DOM Level 2 interface is not yet
> implemented in either minidom or 4DOM?

That's what I'm saying, yes. Part of the problem is that both minidom
and 4DOM builders use DOM API most of the time to build the DOM tree -
so they can't do things that couldn't be done through the public API.

In particular, if you look at the minidom implementation, there is
simply no way to create a DocumentType that has a non-empty
internalSubset attribute: you can't pass it to __init__ (because it
accepts no such argument), and you can't modify the resulting
dictionary (because it protects itself agains modification).

Again, if you need such capabilities, it would be best if you
implement them, and contribute your changes.

Regards,
Martin