Thanks David and Ross.
I could make the pipelines work. It works great!
For others, like me, here is a simplified explanation.
For making a common pipeline PipeP define:
<map:resource name="PipeP">
.... put your pipeline here....
</map:resource>
In the pipeline P1 or P2 or P3 then you can call:
<map:call name="PipeP"/>
anywhere in between
and it will execute the common pipline PipeP.
Good feature !
Praveen
----- Original Message -----
From: "David Crossley" <cross...@apache.org>
To: <user@forrest.apache.org>
Sent: Thursday, April 09, 2009 11:03 AM
Subject: Re: How to do common pipelines?
Dr. Bhatia Praveen wrote:
I want to take this example to the next level.
Redirecting the pipeline at the top with map:generate does work.
How to do it in between too?
As Ross said, see the Forrest core sitemaps,
e.g.
]$ cd $FORREST_HOME/main/webapp
]$ grep "map:call" *.xmap
There are many examples of this.
See the documentation about sitemaps
http://forrest.apache.org/docs/sitemap-explain.html
and others.
See "map:resource" to define various resources,
and then "map:call" to use them.
-David
... So, from P1 I call pipeline P, transform with
mytest.xsl and then how do I call pipeline Q?
I would want something like this :
<map:match pattern="**P1.xml">
<map:generate src="cocoon:/P.xml"/>
<map:transform src="mytest.xsl"/>
<map:transform src="cocoon:/Q.xml"/>
<map:serialize type="xml"/>
</map:match>
<map:match pattern="Q.xml">
<map:generate src="test.xml"/>
<map:transform src="test2.xsl"/>
<map:serialize type="xml"/>
</map:match>
If this can be made to work, I do not have to repeat code for piplines P
and Q and all the other piplines which need slightly modiefied transforms
but for P and Q's portion itself.
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.11.42/2042 - Release Date: 04/05/09
10:54:00