cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Sahuc <>
Subject Re: Xalan compiled stylesheets
Date Thu, 07 Sep 2000 13:12:49 GMT
Sylvain Wallez :

> Hi cocooners

> I noticed that Xalan can use precompiled stylesheets with StyleSheetRoot
> objects. Cocoon's XalanTransformer doesn't use this feature which could
> speed up processing of frequently used stylesheets.

Well XalanTransformer already use stylesheetRoot, however the instance is 
not cached to the store, explaining your quote.

> I'm not fluent with transformers and cache management, so can anybody
> give me a hint on how to implement a CachingXalanTransformer that could
> cache compiled stylesheets ?

If you look at XTtransformer (transaformation package) you'll see how the 
XTProcessor (equivalent of StyleSheetRoot for XT processor) is cached 
into the 'store' component, and how it is retrieved back for upcoming 
call. You'll notice espacially the cloning step which is mandatory. 
Indeed XTProcessor is Thread safe, but not reetrant, so the same instance 
of XTProcessor cannot be used by more than 1 thread. 

Concerning Xalan, I saw that Stephano started implemented the caching 
mechanism, but Giacomo catched an issue that would prevent the cache from 
working. Don't remember what was the problem though.

All the best,


> Thanks
> -Sylvain

View raw message