cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: Saving pipeline output to a temp file...everything you wanted to know but were afraid to ask!
Date Wed, 05 Nov 2003 17:24:38 GMT
Andrzej Jan Taramina wrote:


>Then I have a pipeline that looks like this, to actually execute the 
>flowscript and save the output of a particular pipeline:
>	<map:match pattern="saveFile.html">
>		<map:call function="saveToFile"/>
>		<map:select type="request-attribute">
>			<map:parameter name="attribute-name" value="centralPrint.status"/>
>			<map:when test="success">	
>				<!-- Do something useful here, since the saveToFile succeeded -->
>				.....
>			</map:when>
>			<map:otherwise>
>				<map:read src="html/saveToFileFailed.html" mime-type="text/html"/>
>			</map:otherwise>
>		</map:select>
>	</map:match>

Mmmh... careful here : you're relying on a unspecified behaviour that 
allows a flow script to not send a page. And we still have to decide if 
this allowed or not.

 From my point of view, this should not be allowed. And for this kind of 
purpose, I would better go for a "flowscript-action" that calls a script 
function that returns parameters to the sitemap but which is not allowed 
to create a continuation.

I also just checked in a new CopySourceAction that has been in use for 
ages in one of my projects. It doesn't create a temp file, but allows to 
copy any source (including, but not restricted to, cocoon:) to any 
ModifiableSource :
   <map:act type="copy-source" src="cocoon://pipeline.xml">
     <map:parameter name="dest" value="context://WEB-INF/data/file.xml"/>


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

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

View raw message