You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Markus Meissner <mm...@meissner.IT> on 2003/05/31 11:45:26 UTC

Caching XSLT-results

Hi,

I am using XSLT now over two years and I am getting some performance-problems 
in the last weeks. I have build a (html)-page with a lot of XML data (a FAQ) 
which should be maintained by a non-technical from an application. The data 
will change about 1-2 times in a week. The problem is that the page should 
contain personalized data such as "You are logged in as Joe Doe" which is 
user-dependet and will change within every request.

-> I am searching for a solution where I can "cache" the generated HTML-data 
of the FAQ (genereated by XSL+XML) and a dynamic part which changes every 
request. Building the hole page within a frame is no solution and the FAQ is 
only an example.

It would be great if anyone could give me a hint how to build such a page with 
XSL/XML.

-- 
Best regards Markus Meissner


Re: Caching XSLT-results

Posted by Markus Meissner <mm...@meissner.IT>.
On Saturday 31 May 2003 16:13, Martin Gainty wrote:
> Windows has such a registry parameter
> Take a look at
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/ht
> m/otherimprovements_8oyv.asp
> which details the size paramater for XSL Cache
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SQLXML3\XSLCacheSi
> ze

Thanks for the answer Martin, but I use xalan with Linux, so I can't use any 
Microsoft helpers.

Any other ideas?

-- 
Beste Gruesse / Best regards Markus Meissner


Re: Caching XSLT-results

Posted by Martin Gainty <mg...@hotmail.com>.
Markus
Windows has such a registry parameter
Take a look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm
/otherimprovements_8oyv.asp
which details the size paramater for XSL Cache
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\SQLXML3\XSLCacheSiz
e
Hth,
Martin
----- Original Message -----
From: "Markus Meissner" <mm...@meissner.IT>
To: <xa...@xml.apache.org>
Sent: Saturday, May 31, 2003 5:45 AM
Subject: Caching XSLT-results


> Hi,
>
> I am using XSLT now over two years and I am getting some
performance-problems
> in the last weeks. I have build a (html)-page with a lot of XML data (a
FAQ)
> which should be maintained by a non-technical from an application. The
data
> will change about 1-2 times in a week. The problem is that the page should
> contain personalized data such as "You are logged in as Joe Doe" which is
> user-dependet and will change within every request.
>
> -> I am searching for a solution where I can "cache" the generated
HTML-data
> of the FAQ (genereated by XSL+XML) and a dynamic part which changes every
> request. Building the hole page within a frame is no solution and the FAQ
is
> only an example.
>
> It would be great if anyone could give me a hint how to build such a page
with
> XSL/XML.
>
> --
> Best regards Markus Meissner
>
>

Re: Caching XSLT-results

Posted by Joseph Kesselman <ke...@us.ibm.com>.



>I am searching for a solution where I can "cache" the generated HTML-data
>of the FAQ (genereated by XSL+XML) and a dynamic part which changes every
>request. Building the hole page within a frame is no solution and the FAQ
is
>only an example.

I don't think we have an automated way to do this right now.

One solution would be to change your stylesheet so that rather than
outputting the result document directly, it outputs a new stylesheet, in
which the unchanging information is literal result elements and only the
information which actually chages is accessed with XSL instructions. (See,
for example, http://www.w3.org/TR/xslt#result-element-stylesheet).  You
would then run that generated stylesheet as your "production" code,
providing it with a source file that reads the sections which actually
change. Essentially, you'd be "compiling" the static portions of your
stylesheet into literals.

(If you need an intro to the concept of using stylesheets to
generate/tranform other stylesheets, my two-part article on developerWorks
might be helpful;
http://www-106.ibm.com/developerworks/xml/library/x-styless1/ and
http://www-106.ibm.com/developerworks/xml/library/x-styless2/)


______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk