cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Lundberg <my.name.is.h...@gmail.com>
Subject Re: How to return xml from a flowscript?
Date Thu, 05 Jan 2006 11:43:48 GMT
Thanks for the replies.
The problem is that I then have use the xml in a pipeline that starts
with an xquery generator (this is the pipeline I call from the
flowscript):
     <map:generate src="xq/discuss.xq" type="xquery">
     <map:parameter name="cleanedxml" value="{flow-attribute:cleanxml}"/>

Therefore, I have to send the xml as a parameter. I could not figure
out how to do that with the stream generator either. Maybe that is
easy?

The process starts with a matcher that calls the flowscript:
                        <map:match pattern="store_filesystem_file">
                                <map:call function="cleanWordHtml">
                                       <map:parameter name="base"
value="{request-param:base}"/>
                                       <map:parameter name="page"
value="{request-param:url}"/>

                                </map:call>
                        </map:match>

(I would *also* like to read wordml, but I'll deal with that later)

Regards
Hans

On 1/5/06, Geert Josten <Geert.Josten@daidalos.nl> wrote:
> > It reads a Cocoon pipeline, which converts a Word HTML file to XML.
> > Then it sends this as a string in a parameter, to a pipeline that
> > processes it further.
>
> Why not read WordML? :)
>
> > What I *would like* to do, is to send XML in the parameter, instead of a string.
> > Is this possible? Does anyone have a solution for me?
>
> Isn't it easier to change your upload pipe to read an internal pipe directly?
>
> In short something like:
>
> <pattern="cleanwhtm/**">
>         read and clean html using base and page parameters
>
> <pattern="upload/**">
>         <generate src="cocoon:/{1}">
>         <!-- set upload header flags and serialize -->
>
> flowscript:
>         sendPage("upload/cleanwhtm" + base + page);
>
>
> HTH,
> Geert
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message