-----Original Message-----
From: Ted R. Rice
Sent: Wednesday, May 09, 2001 8:15 AM
To: 'Orion-Interest'
Subject: RE: Caching XLS style sheets

in actuality, caching pre-compiled stylesheets and then
using them repeatedly is very possible and you will see
large performance gains via this mechanism.
 
in terms of applying the XSL, the general model is to
create JSP Pages which produce XML content and
have this content either be handled by a JSP Tag
Extension, which you place inside the JSP Page, or
a Servlet set up as content filter for all XML Content.
The Servlet method is only available in spec 2.3
 
However, regardless of the implementation, caching
can be performed by static cache shared across all
instances of your object. When a JSP Page
is processed, you can generate a unique key for
this page based upon the servletPath(i.e., request.getServletPath())
and user-Agent header in the request (only applicable if applying
different XSL stylesheets for different browser agents).
Once you exctract the appropriate XSL Stylesheet
from the XML and compile it, you can cache the compiled version using
the generated key. In our case what we cache is a
Saxon TransformManager.
 
Then, using the dynamic content generated by the JSP Page, you
can always look up and apply the pre-compiled style-sheet
for the unique JSP Page - Browser Agent combination. Please note,
the stylesheet is compiled and cached in a lazy manner, meaning
it is done the first time a request for a particular stylesheet is made.
This could easily be retrofitted to build all needed stylesheets at
startup.
 
hope that helps.
 
Ted
-----Original Message-----
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
Sent: Sunday, May 06, 2001 5:55 PM
To: Orion-Interest
Subject: Caching XLS style sheets

I asked a question on an MVC application architecture using XLS, and got advice to cache XLS / XSLT style sheets, and pre compile them.
 
Can someone give me some more background on this.
How?
What if the content is dynamic? (2 million items and 100,000  of styles + with any combination)
 
Thanks in advance,  
Vic

Reply via email to