> Hello, We have around 800 xslt files and we are trying to compile all
> stylesheets and retain them for later usage through a service running, so
> we cannot afford to compile stylesheet when we need because of
> performance. Q1 To retain compiled stylesheets , do I need to create 800
> transformers and retain all the transformers or create one transformer and
> then call compileStylesheet() 800 times and retain stylesheets in my
> memory ? Q2 If the answer of question no 1 is to create one transformer
> and 800 stylesheets , do I need to create new transformer to call
> transform() function and pass stylesheet which I saved in the memory or
> should I use the existing transformer that I mention in Q 1 taken in the
> account, this transformer will own 800 stylesheets.  
> Note:   "Not to compile the same stylesheet over and over if we have to
> re-use many times."  What is the best way of achieving this
> ? RegardsAjay 
Ajay,

It is possible to use a single instance of the Xalan Transformer to
compile multiple XSLT stylesheets and make them available for
repeated use against incoming XML documents.  Note that when you terminate
the Xalan Transformer, any parsed documents and compiled XSLT transforms
will become unusable.

I've been looking at how to capture compiled XSLT transforms into storage
outside of the virtual process address space.  Since you have a large number
of XSLT transforms, I hope that virtual address space won't be an issue.

Steven J. Hathaway

Reply via email to