cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [RT] Virtual components and JXTemplate
Date Tue, 07 Oct 2003 08:55:49 GMT
Stephan Michels wrote:

>Just another thought,
>
>I noticed that the JXTemplateGenerator/Transformer implements both
>contracts: generator and transformer. It should be easier to
>implements this component as transformer, and offer this transformer
>also as virtual generator.
>
><map:transformer type="jx"/>
>
>and
>
><map:virtual>
> <map:generator name="jx">
>  <map:generator name="file" src="{@src}"/>
>  <map:transformer name="jx"/>
> </map:generator>
></map:virtual>
>
>I should mention that I already rewrote the this components to be a
>transformer only, but only for the xpath syntax. If thers is any
>interest I could commit it.
>  
>

AFAIU, the use of JXTemplate as a generator allows the template to be 
pre-analyzed and stored into the cache, thus allowing a greater 
performance. This cannot be achieved with the transformer.

There are use cases where templates are dynamically computed. In these 
cases, you can either use the JXTemplate transformer or use the 
generator with a cocoon: source. In that latter case, you also benefit 
of the fact that the cocoon: source may be cached as well.

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -  http://www.orixo.com



Mime
View raw message