cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Malic <Alexander.Ma...@workflow.at>
Subject Re: how can i use another pipeline as source for a transformer
Date Wed, 21 Feb 2007 12:56:13 GMT
hi gerrit,

thanx for the fast answer,

works like a charm.

regards,
alex





Gerrit boers <gboers@xs4all.nl> 
21.02.2007 11:40
Please respond to
users@cocoon.apache.org


To
users@cocoon.apache.org
cc

Subject
Re: how can i use another pipeline as source for a transformer






Like this:

<map:transform type="xalan" src="cocoon:/somepipeline/{1}/{2}"/>


regards,

Gerrit

On Feb 21, 2007, at 10:50 AM, Alexander Malic wrote:


Hi there, 

I want to use as source for a transformer the result of another pipeline. 

how can this be done. down there is just an example how i thought it 
should work. 
maybe i want to use a c-include to enrich the defaultForm_def.xsl with 
additional templates for the given example. 

thanx in advance, 
alexander malic 

here's the example: 

Sitemap: 

<map:transformers default="xslt">       
        <!-- NOTE: This is the default XSLT processor. --> 
        <map:transformer name="xslt" logger="sitemap.transformer.xslt" 
 pool-grow="2" pool-max="32" pool-min="8" 
src="org.apache.cocoon.transformation.TraxTransformer"> 
            <use-request-parameters>false</use-request-parameters> 
            <use-session-parameters>false</use-session-parameters> 
            <use-cookie-parameters>false</use-cookie-parameters> 
            <!-- SWITCH to saxon here if you want! --> 
            <xslt-processor-role>xalan</xslt-processor-role> 
            <check-includes>true</check-includes> 
        </map:transformer> 

... 

<map:match pattern="somePipeline1/*/*/*"> 
        <map:generate src="resource://{2}/{3}/formFeatures.xml" 
type="file"/> 
        <map:transform src="somePipeline2/{1}/{2}/{3}"/> 
        <map:serialize type="xml"/> 
</map:match> 

<map:match pattern="somePipeline2/*/*/*"> 
        <map:generate src="resource://{2}/resources/defaultForm_{1}.xsl"/> 

        <map:select type="resource-exists"> 
                <map:when 
test="resource://{2}/{3}/addFormSpecificFeatures_{1}.xsl"> 
                        <map:transform 
src="resource://{2}/{3}/addFormSpecificFeatures_{1}.xsl"/> 
                </map:when> 
        </map:select> 
        <map:serialize type="xml"/> 
</map:match> 

flowscript: 
var form = new Form("cocoon:/somePipeline1/def/forms/myForm"); 

resulting error: 
java.io.FileNotFoundException: 
C:\j2ee\jakarta-tomcat-5.0.28\webapps\mywebapp\somePipeline2\def\forms\myForm


Mime
View raw message