You should not use map:read but map:generate when you want to do further 
processing.

              <map:match pattern="*/tree-expo-content">
                           <map:generate 
src="cocoon://{1}/tree-expo-get-children"/>
                           <map:transform src="exist/xsl/expotree2html.xsl"/>
                           <map:serialize type="html"/>
                     </map:match>


From: Patricia Déchandol [mailto:pdechan...@ajlsm.com]
Sent: Friday, March 23, 2012 3:31 PM
To: users@cocoon.apache.org
Subject: Problem in designing pipelines

Hi everybody,

I have a problem understanding how to write my pipelines.

I have a first pipeline :

                     <map:match pattern="*/tree-expo-get-children">
                           <map:generate type="xquery" 
src="exist/xq/get-children-rubriques.xq">
                                  <map:parameter name="parentid" value="{1}" />
                           </map:generate>
                           <map:transform 
src="exist/xsl/get-children-rubriques.xsl"/>
                           <map:serialize type="xml"/>
                     </map:match>

This pipeline works perfectly resulting a XML tree.
I would want to applicate another XSL to the resulting XML.

You will say that I just have to put another <map:transform> after the first 
one.
But I can't, because of a particularity :  the call to this first pipeline is 
iterative : the transform call this same pipeline.

So I thought about writing another :

                     <map:match pattern="*/tree-expo-content">
                           <map:read src="cocoon://{1}/tree-expo-get-children"/>
                           <map:transform src="exist/xsl/expotree2html.xsl"/>
                           <map:serialize type="html"/>
                     </map:match>

The problem is that when I execute this pipeline, I get the XML document 
resulting from the map:read but the transform is not performed.
If I put a map:generate replacing the map:read, the execution fails with an 
error in declaration of my XSL.

I don't understand how I can chain these transforms.
Which generator could work ?

Thanks for your help

Patricia

Reply via email to