[XML-SIG] replace ENTITY_NODE ?

Jürgen Schmidt scjuonline@web.de
Tue, 1 Oct 2002 18:12:25 +0200


>> The first problem I face is that ENTITY_NODEs wont show up im my
>> DOM-Document if I use Reader.fromStream(...).

>In general, processing of the DTD is very weak in the DOM; it is
>particularly weak in PyXML, and very weak in PyXML < 0.8.1.

>What version have you been using? What XML parser?

I'm using version 0.8 of PyXML.
And the parser is chosen by the Reader class. I tried validating and
non-validating, so it should be pyexpat and xmlproc.
First I tought, an ENTITY Node could be created through the callback
function of the EntityResolver : resolveEntity of SAX. But this function
is called only for external entities,
right? And the DTDHandler functions aren't called neither for the
entities I'm intersted in.

Are there other solutions to build a DOM -tree than using SAX API?
Or is the native parser interface the solution?

>> The second: will I be able to replace this Node once it shows up or
>> is it read-only?

>In the DOM, the entities attribute of the DocumentType interface is
>readonly, see

>http://www.w3.org/TR/2002/WD-DOM-Level-3-Core-20020409/core.html#ID-412
266927

>Editing an individual Entity is not supported, either.

>Of course, when you come up with patches to PyXML that go beyond those
>specified interfaces, in a canonical way, without breaking anything,
>we'd happily include those in PyXML 0.8.2.

As I stated earlier, I just started using Python and using all its XML
extensions. I'm still on the surface ;-)
Thanks for your help!

Regards,
Juergen