>
> -----Original Message-----
> From: Sylvain Wallez [mailto:[EMAIL PROTECTED]
> Sent: woensdag 5 november 2003 18:25
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
>
> Andrzej Jan Taramina wrote:
>
> <snip/>
>
> >Then I have a pipeline that looks like this, to actually execute the
> >flowscript and save the output of a particular pipeline:
> >
> ><map: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>
> ></map:pipeline>
> >
> >
>
> 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.
>
Better would be in this case to do in your saveToFile function:
function saveToFile() {
...
cocoon.processPipelineTo("output.xml",{},fileInputStream);
// redirect to the page to display
cocoon.sendPage("success.html",{});
}
> From my point of view, this should not be allowed.
I now believe this is true.
But ...
> 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.
>
... why is that better than the above flow script? (I am not trying to
be obstinate, I'm just trying to understand. :-)
> 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"/>
> </map:act>
>
> Sylvain
>
> --
> Sylvain Wallez Anyware Technologies
> http://www.apache.org/~sylvain http://www.anyware-tech.com
> { XML, Java, Cocoon, OpenSource }*{ Training, Consulting,
> Projects } Orixo, the opensource XML business alliance -
> http://www.orixo.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]