cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Lewis <>
Subject Exiting flowscript by sending XML to a pipeline
Date Tue, 16 Jan 2007 18:43:57 GMT
My thanks to Jason for the keys to the regular expression kingdom, or at 
least that part solvable by type conversion.  :)

Now that the data is being manipulated in flowscript to my satisfaction 
(or, at least, well enough for the moment),  on to the next question:
    How to exit flowscript and pass the output into another (or 
containing) pipeline expecting XML.

I have a public pipeline that includes this match:

    <map:match pattern="results">
        <map:call function="main"/>
        <map:transform type="cinclude" />
        <map:serialize type="xml"/>

with  an internal pipeline for the flowscript:
      <map:match pattern="style/QueryValues">
        <map:generate type="jx" src="style/QueryValues.xsl"/>
        <map:serialize type="xml"/>

the flowscript is defined here:
<map:flow language="javascript">
  <map:script src="flow/search.js"/>

search.js main() ends with
            "q" : q,
            "fullQuery" : fullQuery,
    [and a number of other values in the same pattern]

The whole object of the flowscript is to manipulate the q value into the 
fullQuery value using javascript/rhino before passing it into a url that 
I want to <cinclude> in the results pipeline.

Those of you who have followed me to this point will probably not be 
surprised that what is returned to screen is the QueryValues output, 
without the further processing in the "results" pipeline.  If I *don't 
serialize it within the QueryValues pipeline I have a "No pipeline 
matched request" error.

The examples seem to assume that the flowscript sendPage is going 
directly back to the user as HTML (obviously the key use case). I'm 
missing the examples where it isn't.

I see that Rajesh Aravindakshan posed a similar question in Feb 2005, 
but I couldn't pull up a thread where the answer is resolved.


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

View raw message