Ross,
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? 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.
----- Original Message -----
From: "Ross Gardler" <rgard...@apache.org>
To: <user@forrest.apache.org>; "Dr. Bhatia Praveen"
<praveen.bha...@sumpurn.com>
Sent: Wednesday, April 08, 2009 4:17 PM
Subject: Re: How to do common pipelines?
2009/4/8 Dr. Bhatia Praveen <praveen.bha...@sumpurn.com>:
Thanks. It does work.
For others, like me :) , here is simple example that I could make work:
You are welcome - thanks for following up - very handy for others.
Ross
<map:match pattern="**P1.xml">
<map:generate src="cocoon:/P.xml"/>
<map:serialize type="xml"/>
</map:match>
This example would call the P pipeline from P1 pipeline.
thanks
Praveen
----- Original Message ----- From: "Ross Gardler" <rgard...@apache.org>
To: <user@forrest.apache.org>; "Dr. Bhatia Praveen"
<praveen.bha...@sumpurn.com>
Sent: Tuesday, April 07, 2009 8:00 PM
Subject: Re: How to do common pipelines?
2009/4/7 Dr. Bhatia Praveen <praveen.bha...@sumpurn.com>:
Hello,
Would like to use a pipeline, p, which is commonly used by other
pipelines, p1, p2, p3.
How could one achieve in p1, a call to common pipeline p, and then
continue
the processing into pipeline.
(It sounds more like a functional call. In function parlance, it is
equivalent to a function calling another function within itself and
continuing forward after the function returns).
Use the "cocoon:" protocol. See the forrest sitemaps for loads of
exampls, e.g.
http://svn.apache.org/repos/asf/forrest/trunk/main/webapp/forrest.xmap
Ross
--
Ross Gardler
OSS Watch - supporting open source in education and research
http://www.oss-watch.ac.uk
--------------------------------------------------------------------------------
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
--
Ross Gardler
OSS Watch - supporting open source in education and research
http://www.oss-watch.ac.uk
--------------------------------------------------------------------------------
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