forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: write a file in forrest via sitemap
Date Tue, 03 Mar 2009 13:55:43 GMT
2009/3/2 Dr. Bhatia Praveen <praveen.bhatia@sumpurn.com>:
> 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

Mime
View raw message