[XML-SIG] Re: Using xmlproc to validate

James Kew james.kew@btinternet.com
Tue, 25 Mar 2003 20:33:13 -0000


"Martin v. L÷wis" <martin@v.loewis.de> wrote in message
news:m3wuiogwvx.fsf@mira.informatik.hu-berlin.de...
> Albert Chin <xml-sig@thewrittenword.com> writes:
>
> > I'd like to install a custom handler to set the path or open file
> > handle of the external DTD specified in my XML file using xmlproc. How
> > do I do this?
>
> If you use SAX, installing an EntityResolver should be sufficient.

It's not, though, for the validating parser -- you can install an
EntityResover, but it won't be called -- hence the SF bug report.

> > EntityResolver is in the Todo list for drv_xmlproc.py so I guess the
> > setEntityResolver method is not an option (and, looking at SF, bug
> > #609590).
>
> You could, of course, investigate the problem and propose a patch. It
> is extremely unlikely that anybody else does in the near future.

Nudge received.

I don't have a formal patch, but I do have some code at work that fixes up
drv_xmlproc.XmlprocDriver at runtime so that it does correctly call
EntityResolver. I'll dig it out tomorrow.

Should be fairly straightforward to turn into a patch.

--
James Kew
james.kew@btinternet.com