Going through http://wiki.cocoondev.org/Wiki.jsp?page=WoodySample, I encountered the subject of Woody form templates. The first thing I thought was that this approach seems kind of pull-y and not very Cocoon-like. I have to enumerate each of the widgets individually in this template. I thought "hmm, why isn't there XML for the form, for me to push through a stylesheet?"
Then I read in the WoodySample document: "As an alternative to the template approach, you could also use the WoodyGenerator, which will generate an XML representation of the whole form, and style that with a custom-written XLST."
Ah — just what I was looking for.
But then I read, "Using the Woody template transformer is much easier though."
Hmm, why would it be much easier? It doesn't seem like it should be that much easier...
Then I ran across the WoodyIntro version 7 (http://wiki.cocoondev.org/Wiki.jsp?page=WoodyIntro&version=7), which explains "The WoodyGenerator generates a complete XML representation of the form, which will then have to be styled by an XSLT. This XSLT will be specific for that form, but could import a library-XSLT that has templates for formatting individual widgets."
Well — doesn't the output of the template transformer need the same kind of styling, to translate elements in the 'wi' namespace to HTML? And would that not be done using woody-samples-styling.xsl? And is that not the very "library-XLST etc." whereof it was spoken in the WoodyIntro v.7 doc? In reference to the styling needed by the output of the template transformer, the WoodySample doc says: "This XSLT only has to handle individual widgets, and not the page as a whole, and is thus not specific for one form but can be reused across forms." Well yes, but then the template was form-specific in the first place, and arguably it was more laborious to have to call out each widget than it would be to match them in using <xsl:apply-templates>, isn't it?
http://wiki.cocoondev.org/Wiki.jsp?page=WoodyTemplateTransformer has this to say: "If you prefer to do everything with XSLT, you have also the option of using the WoodyGenerator. In general we recommend to use the woody transformer though." Why is the transformer approach recommended over the generator approach? I don't get it.
Thanks for any illumination, ~ml
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
