* Mark Lundquist <[EMAIL PROTECTED]> [2004-02-05 07:19]: > OK, I am just learning Woody for the first time. The wiki docs are > most helpful.
I am going through the same experience. I am recording my impressions and discoveries in my web log: http://engrm.com/ We should chatter about our experiences on list. Our back and forth might produce some documentation. There is plenty of documentation on Cocoon, but I'm finding that there are a lot of dead ends as well. In fact, my most recent entry discusses this. > "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... My pipelines look like this: <map:match pattern="hello-world-display-pipeline"> <map:generate src="forms/view/hello-world.xml"/> <map:transform type="woody"/> <map:transform type="xslt" src="stylesheets/application/web.xslt"> <map:parameter name="base-link" value="."/> </map:transform> <map:serialize type="html"/> </map:match> I know nothing of a WoodyGenerator. > "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? I am building my own widget stylesheet. I include it in my page stylesheets. The templates match using apply-templates. You do not need to call them explicitly. I make a lot of use of the mode attribute to template and apply-tempaltes. Have you started playing around with this? Using include and the mode attribute I'm getting some pretty impressive resuse and modularization in my stylesheets. > 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. Nor do I. Documentation for WoodyGenerator is thin. It looks to me like a WoodyGenerator is a way to stream an object of type org.apache.cocoon.woody.formmodel.Form. How you get your hands on one of those in your pipeline is a mystery to me. The above pipeline works very well for me. -- Alan / [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
