cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <>
Subject RE: Problem in designing pipelines
Date Fri, 23 Mar 2012 16:03:01 GMT
One thing.  By default <map:transform src="exist/xsl/expotree2html.xsl"/> uses Xalan
XSLT processor.  So you can't use XSLT 2.0 unfortunately.  If however you  want to use Saxon
here are some instructions:



From: Patricia Déchandol []
Sent: Friday, March 23, 2012 4:59 PM
Subject: Re: Problem in designing pipelines

Ok, thanks for this explanations.
I says to me that the error must be due to something wrong either in the execution of the
first pipeline or in the XSL if the second pipeline.
Thanks Robby.


Le 23 mars 2012 à 16:55, Robby Pelssers a écrit :

The default generator @type is the XML file generator. So if cocoon://{1}/tree-expo-get-children
returns XML you don't need to specify a type on the generator.


From: Patricia Déchandol []
Sent: Friday, March 23, 2012 4:54 PM
Subject: Re: Problem in designing pipelines

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


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"/>

From: Patricia Déchandol []
Sent: Friday, March 23, 2012 3:31 PM
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:transform src="exist/xsl/get-children-rubriques.xsl"/>
                           <map:serialize type="xml"/>

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"/>

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


View raw message