2009/3/2 Dr. Bhatia Praveen <[email protected]>:
> 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:transform
src="{lm:noteTaking.transform.postedNotes.sourceWriterNotes}">
<map:parameter name="notesFile"
value="{properties:noteTaking.repository.URL}{properties:noteTaking.filename}"/>
</map:transform>
<map:transform type="write-source"/>
<map:transform
src="{lm:noteTaking.transform.writeResult.acknowledgement}">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
--
--
Ross Gardler
OSS Watch - awareness and understanding of open source software
development and use in education
http://www.oss-watch.ac.uk