cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Dynamic aggregation
Date Mon, 10 May 2004 23:23:40 GMT
On 10.05.2004 00:42, David Leangen wrote:

> <map:aggregate
>   element="StaticPage"
>   prefix="exp"
>   ns=""
>   label="aggregatePage">
>   <map:part src="cocoon:/helloWorld.html"/>
> </map:aggregate>

> Later in an internal-only pipeline:
> <map:match pattern="*.html">
>   <map:generate type="jx" src="components/{1}/component.jx"/>
>   <map:transform src="components/{1}/transforms/html/doLayout.xslt"/>
>   <map:transform src="components/{1}/transforms/html/doPresentation.xslt"/>
>   <map:transform src="context://util/stripNamespaces.xslt"/>
>   <map:serialize type="xml"/>
> </map:match>

> Why? Because as I mentioned in my last post, using CInclude is really messy;
> difficult to manage, maintain, and debug; slow to process; and just plain
> frustrating!

Hmm, we have used cinclude massively ourselves and I never had the 
feeling that it is difficult to maintain or slow. Maybe you show us your 
cinclude pipeline tries to?

It should be like the following:

<map:generator src="dynamicComponentsList"/>
<map:transform src="componentsList2cinclude.xsl"/>
<map:transform type="cinclude"/>
map:serialize type="html"/>

The componentsList2cinclude.xsl creates an XML like the following:

<page xmlns:c="">
   <c:include src="cocoon:/component1.html"/>
   <c:include src="cocoon:/component2.html"/>
   <c:include src="cocoon:/component3.html"/>

I can not think of something much more cleaner than this one. The XSL 
itself might be some more complex but this depends only on your 
dynamicComponentsList XML file format. The creation of elements as you 
did it above in the helloWorld example should be similar for cinclude.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message