Re: [xslt] document() source
- From: "Brad Clements" <bkc murkworks com>
- To: xslt gnome org
- Subject: Re: [xslt] document() source
- Date: Thu, 16 Oct 2003 12:17:45 -0400
On 16 Oct 2003 at 10:53, Daniel Veillard wrote:
> Right, it's still basically C code, not python, you have to catch the
> errors, then generate an exception from there might work.
>
I noticed that if my resolver generates an exception, the built-in resolver tries to handle
the URL.
I think it would be better if the exception was "passed up" to the original calling function,
rather than masking it in the resolver and "dropping it".
I'm not sure if this is possible given the current architecture. I'm using xslt.
I think it might be cleaner to say.. the resolver returns a readable() object or a string
object on success. None when the default resolver should be used, and anything else
is an exception. And, if the resolver raises an exception, it should be passed up.
currently I think only a readable (file) object is accepted, which is then read() back into
a DOM object. Interestingly, my resolver has a string and has to use StringIO to make it
a readable file-like object ;-)
If someone says it's possible to propoge exceptions up, I'll submit a patch. I just
couldn't tell if libxml could be told "hey, stop, we're dead, don't create a new exception
there's one pending". I think that'll have to be handled in the external python wrapper,
not libxslt or libxml C code.
--
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
http://www.wecanstopspam.org/ AOL-IM: BKClements
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]