[XML-SIG] Re: xmlproc, SAX and EntityResolver

Lars Marius Garshol larsga@ifi.uio.no
24 Jan 1999 22:14:23 +0100


* uche ogbuji
| 
| [reporting of external DTD subset and external parameter entities]
|
| This no longer appears to work in xml-0.5.  Unfortunately, my
| current code it pretty complex, and I first of all want to make sure
| this wasn't an intentional change.  I'm pretty sure I've narrowed it
| to xmlproc, but if I'm told this should _not_ be so, I'll work on a
| stripped-down test-case.

As I recall, you fixed the reporting of the external DTD subset in
xmlproc (the version in xml-0.5). However, you didn't do it correctly,
so in my development code I have the correct patch (which is not
released yet).

Adding this to drv_xmlproc.py should do the trick for the external
subset:

    def resolve_doctype_pubid(self,pubid,sysid):
        return self.ent_handler.resolveEntity(pubid,sysid)

This will not affect external parameter entities. If you need those as
well, let me know. They will be reported by 0.60, but that may still
be a couple of weeks into the future.


A worse problem is that, as Paul pointed out, Python SAX
EntityResolvers return the system identifier of the entity rather than
an object from which the entity contents can be read. I intend to fix
this when we release SAX 2.0 unless someone screams loudly.

--Lars M.