> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 13, 2001 5:52 PM > To: [EMAIL PROTECTED] > Subject: RE: Help: VelocityAggregator + Component approach to pages > > Thanks for the response Nicola > > > -----Original Message----- > > From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] > > > > > Since each component is a pipeline I assume they will be > > cached (does > > anyone > > > knows otherwise?) > > > > In a recent mail: > > <Vadim-Gritsenko e-mail="[EMAIL PROTECTED]"> > > Regarding XSP page caching, you need to define couple of methods. Read > > on about caching of XSP in the thread: > > http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=100142724706511&w=2 > > </Vadim-Gritsenko> > Ta - will do. > > > > However, I'd rather use Velocity to do the aggregation than > > XSLT as I > > think > > > it's more suitable for templating. > > > > Aggregation is not done with XSLT. > > Cocoon does it, and implements the caching too. > > For aggregation it should be all you need :-) > > Well, what I think Cocoon does is 'just' concatenate multiple XML / SAX > streams together. > This is good but it then requires some re-ordering for presentation - hence > the XSLT transform. > The problem then is that the XSLT transform has to be capable of > interpreting any XML in the aggregation. > If I add another pipeline component I have to extend the XSLT to understand > the extra XML (eg wrap tables, include images...) > > What I'd like to do instead is take the XHTML output of a pipeline and > essentially #include it into an XHTML template. > That means that the template provides an 'Interface' for sub-components (a > <td> cell :) and expects the component to return well formed XHTML suitable > for inclusion in a <td>. The component then performs whatever data gathering > is required and renders it to XHTML etc... > I can now get multiple components written, tested and debugged in isolation > (as pipelines) before simply binding them into a template (well, that's the > theory!) > The existing aggregate is too simplistic for that.
Take a look at cinclude/xinclude transformers. They do exactly this (and may be more). Consult http://xml.apache.org/cocoon/userdocs/transformers/transformers.html for the usage info. Regards, Vadim > > I'm looking at the <map:part> stuff in the sitemap.xsl (that's a sick file > :) and the corresponding Source stuff in the ContentAggregator. > I'm currently trying to add <map:part> tags to the VelocityGenerator which I > will then use to add the corresponding Source objects to the Velocity > context. > > I've only been looking at Cocoon for a week or so and I'm not that hot on > java so please bear with me - this is a baptism of fire :) > > I'm also happy to hear that what I'm doing is wrong - so long as I know that > I've really explained my objetives properly... > > David > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, email: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]