Check into resources.  They are basically a group of tags that you can
call easily... I use one at the end of all my pipelines to strip
namespaces from the final xhtml and serialize...  It would look
somehting like this:

<map:resources>
        <map:resource name="xforms-convert">
                <map:transform src="context://stylesheets/system.xsl" />
                <map:transform src="context://stylesheets/base.xsl">
                <map:transform
src="context://stylesheets/client/xforms.xsl"/>
        </map:resource>
</map:resources>

And in your pipeline

<map:match pattern="edit-data">
        <map:generate src="data-chunk.xml"/>
        <!--Do some specific transform-->
        <map:transform type="session"/>
        <map:call resource="xforms-convert"/>
        <map:serialize />
</map:match>


Note that (unless I just missed it), you can't call a resource from a
different sitemap... So if you have a main sitemap with mounted sitemaps
that need to use the same resource, you have to copy it into each of
them.

HTH
Chris Marasti-Georg
 

> -----Original Message-----
> From: Stewart, Gary [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, August 25, 2005 11:01 AM
> To: users@cocoon.apache.org
> Subject: Calling a block of transformations
> 
> Hi there,
> 
> Another newbie question I'm afraid. There are a set of 
> transformers that I commonly call from a lot of pipelines and 
> that I'd like to be able to possibly change at a later date. 
> I was wondering if there is a way to call another pipeline 
> inside a generate -> serialize block so something like:
> 
> <map:match pattern="edit-data">
>       <map:generate src="data-chunk.xml"/>
>       <!--Do some specific transform-->
>       <map:transform type="session"/>
>       <!--Call another pipeline to do some more transformations-->
>       ??
>       <map:serialize />
> </map:match>
> 
> <map:pipeline internal-only="true">
>       <map:match pattern="xforms-convert">
>               <map:transform src="context://stylesheets/system.xsl" />
>               <map:transform src="context://stylesheets/base.xsl">
>               <map:transform 
> src="context://stylesheets/client/xforms.xsl"/>
>       </map:match>
> </map:pipeline>
> 
> I don't think redirect is what I'm looking for but I don't 
> think I want to use the aggregation (as there no generator) 
> as seen in 
> http://cocoon.apache.org/2.1/snippet/snippet-internal-pipeline.html.
> 
> Thanks,
> 
> Gary
> 
> **********************************************************************
> The information contained in this message may be confidential 
> or legally privileged and is intended for the addressee only, 
> If you have received this message in error or there are any 
> problems please notify the originator immediately. The 
> unauthorised use, disclosure, copying or alteration of this 
> message is strictly forbidden.
> **********************************************************************
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to