You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ypomonh <yp...@freemail.gr> on 2007/05/21 00:06:02 UTC

Pass the content of a pipeline to a flow

Is it possible to pass the contents of a pipeline to a flow?

I tried:

        <map:pipeline>
            <map:match pattern="myflowurl">
                <map:call function="myflow">
                    <map:parameter name="someval" 
value="{cocoon:/somepipeline/element/stuff}"/>
                </map:call>
            </map:match>
        </map:pipeline>


but got error :(


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Pass the content of a pipeline to a flow

Posted by Jeroen Reijn <j....@hippo.nl>.
Hi ypomonh,

I guess you can use the NullOutputStream for that:

cocoon.processPipelineTo("factorial", {}, new 
org.apache.cocoon.util.NullOutputStream());

Kind regards,

Jeroen Reijn

ypomonh wrote:
> Hi Johannes!
> 
> As far as I understand since processPipelineTo() can only output to a 
> java.io.OutputStream, I can only use it to serialize something on the disk.
> 
> Is it possible to handle this stream inside my flowscript? I am not 
> fluent in java but I think that there is nothing I can really do with a 
> java.io.OutputStream...
> 
> 
> Johannes Textor wrote:
>> try cocoon.processPipelineTo()
>>
>> as documented (http://cocoon.apache.org/2.1/userdocs/flow/api.html)
>>
>> ypomonh wrote:
>>> Is it possible to pass the contents of a pipeline to a flow?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Pass the content of a pipeline to a flow

Posted by Joerg Heinicke <jo...@gmx.de>.
ypomonh <ypomonh <at> freemail.gr> writes:

> As far as I understand since processPipelineTo() can only output to a 
> java.io.OutputStream, I can only use it to serialize something on the disk.
> 
> Is it possible to handle this stream inside my flowscript? I am not 
> fluent in java but I think that there is nothing I can really do with a 
> java.io.OutputStream...

You should use org.apache.cocoon.components.flow.util.PipelineUtil. It offers 3
methods processToStream(), processToSAX() and processToDOM(). There are for sure
samples in the Cocoon code base or in the list archives.

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Pass the content of a pipeline to a flow

Posted by ypomonh <yp...@freemail.gr>.
Hi Johannes!

As far as I understand since processPipelineTo() can only output to a 
java.io.OutputStream, I can only use it to serialize something on the disk.

Is it possible to handle this stream inside my flowscript? I am not 
fluent in java but I think that there is nothing I can really do with a 
java.io.OutputStream...


Johannes Textor wrote:
> try cocoon.processPipelineTo()
>
> as documented (http://cocoon.apache.org/2.1/userdocs/flow/api.html)
>
> ypomonh wrote:
>> Is it possible to pass the contents of a pipeline to a flow?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Pass the content of a pipeline to a flow

Posted by Johannes Textor <jc...@gmx.de>.
hi ypomonh,

try cocoon.processPipelineTo()

as documented (http://cocoon.apache.org/2.1/userdocs/flow/api.html)

regards,
johannes

ypomonh wrote:
> Is it possible to pass the contents of a pipeline to a flow?
>
> I tried:
>
>        <map:pipeline>
>            <map:match pattern="myflowurl">
>                <map:call function="myflow">
>                    <map:parameter name="someval" 
> value="{cocoon:/somepipeline/element/stuff}"/>
>                </map:call>
>            </map:match>
>        </map:pipeline>
>
>
> but got error :(
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org