Re: [xml] setting externelEntityResolver on a per-context basis
- From: Lars Oppermann <Lars Oppermann Sun COM>
- To: xml gnome org
- Subject: Re: [xml] setting externelEntityResolver on a per-context basis
- Date: Mon, 02 Jul 2007 20:53:27 +0200
Stefan Behnel wrote:
What we do in lxml is: set a global resolver and have it dispatch to whatever
the _private field in the parser context points to. We actually do a lot more
that way than only resolving external entities, but that's what you can use it
for here.
That's a good solution. I already use the _private field for some other
handlers to get get back to the application (OpenOffice), so there is
already a pointer to a C++ object in there which happens to know about
the specific IO layer, thus this is a really good solution.
I was so wound up into my specific idea about how the entityResolver
should be set on the context that I didn't see the context parameter
that was being passed to the entityResolver function ;)
Thanks,
Lars
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]