On Feb 9, 2004, at 6:14 PM, Joerg Heinicke wrote:

When using the WoodyTransformer you separate the widget and page styling from the page structure. The latter one is the form template and provides the structure of the form.

That's what the docs say, but...

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.

but you must bring structure into it,

I would say rather that you must bring that form representation into a structure...

i.e. you need a form specific template that transforms the pure form description into form description + layout.

Exactly... just as you do with the transformer. With the transformer, the form-specific template is a document containing <wt:...> elements to be replaced. With the generator, on the other hand, the form-specific template is an XSLT stylesheet. The generation of HTML controls is of course not form-specific, and so it should be done in a separate stylesheet (although that could be imported/included by the form-specific stylesheet, or it could be a separate transformation stage in the pipeline). 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.

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.

Best regards,
Mark

Reply via email to