cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: A template transformer
Date Wed, 17 Nov 2004 15:54:05 GMT
Jonas Ekstedt wrote:

>I have created a template transformer similar to JXTemplate and wondered
>if you would be interested in it.
We had discussions at the list about template languages half a month ago 
did you read that?

The conclusion was IIRC, that we like JXTG but not it's implementation 
(to large and scary) and that we need the ability to add custom tags. 
The implementation would be easier to follow and more reusable if the 
object model was factored out (using Carsten's TemplateObjectHelper), 
factoring out the expression language and possibly make it plugable and 
writing the tags as custom tags.

We don't want to complicate life for the users (and ourselves) by differ 
from JXTG whithout very good reasons, and in that case we should 
deprecate the things that we don't like. So the "new" template generator 
should include the JXTG tags.

Looks like that is close to what your taglib does, so it could certainly 
be interesting for us.

>The TemplateTransformer was based very much on how the TagTransformer
Some questions to make it easier to evaluate how your implementation is 
related to other approaches:

Can you compare it with the TagTransformer and explain why you didin't 
build on that?

Have you looked at Jelly. Now Jelly's implementation doesn't seem to fit 
very well into Cocoon, but the way you write tag libs in it seemed neat 
to me. Did you compared your approach to that?

What about caching? In JXTG and Jelly IIUC, the template is "compiled" 
to an internal data structure that use as long as the template isn't 
changed. The main point is that expression compilation and xml parsing 
can be avoided in the sequel. I don't know how much time that is saved 
by doing this instead of interpreting the template every time. Anyway, 
are you doing something like that or would it be worthwhile and easy to add?


Anyway, thank you for your contribution!


View raw message