cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: WoodyTemplateTransformer vs. WoodyGenerator
Date Tue, 10 Feb 2004 11:25:36 GMT
On 10.02.2004 05:00, Mark Lundquist wrote:

>> When using the WoodyGenerator you don't have this separation.  You 
>> only have a form representation at the beginning of the pipeline,
> See, that's just what I don't get!  It sounds like you are saying, "With 
> one way, you the separation of these two aspects, and that is a Good 
> Thing... whereas, the other way it only gives you one of the two 
> things!"  Both of those statements are true, but it seems absurd to 
> connect them like that.  The generator approach has no intrinsic 
> representation of form structure — so, being extrinsic, for structure is 
> certainly "separated" from the elaboration of widget instances which is 
> the only intrinsic aspect.

Yes, I said that (at least I wanted to express this):

The generator puts the form representation without any structure into 
the pipeline, with a stylesheet you have to layout this form.

The transformer starts with a template (the structure) and adds the form 
representation into it (i.e. the woody widget instances).

> Just as it should be when using the transformer, 
> although it is notably not that way with the woody-field-styling.xsl in 
> the 2.1.3 release, which conflates form-independent HTML controls 
> generation with styling.
> So, I don't see that the separation of, uh... things that ought to be 
> separated... :-)  is inherently any better or cleaner with the 
> transformer approach than with the generator approach.

This has been already much improved in the CVS and will be available in 
2.1.4. There you will also find the *5* stylesheets mentioned on the 
Wiki - which I had already updated.

> With the transformer, you need:
>     a) a form template, and
>     b) some stylesheets;
> With the generator, you need:
>     a) the same stylesheets as with the transformer, and
>     b) either another stylesheet to express the structure that would be 
> expressed in the form template with the other approach, or you just fold 
> that into one of your existing stylesheets in (a) (obviously, not the 
> one that generates the HTML control elements, e.g. <input>, <select>, 
> <textarea>...).
> To say it yet another way: one of the stylesheets you need with the 
> transformer approach is very likely project-specific or page-specific 
> enough to build the form structure into; then you don't need the wt 
> template.


> In my application, there's nothing else for me to put into the wt 
> template other than just the wt elements themselves, so it doesn't do 
> anything for me.

To repeat me again: "Nothing really to be prefered over the other I 
guess." So it's just a "it depends" when choosing the transformer or 
generator approach. I guess most of the people are using the transformer 
as the samples are built on it and you have somewhat static. The 
creation process of a HTML form might be more obvious at the end with 
the transformer.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message