Re: [xslt] Sharing common XSL templates in memory



My company is looking at using the libxslt package to do this.  I know this
is a C/C++ approach rather than a command line, but the latter will not let
you do what you want.  It is totally monolithic.

We have a group of templates that we need to apply to a sequence of XML docs
generated on the fly from our database.  The library lets you load
individual templates into memory, parse an XML doc, apply which templates
you want, then retrieve another XML doc and process it without having to
reload the templates.

Bart
barthome1 comcast net
----- Original Message ----- 
From: "Daniel Veillard" <veillard redhat com>
To: "The Gnome XSLT library mailing-list" <xslt gnome org>
Sent: Wednesday, November 30, 2005 3:29 AM
Subject: Re: [xslt] Sharing common XSL templates in memory


> On Tue, Nov 29, 2005 at 04:49:12PM -0800, Jun Zhang wrote:
> > Hi All,
> >
> > We have a web server that uses 2000 XSL files to
> > generate different web pages ---- one XSL file for one
> > web page. Those XSL files share ('include') a lot of
> > common templates in other 1000 XSL files. We are
> > trying to cache the parsed objects (xsltStylesheetPtr)
> > for those 2000 XSL files. Since all the 'included'
> > common templates are having duplicate copies for each
> > of those 2000 XSL files, those objects are too big to
> > cache. I wonder if there is a way for those 2000 XSL
> > objects to share those common templates in memory so
> > the overall memory consumption can be reduced
> > significantly.
>
>   Not possible. The compilation of a fragment will be in context.
>
>  A imports B
> B defines and use a variable foo
> A redefines the variable foo
>
> You can't compile B in isolation and then try to merge it in A.
>
> Daniel
>
> -- 
> Daniel Veillard      | Red Hat http://redhat.com/
> veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt gnome org
> http://mail.gnome.org/mailman/listinfo/xslt



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]