cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Van Kets <b...@visitronics.be>
Subject RE: writing xml to file - Solution
Date Fri, 15 Feb 2002 08:10:50 GMT
I like the idea of the serialiser.  I will be using it a lot since I'm 
creating a framework to let people access the content of the site through a 
browser.  Please do send me the code.  Thanks.
I just have to figure out how to send through the exact filename.  Since 
this has to be a local path on the server I'm no really sure how to get 
it.  Any ideas?
Bert

>Approach 2:
>         I have created a new Transformer (AbstractStringTransformer ,
>StringTransformer is an implementation of AbstractStringTransformer),
>which basically captures the XML as a String and invokes a method where
>you would embed ur custom logic
>
>
>//SiteMap entries
>//Transformer defn
><map:transformer     name="str-trans"
>src="com.accordia.display.transformation.StringTransformer"/>
>
>//pattern match entry in pipeline
>   <map:match pattern="str-trans">
>      <map:generate src="docs/samples/xml/samples.xml">
>         <map:parameter name="xml-root" value="samples"/>
>      </map:generate>
>      <map:transform type="str-trans" />
>      <map:serialize type="html"/> <!-- not xml serializer -->
>    </map:match>
>
>
>public String process(String element, String xmlData) {
>}
>
>You can get access to your context, request (Since this is a
>transformer) and write code in this method to store the XML file and
>return a message (OK or failure)
>
>If U like the approach, do let me know
>
>
>I will send U the source code ....
>
>Cheers,
>Chiths


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message