cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: <map:aggregate> question
Date Thu, 15 Jan 2004 01:19:00 GMT
On 15.01.2004 01:56, Mark Lundquist wrote:

>         <map:match pattern="*/foo">
>           <map:aggregate element="foo">
>             <map:part src="foo.xml" />
>           </map:aggregate>
>           <map:match pattern="bar/foo">
>             <map:aggregate element="bar">
>               <map:part src="bar.xml" />
>             </map:aggregate>
>           </map:match>
>         </map:match>

It's not possible in this way. <map:aggregate> is the generator and you 
can not add the stuff step by step. You are to much programming in the 
sitemap, but the sitemap is declarative.

What you are trying to do is to add bar.xml only when bar/foo is 
matched, but foo.xml always?

Can you try the following, I don't know if it works:

<map:match pattern="*/foo">
   <map:aggregate element="root">
     <map:part src="foo.xml" element="foo"/>
     <map:part src="cocoon:/bar.xml" element="bar"/>

<map:match pattern="cocoon:/bar.xml">
   <map:select type="parameter">
     <map:parameter name="parameter-selector-test" value="{../1}"/>
     <map:when test="bar">
       <map:generate src="bar.xml"/>
       <!-- maybe it's possible to remove this otherwise completely -->
       <map:generate src="nothing.xml"/>


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

View raw message