cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [C2]: Patch for XalanTransformer and Caching
Date Tue, 31 Oct 2000 10:29:33 GMT
Carsten Ziegeler wrote:
> 
> > Stefano Mazzocchi wrote:
> >
> > > Or for a flag which turns caching on/off?
> >
> > yep.
> >
> Included is a patch for the XalanTransformer which allows turning on/off the cache using
a configuration in the sitemap:
> 
> <map:transformer name="xslt" src="org.apache.cocoon.transformation.XalanTransformer">
>         <use-cache map:value="true"/>  <!-- true: turns on cache, false: off
-->
> </map:transformer>
> 
> The default is "true", so without a configuration the transformer has the same behaviour
than before.
> 
> > my solution would be:
> >
> > 1) if you use external entities, forget it, the cache will not be able
> > to reload
> Shoudn't this never be cached?

no, this will be cached as if the entity was included "inside" the
document... if you touch the external file it doesn't work.

Yes, I know you could use some SAX events to go around this, but this is
also to force you using XInclude instead of external entities that
require a DTD (and DTDs are bad!!)

> > 2) if you use the XPath document() fuction forget it as well, the cache
> > won't be able to tell if it needs to reload.
> So no caching either, correct?

No, again, it's up to the Transformer implementation to do this, but I
won't concentrate my efforts on providing such touching methods for the
document() function (that, again, you should *NOT* be using!!!)
 
-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------



Mime
View raw message