Yes, I understood this point I think. But which the of generator must I call there ? No particular type ? It may like this ? Because if it's supposed to work, the error I meet when I use a generator must be due to something else.
Patricia Le 23 mars 2012 à 16:04, Robby Pelssers a écrit : > 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