cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From C├ędric Damioli <>
Subject Re: RequestGenerator for "non-data" pipelines (was: read/write DOM Session)
Date Tue, 26 Feb 2002 09:32:26 GMT
I can add an exemple for "non-data" pipelines, based on the DOM sessions 
I was working on :

<map:match pattern="some_pattern">
  <map:generate type="readDOMGenerator">
    <map:parameter name="some_param" value="some_value"/>
  <map:transform .../>
  <map:transform type="writeDOMsession">
    <map:parameter .../>
  <map:transform .../> 

In this typical exemple, your pipeline read current data from session, 
process some stuff, and then save it to session before eventually 
display any result.
The writeDOMsession already exists, as does a readDOMsession which is a 
Transformer able to add the stored data at any point of your current 
I'v also written a very simple readDOMGenerator to be able to begin a 
pipeline with only the stored data.
I've sent this Generator to a Cocoon Committer. He'll decide if it's 
useful or not.

Hope this helps.


Bertrand Delacretaz wrote:

>On Monday 25 February 2002 14:26, terracare wrote:
>>. . .
>>Can you give a typical example of how you might use it for such a
>>"non-data" pipeline?
>By non-data I meant a pipeline that only uses the request parameters as 
>its direct input, for example:
>RequestGenerator -> CreateSQL -> SQLTransformer ->. . .
>in that case, "CreateSQL" would be an XSLT transform that, based on the 
>request parameters, creates suitable XML for SQLTransformer to make a 
>database query.
>The corresponding sitemap excerpt looks like:
><map:match pattern="sql-query/*.xml">
>  <map:generate type="request"/>
>  <map:transform src="request-to-sql.xsl"/>
>  <map:transform type="sql">
>    <map:parameter name="use-connection" value="prodDb"/>
>  </map:transform>
>   <map:serialize type="xml"/>
>Does this help?

View raw message