cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Burton <ross.bur...@mail.com>
Subject Re: [C2] Content aggregation: The options.
Date Fri, 19 Jan 2001 08:12:48 GMT
Paul Russell wrote:
> 
> Hi guys,
> 
> I've tasked myself to start building the content aggregation, and I need
> you guys input on the best way to approach this.
> 
> We have several options for sitemap syntax and implementation:
> 
> 1) Sub-pipeline approach
> 
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>         <!-- [...] -->
>         <map:pipelines>
>                 <map:pipeline>
>                         <map:match pattern="welcome">
>                                 <map:aggregate>
>                                         <map:aggregate-generate src="content/resources/menu.xml"/>
>                                         <map:aggregate-generate type="serverpages"
src="content/welcome.xml"/>
>                                 </map:aggregate>
>                                 <map:translate src="stylesheets/aggregate-to-html.xsl"/>
>                                 <map:translate src="stylesheets/content-to-html.xsl"/>
>                                 <map:serialize/>
>                         </map:match>
>                 </map:pipeline>
>         </map:pipelines>
> </map:sitemap>
> 
> 2) Sub-uri approach
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
>         <map:pipelines>
>                 <map:pipeline>
>                         <map:match pattern="welcome">
>                                 <map:aggregate>
>                                         <map:part uri="cocoon:///menu" name="menu"/>
>                                         <map:part uri="cocoon:///welcome" name="content"/>
>                                 </map:aggregate>
>                                 <map:translate src="stylesheets/aggregate-to-html.xsl"/>
>                                 <map:translate src="stylesheets/content-to-html.xsl"/>
>                                 <map:serialize/>
>                         </map:match>
>                         <map:match pattern="menu">
>                                 <map:generate src="content/resources/menu.xml"/>
>                                 <map:serialize type="xml"/>
>                         </map:match>
>                         <map:match pattern="welcome">
>                                 <map:generate src="content/welcome.xml"/>
>                                 <map:serialize type="xml"/>
>                         </map:match>
>                 </map:pipeline>
>         </map:pipelines>
> </map:sitemap>
> 
> My personal preference is for the first one, primarily because it avoids
> having to reparse (or a hack to avoid it), and - to me - it's semantically
> clearer and more flexible. What do you guys think? Anyone got any other
> ideas?

I'm in preference of 1 too I think.  Although 2 is just a use-case of 1
(if some attributes are renamed), as in 1) the type of the agregator
could be CocoonGenerator, which reads XML from instructions in the
sitemap...  2 does allow individual sections of the page to be
manipulated before being aggregated, but is this needed...  Not sure.

Wasn't there an optional atribute to wrap each part with a specific tag?
Something like:

  <map:aggregate-generate tag="menu" src="content/resources/menu.xml"/>

So that content with possibly different root elements can be identified
by the element they are contained within.

Anyway, I've gotta go to work!
Ross Burton
Mime
View raw message