Hi,

We have a problem simular to this.

We are creating the xml in perl which is then passed to the Sab parser along
with an xsl file to be parsed.

The situation is then that :

"xsl:include" which are contained in the xsl are meant to include the
external file.

Sab processes the "string", not the file.

Sab can only process one string, not the file, so you can't have one string
containing "xsl:include" for another string in another file.

ie process (xml, xsl) means that the xsl can only be one string and cannot
contain refernces to other strings

You can't even reference another string by using the documet() command.

Previously we have been doing this successfully using XT and also Xalan, but
have moved to Sabletron to take advantage of the significant speed gains
involved in a C++ parser

Can anyone give some advice on how to acheive this?

Tim Watts
(and with help in trying to describe this problem - the Perl/XSL legend
here - Dong Cheng)



-----Original Message-----
From: Tom Kaiser [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 10 March 2001 4:34 AM
To: Sablotron Mailing List
Subject: Re: [Sab] xsl:include



Thomas,

you can register a 'scheme handler' for this purpose; see the
documentation in shandler.h. This handler gets all requests for URIs
whose schemes are not the internally handled 'file' and 'arg'.

Hope this helps,
Tom Kaiser

Thomas Bopp wrote:

> Hello!
>
> I have the problem, that my xml/xsl content comes from a database.
> It seems like xsl:include does only work on the filesystem though. What
> I
> would like to see is some kind of callback function that reads the
> included
> stylesheet from the given URI. So something like this would work:
>
> sablot->set_uri_callback(func);
>
> string func(string uri) {
>   [...]
>   return stylesheet-content-corresponding-to-uri;
> }
>
> Or is this already possible ?
>
> ---Thomas
>
>

Reply via email to