Re: [xslt] document() source
- From: Thijs van der Vossen <thijs vandervossen net>
- To: xslt gnome org
- Subject: Re: [xslt] document() source
- Date: Thu, 16 Oct 2003 16:04:24 +0200
On Thursday 16 October 2003 15:26, you wrote:
> On Thu, Oct 16, 2003 at 03:13:37PM +0200, Thijs van der Vossen wrote:
> > Currently I am trying to find a way to have the xslt document() function
> > get xml from other sources than the filesystem when using libxslt from
> > Python.
>
> ftp and http should work as they are provided by default within libxml2
Sorry, I was not specific enough here. I have a database system and strings
with xml data I would like to use as a source.
> > Does anyone have any idea how to register I/O handlers or another way to
> > have the document() function get xml for other sources?
>
> have you read the libxml2 examples in libxml2/python/tests especially
> resolver.py ?
Thanks. I have now and it cleared up things considerably. Writing a custom
entity resolver and registering it with libxml2.setEntityLoader() works fine.
Is it possible to write an custom entity resolver that tries to call the
libxml2 default entity resolver first, falling back on custom code when that
fails to load the external entity? When an external entity cannot be loaded I
get a warning message on stdout, but it looks like no Exception is triggered.
I also have no idea what the default entity resolver looks like or where it
is defined in libxml2 of libxml2mod
Maybe it would be better to have the custom entity resolver work with a
specific uri scheme only, letting the default entity resolver handle the
others?
Regards,
Thijs
--
Fingertips __ www.fngtps.com __ +31.(0)20.4896540
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]