Hi,

you can use the <map:call resource.....> sitemap element to invoke a
pipeline fragment from another pipeline. I use this too, here is en extract
from my sitemap:

        <map:pipeline>  
                <map:match pattern="do-*.html">
                        <map:act set="process">
                        <map:parameter name="descriptor"
                   value="context://resources/{1}-form.xml"/>
                <map:parameter name="validate-set" value="input" />
                        <map:call resource="controller">
                                <map:parameter  name="style" value="{style}"
/>
                        </map:call>
                        <map:serialize />
                        </map:act>
                        <map:generate src="docs/xml/error-login.xml"/>
                        <map:serialize />
                </map:match>
        <map:handle-errors>
                <!-- 
                        This pipeline specifies a different error handler.
                -->
        <map:transform src="stylesheets/error2html.xsl"/>
        <map:serialize status-code="500"/>
        </map:handle-errors>            
        </map:pipeline>

<map:resources>
        <map:resource name="controller">

                <map:generate type="serverpages"
src="docs/templates/controller.xsp">
                        <map:parameter name="event" value="action" />
                </map:generate>
                <map:transform type="cinclude"/>
                <map:transform src="stylesheets/{style}.xsl" />
                <map:serialize type="html" />
                        
        </map:resource>                 
 </map:resources>

Regards,
Francis

-----Original Message-----
From: Oskar Casquero [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 17 december 2002 13:15
To: [EMAIL PROTECTED]
Subject: how to connect two pipelines in cocoon?


Hello,

I have the following pipelines in cocoon:

<!-- This pipeline generates an XML document from an structured text
file -->
<map:match pattern="MAST_TXT2MAST_XMLresponse">
    <map:act type="fileUploadAction">
        <map:parameter name="file-name" value="mast"/>
        <map:generate type="textparser" src="{src}">
            <map:parameter name="grammar" value="cocoon:/mast-out.grm"/>
            <map:parameter name="includeignorabletokens" value="true"/>
        </map:generate>
        <map:transform src="stylesheets/chaperon2mastXML.xsl"/>
        <map:serialize type="text"/>
    </map:act>
</map:match>

<!-- This pipeline stores an XML document in eXist database using the xmldb
logicsheet-->
<map:match pattern="eXistAdmin">
    <map:generate type="serverpages" src="serverpages/xadmin.xsp"/>
    <map:transform src="stylesheets/doc2html.xsl"/
    <map:serialize type="xhtml"/>
</map:match>

I want to store the XML file in the database, so I would like to connect the
first pipeline with the second one, creating a chain, where the first
pipeline's output SAX events feed the second pipeline's generator. How can I
do this?

Thank you,
Oskar


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to