[lxml-dev] Failure with custom resolvers and relative xsl:import
Stefan Behnel
stefan_ml at behnel.de
Tue Aug 19 12:26:38 CEST 2008
Sidnei da Silva wrote:
> Yes, HTTPS and I'm also using code that handles caching. So, I overly
> simplified here. I actually use something that resembles urlopen but
> that might return an open file handle (or something that resembles a
> file, like a StringIO) if the requested url is cached locally.
If you return a custom object, you can give it a "filename" attribute or a
"geturl()" method (as provided by urlopen() 'files'). lxml will recognise
at.
A StringIO object can't pass on its filename or source URL, so you have to
provide a meaningful base_url from your resolver in this case.
Stefan
More information about the lxml-dev
mailing list