You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jorg Heymans <jh...@domek.be> on 2003/11/12 11:24:18 UTC

map:aggregate inside action

Hi,

I was a bit surprised to see that below sitemap does not work
(ie aggregate within an action).
In the internal pipeline !*.svg! the {1} parameter is empty.

Any thoughts?

<map:pipeline internal-only="true">
   <map:match pattern="!*.svg!">
     <map:generate type="file" src="{defaults:GFX-TEMPLATES}{1}.svg"/>
     <map:serialize type="xml"/>
   </map:match>

   <map:match pattern="!requestgenerator!">
     <map:generate type="request"/>
     <map:serialize/>
   </map:match>
</map:pipeline>

<map:pipeline>
<map:match pattern="render/*.svg">
   <map:act type="filestore">
     <map:aggregate element="aggregation">
	<map:part src="cocoon:/!{1}.svg!"/>
	<map:part src="cocoon:/!requestgenerator!"/>
     </map:aggregate>
   </map:act>
   <map:serialize type="xml"/>
</map:match>
</map:pipeline>


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


Re: map:aggregate inside action

Posted by Jeroen Reijn <jr...@hippo.nl>.
Hi Jorg,
 
correct me if im wrong. I have only been using cocoon for a while now, 
but i believe that you have to get the parameter value by using {../1}. 
Your pipeline will look like:
 
<map:pipeline>
<map:match pattern="render/*.svg">
   <map:act type="filestore">
     <map:aggregate element="aggregation">
        <map:part src="cocoon:/!{../1}.svg!"/>
        <map:part src="cocoon:/!requestgenerator!"/>
     </map:aggregate>
   </map:act>
   <map:serialize type="xml"/>
</map:match>
</map:pipeline>
 
Hope this helps.


Jorg Heymans wrote:

> Hi,
>
> I was a bit surprised to see that below sitemap does not work
> (ie aggregate within an action).
> In the internal pipeline !*.svg! the {1} parameter is empty.
>
> Any thoughts?
>
> <map:pipeline internal-only="true">
>   <map:match pattern="!*.svg!">
>     <map:generate type="file" src="{defaults:GFX-TEMPLATES}{1}.svg"/>
>     <map:serialize type="xml"/>
>   </map:match>
>
>   <map:match pattern="!requestgenerator!">
>     <map:generate type="request"/>
>     <map:serialize/>
>   </map:match>
> </map:pipeline>
>
> <map:pipeline>
> <map:match pattern="render/*.svg">
>   <map:act type="filestore">
>     <map:aggregate element="aggregation">
>     <map:part src="cocoon:/!{1}.svg!"/>
>     <map:part src="cocoon:/!requestgenerator!"/>
>     </map:aggregate>
>   </map:act>
>   <map:serialize type="xml"/>
> </map:match>
> </map:pipeline>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>