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/


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