Return-Path: Delivered-To: apmail-xml-cocoon-docs-archive@xml.apache.org Received: (qmail 22169 invoked by uid 500); 2 Aug 2002 15:56:51 -0000 Mailing-List: contact cocoon-docs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-docs@xml.apache.org Delivered-To: mailing list cocoon-docs@xml.apache.org Received: (qmail 22158 invoked from network); 2 Aug 2002 15:56:50 -0000 Received: from mail.didax.com (216.5.214.162) by daedalus.apache.org with SMTP; 2 Aug 2002 15:56:50 -0000 Received: by cnmail with Internet Mail Service (5.5.2656.59) id ; Fri, 2 Aug 2002 11:51:47 -0400 Message-ID: <911C684A29ACD311921800508B7293BA0221DC7E@cnmail> From: Geoff Howard To: "'cocoon-docs@xml.apache.org'" Subject: RE: Generator How-To Date: Fri, 2 Aug 2002 11:51:47 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2656.59) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: I see your point - hide the source of those parameters from the generator, which ultimately shouldn't care where they came from. I think that I may progress to that example rather than jump to it right off. My personal feeling as I get my mind around Avalon/Cocoon is that the good abstracted architecture often has the unfortunate effect of making everything seem more confusing and mysterious to beginners than it really is (just like EJB). Given that many people reading this tutorial may be completely new to Cocoon, SAX, and Avalon - that's a lot to swallow all at once. One question: In your sitemap example implementing the parameter, I'm not clear on the best way to get at multiple parameters that way - say, ?param1=foo¶m2=bar would something like this work? Geoff > -----Original Message----- > From: Jens Lorenz [mailto:jens.lorenz@interface-projects.de] > Sent: Friday, August 02, 2002 6:12 AM > To: cocoon-docs@xml.apache.org > Subject: Re: Generator How-To > > > ----- Original Message ----- > From: "Geoff Howard" > To: > Sent: Thursday, August 01, 2002 10:00 PM > Subject: RE: Generator How-To > > > > Sure. Here you are - comments welcome. > > > > Geoff > > Geoff, > > > From what I can see, you are proposing to access the Request > from the Generator directly. > > I think your (really good) How-To should discuss the difference > between (Avalon) Parameters and directly accessing the Request. > I feel this is important so that Cocoon is extended the way it > is meant to be. The last word on this, should of course have some > Cocoon developer. > > So, what am I talking about ? I assume you want to access the > Request in order to send your Generator some parameters. While > this is a possible way, a much better one is to make your > Generator implement Parameterizable and get Parameters from there. > To send Request parameters to your generator you just write > something like this within your sitemap: > > > > > > > > or something similar. With InputModules you can then get > parametervalues for your Generator out of the Request, Session > or Database without having to touch your Code of the Generator. > And even better the name of the Request-Parameter can be something > else or could be just a Pointer into a Database where the value for > Generator-Parameter is. Short: You don't mix Request-Parameters > with Generator-Parameters. > > The only Generator which has to access Request directly is > the RequestGenerator. > All other should take the detour via sitemap in order to be > more flexible. (runtime performance should be hardly affected by this) > > > I hope this mixture of Cocoonian and Avalonian was understandable. > > > > Jens > > -- > > jens.lorenz at interface-projects dot de > > interface:projects GmbH \\|// > Tolkewitzer Strasse 49 (o o) > 01277 Dresden ~~~~oOOo~(_)~oOOo~~~~ > Germany >