cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dev at weitling <>
Subject Re: Pipeline result in a flowscript?
Date Wed, 11 Oct 2006 07:41:00 GMT
It seems we HAVE to break a fly on the wheel*. I solved it now this way
(good for a tiny amount of data):

    var baos = new;

In the sitemap:

    <map:match pattern="getMyTinyData">
        <map:generate src="getMyTinyData.xml"/>
        <map:transform type="sql">
            <map:parameter name="use-connection" value="test"/>
        <map:serialize type="text"/>

with getMyTinyData.xml containing the SQL query.

Big disadvantage of this solution: There's the risk of corrupting
non-Latin1-coded text ! Any ideas to that?


* In German it's "shooting with canons on sparrows". Poor sparrows...

Tony Edwards wrote:
> Two flowscript calls should do it:
>     var pipelineUtil =
> cocoon.createObject(;
>     var document = pipelineUtil.processToDOM("webHierarchyLink", null);
> First line sets up the magic, the second line gets the result of the
> "webHierarchyLink" matcher in the sitemap as a dom document which can
> be further processed etc.
> Hope this helps.
> Regards,
> Tony (Edwards)
> Joerg Heinicke wrote:
>> On 10.10.2006 17:49, Dev at weitling wrote:
>>> What's the best way to get the result of a pipeline for further
>>> processing in a flowscript?
>>> cocoon.processPipelineTo looks a little bit like overkill with its bean
>>> and stream parameters.
>> There is a class called PipelineUtil. Sample code should also be
>> available "somewhere" (wiki etc.).
>>> Or: Effectively I just want to get one value from a JDBC connection.
>>> Just one lonely integer...
>> As Tony said (hey, Tony, you are back to Cocoon? :) ), put it in
>> a "service layer". If you do not have structured your application
>> into different layers you can just extract the code into a Java
>> class. You simply access any Java class in flowscript.
>> At least using a different pipeline looks like complete overkill (not
>> only cocoon.processPipelineTo).
>> Jörg
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> -- 
> This email is from Civica Pty Limited and it, together with any
> attachments, is confidential to the intended recipient(s) and the
> contents may be legally privileged or contain proprietary and private
> information. It is intended solely for the person to whom it is
> addressed. If you are not an intended recipient, you may not review,
> copy or distribute this email. If received in error, please notify the
> sender and delete the message from your system immediately. Any views
> or opinions expressed in this email and any files transmitted with it
> are those of the author only and may not necessarily reflect the views
> of Civica and do not create any legally binding rights or obligations
> whatsoever. Unless otherwise pre-agreed by exchange of hard copy
> documents signed by duly authorised representatives, contracts may not
> be concluded on behalf of Civica by email. Please note that neither
> Civica nor the sender accepts any responsibility for any viruses and
> it is your responsibility to scan the email and the attachments (if
> any). All email received and sent by Civica may be monitored to
> protect the business interests of Civica.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message