![](https://secure.gravatar.com/avatar/1833d9a7642a05ddea0d27de72be2e2b.jpg?s=120&d=mm&r=g)
Hi, Sidnei da Silva wrote:
I was looking at the XInclude functionality and noticed that it does use the 'resolvers'. Is that a missing feature or it just can't be done at all?
It's rather hard to do with the current libxml2. The way it works with parsers is: we create a libxml2 parser context and store a pointer to the Python resolver context in it, which allows us to call the resolvers from the C code when requested. libxml2's XInclude API does not allow us to modify the parser context it uses, so there is currently no way to hand the resolvers over to the lookup function. When the custom lookup function of lxml is called from the XInclude code, we just can't figure out if there are any resolvers to call at that point. We could consider using something like thread contexts to store the resolvers, but that should uglify the way it's currently done and I don't know if we'd get into trouble in other places. So I currently do not consider it worth the effort. Stefan