[lxml-dev] Custom resolvers vs. RelaxNG?
Stefan Behnel
stefan_ml at behnel.de
Sun Jul 15 17:17:34 CEST 2007
Mike Meyer wrote:
> Should custom resolvers work with Relax NG documents?
They should, yes, but they can't currently (as of libxml2 2.6.29). libxml2
parses includes out of context. It passes neither the original parser options
nor any kind of reference to the original document on to the parser used for
parsing the imported document. Instead, it calls a plain "xmlReadFile(URL,
NULL, 0)". So it's impossible for lxml to figure out which resolver to use.
The same applies to XMLSchema, BTW. It creates a new parser context
internally, but forgets to pass on the private context from the original
document. Bad luck.
I'll file a bug report on libxml2.
Stefan
More information about the lxml-dev
mailing list