This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
libxslt & apache modules - was - RE: Caching compiled stylesheets
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: libxslt & apache modules - was - RE: [xsl] Caching compiled stylesheets
- From: "Robert Koberg" <rob at koberg dot com>
- Date: Thu, 11 Oct 2001 11:17:59 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
I am in the same boat and looking for documentation and examples. What
language are you using to trigger the transform? I am using perl and
XML::LibXML and XML::LibXSLT (which is a perl wrapper for libxml and
libxslt). I would love to see your code to just get it from a different
angle.
AxKit (these guys made XML:LibXML and XML::LibXSLT) might be what you are
looking for. The site is down right now but you can access it from:
http://217.158.50.178/
Here is a simple script (not for AxKit - an Apache module) that I use:
Question: how do you pass parameters?
---------------------------------------------
package Apache::Transformations;
use strict;
use XML::LibXSLT;
use XML::LibXML;
sub handler {
my $parser = XML::LibXML->new();
my $xslt = XML::LibXSLT->new();
my $source =
$parser->parse_file('/home/gudgeon/sites/master/WEB-INF/tool/config_sites_li
st.xml');
my $style_doc =
$parser->parse_file('/home/gudgeon/sites/master/WEB-INF/tool/site_chooser.xs
l');
my $stylesheet = $xslt->parse_stylesheet($style_doc);
my $results = $stylesheet->transform($source);
print $stylesheet->output_string($results);
}
1;
-------------------------------
hope this helps and hoping for help,
-Rob
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Andrés
> Pedrera
> Sent: Thursday, October 11, 2001 10:51 AM
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] Caching compiled stylesheets
>
>
> Hi everybody,
>
> I'm trying to cache some precompiled stylesheets (before
> aplying to any
> xml), but have not found any info about how to do it. I'm using libxslt in
> apache modules and everything is right but execution time (the process is
> hard to do). I suppose somebody had the same trouble and i'd like
> to know if
> there's a way to save (dump) compiled stylesheets and restore it
> into memory
> afterwards.
>
> Hope somebody can help me. Regards,
>
> -------------------------------------------
> Andres Pedrera
> Ya.com Internet Factory (http://www.ya.com)
> -------------------------------------------
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list