On Tue, 7 Oct 2003, Sylvain Wallez wrote:
> 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="[EMAIL PROTECTED]"/> > > <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. Yes, but the problem is that the output of the JXTemplate is high dynamic, and isn't cachable, so I make most of transformations before like i18n and some other. There is also some other thing, the newest jvm are optimized to dispatch great numbers of small classes, like the classes, which be used to store the events. Stephan.