forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dr. Bhatia Praveen" <>
Subject Re: write a file in forrest via sitemap
Date Wed, 04 Mar 2009 06:02:30 GMT
Hi Ross,Gavin
    I will explain the need more clearly.
    When transformations take place by the sitemap pipeline, lot of useful 
information also gets generated in the process by transformations like xslt 
    I would like to store these useful informations for record or later use 
in another pipeline.
    Hence, I would like to know how in a sequence of transformation pipeline 
I could:
1) Open a file to write
2) Write "intermediate useful information" as some xml data into the file
3) close the file
4) continue with the transformation in the pipeline and display in html/pdf 
as forrest does.

On a similar note:
     In "forrest run" can we have a copy of the displayed xml/html as a file 
by transformations (without using "forrest site")

  The example given by Ross, perhaps can solve this type of need, but if it 
is simplified I could try to experiment with it.
best wishes

----- Original Message ----- 
From: "Ross Gardler" <>
To: <>; "Dr. Bhatia Praveen" 
Sent: Tuesday, March 03, 2009 10:55 PM
Subject: Re: write a file in forrest via sitemap

2009/3/2 Dr. Bhatia Praveen <>:
> Hello,
> How can one use forrest (when running in say run), to write data into a
> file?

It's hard to answer such a general question, as Gavin says can you
provide more details.

In the meantime you can look at the note taking pluging in the
whiteboard. This enables a dispatcher contract that allows the user to
add a note field to a forrest page. In particular you should be
looking at org.apache.cocoon.transformation.SourceWritingTransformer
(see cocoon docs):

For example in the above plugin see input.xmap:

      <map:match pattern="noteTaking/do/addNote.xml">
        <map:generate type="request"/>
          <map:parameter name="notesFile"
        <map:transform type="write-source"/>
          <map:parameter name="use-request-parameters" value="true"/>
        <map:serialize type="xml-document"/>

Ross Gardler

OSS Watch - awareness and understanding of open source software
development and use in education


No virus found in this incoming message.
Checked by AVG -
Version: 8.0.233 / Virus Database: 270.11.5/1977 - Release Date: 02/18/09 

View raw message