cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
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:aggregate>
   ...
</map:match>

<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"/>
     </map:when>
     <map:otherwise>
       <!-- maybe it's possible to remove this otherwise completely -->
       <map:generate src="nothing.xml"/>
     </map:otherwise>
   </map:select>
</map:match>

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message