You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Geert Josten <ge...@daidalos.nl> on 2006/09/19 08:13:51 UTC

Free for use: SaveFilesTransformer

Hi all,

Available on wiki:

http://wiki.apache.org/cocoon/SaveFilesTransformer

It might be that someone else already wrote a Transformer like this one.
It is derived from the SourceWritingTransformer (yet simplified) and has
one important benefit over it: it can take a src attribute that can be
used to capture also binary streams and save them to disk.

Comments are welcome..

Kind regards,
Geert
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Re: Free for use: SaveFilesTransformer

Posted by Olivier <ol...@orcades.net>.
Joerg Heinicke wrote:
> Really an intersting idea. But I'd not begin the transaction in 
> setup(). What about startDocument()?
>
right :-)
> Jörg
>
> On 20.09.2006 18:53, Olivier wrote:
>> <map:resource name="write">
>>      <map:transform src="blog/{blogfile}" type="orcades-file-writer">
>>       <map:parameter name="dest-dir" value="{orcades:data-path}/"/>
>>  </map:transform>
>>
>> The transaction
>> * begins on setUp
>> * commit on endDocument
>> * roll back on recycle (if needed!)
>>
>>
>> Geert Josten wrote:
>>> How does it work?
>>>
>>> Kind regards,
>>> Geert
>>>  
>>>> -----Oorspronkelijk bericht-----
>>>> Van: Olivier [mailto:olivier@orcades.net] Verzonden: woensdag 20 
>>>> september 2006 10:07
>>>> Aan: users@cocoon.apache.org
>>>> Onderwerp: Re: Free for use: SaveFilesTransformer
>>>>
>>>> Hi all,
>>>>  I've build a transactionnal write transformer on top of :
>>>> http://jakarta.apache.org/commons/transaction/
>>>> Works fine in production.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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


RE: Free for use: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
> > And the rollback() at endDocument() as well (if necessary :). 
> >   
> Hum ...
> In fact the transaction id is the file url.
> IMHO endDocument is not called if an exeption occure in pipeline.

You are right, point taken! :-P

Grtz,
Geert
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Re: Free for use: SaveFilesTransformer

Posted by Olivier <ol...@orcades.net>.
Geert Josten wrote:
>> Really an intersting idea. But I'd not begin the transaction 
>> in setup(). 
>> What about startDocument()?
>>     
>
> And the rollback() at endDocument() as well (if necessary :). Though I
> guess I would like to manage the transactions independantly altogether.
> In actions fired with separate urls perhaps?
>
> ;-)
>    
>   
Hum ...
In fact the transaction id is the file url.
IMHO endDocument is not called if an exeption occure in pipeline.

See the transformer in attachment.

Comment are very welcome ...


RE: Free for use: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
> Really an intersting idea. But I'd not begin the transaction 
> in setup(). 
> What about startDocument()?

And the rollback() at endDocument() as well (if necessary :). Though I
guess I would like to manage the transactions independantly altogether.
In actions fired with separate urls perhaps?

;-)
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Re: Free for use: SaveFilesTransformer

Posted by Joerg Heinicke <jo...@gmx.de>.
Really an intersting idea. But I'd not begin the transaction in setup(). 
What about startDocument()?

Jörg

On 20.09.2006 18:53, Olivier wrote:
> <map:resource name="write">
>      <map:transform src="blog/{blogfile}" type="orcades-file-writer">
>       <map:parameter name="dest-dir" value="{orcades:data-path}/"/>
>  </map:transform>
> 
> The transaction
> * begins on setUp
> * commit on endDocument
> * roll back on recycle (if needed!)
> 
> 
> Geert Josten wrote:
>> How does it work?
>>
>> Kind regards,
>> Geert
>>  
>>> -----Oorspronkelijk bericht-----
>>> Van: Olivier [mailto:olivier@orcades.net] Verzonden: woensdag 20 
>>> september 2006 10:07
>>> Aan: users@cocoon.apache.org
>>> Onderwerp: Re: Free for use: SaveFilesTransformer
>>>
>>> Hi all,
>>>  I've build a transactionnal write transformer on top of :
>>> http://jakarta.apache.org/commons/transaction/
>>> Works fine in production.

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


Re: Free for use: SaveFilesTransformer

Posted by Olivier <ol...@orcades.net>.
 <map:resource name="write">
      <map:transform src="blog/{blogfile}" type="orcades-file-writer">
       <map:parameter name="dest-dir" value="{orcades:data-path}/"/>
  </map:transform>

The transaction
* begins on setUp
* commit on endDocument
* roll back on recycle (if needed!)


Geert Josten wrote:
> How does it work?
>
> Kind regards,
> Geert 
>
>   
>> -----Oorspronkelijk bericht-----
>> Van: Olivier [mailto:olivier@orcades.net] 
>> Verzonden: woensdag 20 september 2006 10:07
>> Aan: users@cocoon.apache.org
>> Onderwerp: Re: Free for use: SaveFilesTransformer
>>
>> Hi all,
>>  I've build a transactionnal write transformer on top of :
>> http://jakarta.apache.org/commons/transaction/
>> Works fine in production.
>>
>> Geert Josten wrote:
>>     
>>> Hi all,
>>>
>>> Available on wiki:
>>>
>>> http://wiki.apache.org/cocoon/SaveFilesTransformer
>>>
>>> It might be that someone else already wrote a Transformer 
>>>       
>> like this one.
>>     
>>> It is derived from the SourceWritingTransformer (yet 
>>>       
>> simplified) and 
>>     
>>> has one important benefit over it: it can take a src attribute that 
>>> can be used to capture also binary streams and save them to disk.
>>>
>>> Comments are welcome..
>>>
>>> Kind regards,
>>> Geert
>>>    
>>>  
>>> Drs. G.P.H. Josten
>>> Consultant
>>>  
>>>  
>>>
>>> Daidalos BV
>>> Source of Innovation
>>> Hoekeindsehof 1-4
>>> 2665  JZ  Bleiswijk
>>> Tel.: +31 (0) 10 850 1200
>>> Fax: +31 (0) 10 850 1199
>>> www.daidalos.nl
>>> KvK 27164984
>>>
>>>
>>> De informatie - verzonden in of met dit emailbericht - is 
>>>       
>> afkomstig van Daidalos BV en is uitsluitend bestemd voor de 
>> geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, 
>> verzoeken wij u het te verwijderen. Aan dit bericht kunnen 
>> geen rechten worden ontleend.
>>     
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>>   
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


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


RE: RE: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
Hi Rachid,

I'm not sure I understand you fully, but to set filepath dynamically you
have a few options I guess:

1. Use an input module to read the value and pass it to the XSL with a
construct like this:

	<map:parameter name="filepath" value="{request-param:outputdir}"
/>

(this reads a request-param named 'outputdir' and replaces the {..} part
by the value)

2. Same thing, but wrapped in an action that sets a parameter or wrapped
in a FlowScript call that sets a request-param, request-attribute or
else..

3. Forget about the filepath parameter alltogether and change the XSL to
inspect the input (result from cocoon:/wohland), to get an output path
from there.

4. ...

Kind regards,
Geert

> Hi Josten,
> thank you very much for help
> 
> it work very nice :)
> 
> i have another Question. the filepath is dynamic i get it 
> from "cocoon:/wohland"  or from Servelt Application.
> 
> how can i acces "the path" during Sitemape like "global variable"?
> 
> Rachid Harradi

> >             <map:transform src="saveFile.xsl">
> >               <map:parameter name="serializer" value="html" />
> >               <map:parameter name="filepath"
> > value="E:/temp/objectionhtml.html" />
> >             </map:transform>
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Re: RE: SaveFilesTransformer

Posted by rachid harradi <ra...@gmx.net>.
Hi Josten,
thank you very much for help

it work very nice :)

i have another Question. the filepath is dynamic i get it from "cocoon:/wohland"  or from Servelt Application.

how can i acces "the path" during Sitemape like "global variable"?

Rachid Harradi


-------- Original-Nachricht --------
Datum: Wed, 20 Sep 2006 18:36:24 +0200
Von: "Geert Josten" <ge...@daidalos.nl>
An: users@cocoon.apache.org
Betreff: RE: SaveFilesTransformer

> Hi Rachid,
> 
> Yes, you are going wrong at the point where you actually call the
> savefiles transformer. This transformer is content driven, not parametrized with a
> save:file element.
> 
> You have two options:
> 1. Wrap the result from the generate inside a save:file element using for
> instance the attached XSL, by adding the following transform between the
> generate and savefiles transform:
> 
>             <map:transform src="saveFile.xsl">
>               <map:parameter name="serializer" value="html" />
>               <map:parameter name="filepath"
> value="E:/temp/objectionhtml.html" />
>             </map:transform>
> 
> 2. Not generate the dynamic content of cocoon:/wohland, but a static xml
> file with contents:
> 
>      	<?xml version="1.0"?>
> 	<save:file
>          src="cocoon:/wohland"
>          target="E:/temp/objectionhtml.html"
>          xmlns:save="http://daidalos.nl/cocoon/save/1.0" />
> 
> Hope this helps!
> 
> Kind regards,
> Geert
> 
> > 
>    
>  
> Drs. G.P.H. Josten
> Consultant
>  
>  
> 
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665  JZ  Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> www.daidalos.nl
> KvK 27164984
> 
> 
> De informatie - verzonden in of met dit emailbericht - is afkomstig van
> Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit
> bericht kunnen geen rechten worden ontleend.
>  
> 
> > Van: rachid harradi [mailto:rachid.harradi@gmx.net] 
> > Verzonden: woensdag 20 september 2006 17:38
> > Aan: users@cocoon.apache.org
> > Onderwerp: use: SaveFilesTransformer
> > 
> > hello together,
> > 
> > i had use the SaveFilesTransformer but i have any file stored 
> > in filesystem
> > 
> > 
> > 
> > so is my Sitemap:
> > 
> > <?xml version="1.0" encoding="UTF-8"?>
> > <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> > 
> > <map:components>
> > 
> > 	<!--map:generators default="objectionHTMLGenerator">
> >       <map:generator name="objectionHTMLGenerator" 
> > src="ameliGenerator.MyGenerator"/>
> >    </map:generators-->
> >    
> >      <map:generators default="myGenerator">
> >       <map:generator name="savingGenerator" 
> > src="ameliGenerator.SavingGenerator"/>
> >       <map:generator name="objectionGenerator" 
> > src="ameliGenerator.MyGenerator"/>
> >    </map:generators>
> >    
> >    
> >    	 <map:transformers default="tofile">
> >    		<map:transformer name="tofile" 
> > src="ameliTransformer.AmeliTransformer"/> 	
> >    		 <map:transformer
> >                 logger='transformer.savefiles'
> >                 name='savefiles'
> >                 src='ameliTransformer.SaveFilesTransformer'/>
> >     	<map:transformer name="write-source" 
> >     		
> > src="org.apache.cocoon.transformation.SourceWritingTransformer">
> > 		<map:parameter name="serializer" value="xml"/>  
> >  	</map:transformer>
> >  	</map:transformers>
> >     
> >    
> >    
> > </map:components>
> > 
> > <map:pipelines>
> >    <map:pipeline internal-only="false">
> >    <map:match pattern="wohland">
> >       <map:generate type="file" src="ObjectionHTML.xml"/>
> >        <map:transform type="xslt" src="objection04.xslt"/>
> >       <map:serialize type="html"/>
> >    </map:match>
> >    </map:pipeline>
> > <map:pipeline> 
> >     <map:match pattern="">
> >    	 <map:generate type="file" src="cocoon:/wohland"/>
> >    		 <!--map:generate type="file" 
> > src="ObjectionHTML.xml"/-->
> >     	<map:transform type="savefiles">
> >     	<save:file
> >         src="cocoon:/wohland"
> >         target="E:/temp/objectionhtml.html"
> >         xmlns:save="http://daidalos.nl/cocoon/save/1.0" />
> >     	</map:transform>
> >   		 <map:serialize type="xml"/>
> > 	</map:match>
> >    </map:pipeline> 
> >    
> >     <map:pipeline> 
> >      <map:match pattern="tofiles">
> >    	 <map:generate type="savingGenerator" src="cocoon:/wohland"/>
> >   		 <map:serialize type="xml"/>
> > 	</map:match>
> >    </map:pipeline> 
> >    
> > </map:pipelines>
> > 
> > </map:sitemap>
> > 
> > 
> > 
> > 
> > i use this URL:http://localhost:8080/cocoon/savefiles/
> > --
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> >

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


RE: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
Hi Rachid,

Yes, you are going wrong at the point where you actually call the savefiles transformer. This transformer is content driven, not parametrized with a save:file element.

You have two options:
1. Wrap the result from the generate inside a save:file element using for instance the attached XSL, by adding the following transform between the generate and savefiles transform:

            <map:transform src="saveFile.xsl">
              <map:parameter name="serializer" value="html" />
              <map:parameter name="filepath" value="E:/temp/objectionhtml.html" />
            </map:transform>

2. Not generate the dynamic content of cocoon:/wohland, but a static xml file with contents:

     	<?xml version="1.0"?>
	<save:file
         src="cocoon:/wohland"
         target="E:/temp/objectionhtml.html"
         xmlns:save="http://daidalos.nl/cocoon/save/1.0" />

Hope this helps!

Kind regards,
Geert

> 
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
 

> Van: rachid harradi [mailto:rachid.harradi@gmx.net] 
> Verzonden: woensdag 20 september 2006 17:38
> Aan: users@cocoon.apache.org
> Onderwerp: use: SaveFilesTransformer
> 
> hello together,
> 
> i had use the SaveFilesTransformer but i have any file stored 
> in filesystem
> 
> 
> 
> so is my Sitemap:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
> 
> <map:components>
> 
> 	<!--map:generators default="objectionHTMLGenerator">
>       <map:generator name="objectionHTMLGenerator" 
> src="ameliGenerator.MyGenerator"/>
>    </map:generators-->
>    
>      <map:generators default="myGenerator">
>       <map:generator name="savingGenerator" 
> src="ameliGenerator.SavingGenerator"/>
>       <map:generator name="objectionGenerator" 
> src="ameliGenerator.MyGenerator"/>
>    </map:generators>
>    
>    
>    	 <map:transformers default="tofile">
>    		<map:transformer name="tofile" 
> src="ameliTransformer.AmeliTransformer"/> 	
>    		 <map:transformer
>                 logger='transformer.savefiles'
>                 name='savefiles'
>                 src='ameliTransformer.SaveFilesTransformer'/>
>     	<map:transformer name="write-source" 
>     		
> src="org.apache.cocoon.transformation.SourceWritingTransformer">
> 		<map:parameter name="serializer" value="xml"/>  
>  	</map:transformer>
>  	</map:transformers>
>     
>    
>    
> </map:components>
> 
> <map:pipelines>
>    <map:pipeline internal-only="false">
>    <map:match pattern="wohland">
>       <map:generate type="file" src="ObjectionHTML.xml"/>
>        <map:transform type="xslt" src="objection04.xslt"/>
>       <map:serialize type="html"/>
>    </map:match>
>    </map:pipeline>
> <map:pipeline> 
>     <map:match pattern="">
>    	 <map:generate type="file" src="cocoon:/wohland"/>
>    		 <!--map:generate type="file" 
> src="ObjectionHTML.xml"/-->
>     	<map:transform type="savefiles">
>     	<save:file
>         src="cocoon:/wohland"
>         target="E:/temp/objectionhtml.html"
>         xmlns:save="http://daidalos.nl/cocoon/save/1.0" />
>     	</map:transform>
>   		 <map:serialize type="xml"/>
> 	</map:match>
>    </map:pipeline> 
>    
>     <map:pipeline> 
>      <map:match pattern="tofiles">
>    	 <map:generate type="savingGenerator" src="cocoon:/wohland"/>
>   		 <map:serialize type="xml"/>
> 	</map:match>
>    </map:pipeline> 
>    
> </map:pipelines>
> 
> </map:sitemap>
> 
> 
> 
> 
> i use this URL:http://localhost:8080/cocoon/savefiles/
> --
> Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
> Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

use: SaveFilesTransformer

Posted by rachid harradi <ra...@gmx.net>.
hello together,

i had use the SaveFilesTransformer but i have any file stored in filesystem



so is my Sitemap:

<?xml version="1.0" encoding="UTF-8"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

<map:components>

	<!--map:generators default="objectionHTMLGenerator">
      <map:generator name="objectionHTMLGenerator" src="ameliGenerator.MyGenerator"/>
   </map:generators-->
   
     <map:generators default="myGenerator">
      <map:generator name="savingGenerator" src="ameliGenerator.SavingGenerator"/>
      <map:generator name="objectionGenerator" src="ameliGenerator.MyGenerator"/>
   </map:generators>
   
   
   	 <map:transformers default="tofile">
   		<map:transformer name="tofile" src="ameliTransformer.AmeliTransformer"/> 	
   		 <map:transformer
                logger='transformer.savefiles'
                name='savefiles'
                src='ameliTransformer.SaveFilesTransformer'/>
    	<map:transformer name="write-source" 
    		src="org.apache.cocoon.transformation.SourceWritingTransformer">
		<map:parameter name="serializer" value="xml"/>  
 	</map:transformer>
 	</map:transformers>
    
   
   
</map:components>

<map:pipelines>
   <map:pipeline internal-only="false">
   <map:match pattern="wohland">
      <map:generate type="file" src="ObjectionHTML.xml"/>
       <map:transform type="xslt" src="objection04.xslt"/>
      <map:serialize type="html"/>
   </map:match>
   </map:pipeline>
<map:pipeline> 
    <map:match pattern="">
   	 <map:generate type="file" src="cocoon:/wohland"/>
   		 <!--map:generate type="file" src="ObjectionHTML.xml"/-->
    	<map:transform type="savefiles">
    	<save:file
        src="cocoon:/wohland"
        target="E:/temp/objectionhtml.html"
        xmlns:save="http://daidalos.nl/cocoon/save/1.0" />
    	</map:transform>
  		 <map:serialize type="xml"/>
	</map:match>
   </map:pipeline> 
   
    <map:pipeline> 
     <map:match pattern="tofiles">
   	 <map:generate type="savingGenerator" src="cocoon:/wohland"/>
  		 <map:serialize type="xml"/>
	</map:match>
   </map:pipeline> 
   
</map:pipelines>

</map:sitemap>




i use this URL:http://localhost:8080/cocoon/savefiles/
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


RE: Free for use: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
How does it work?

Kind regards,
Geert 

> -----Oorspronkelijk bericht-----
> Van: Olivier [mailto:olivier@orcades.net] 
> Verzonden: woensdag 20 september 2006 10:07
> Aan: users@cocoon.apache.org
> Onderwerp: Re: Free for use: SaveFilesTransformer
> 
> Hi all,
>  I've build a transactionnal write transformer on top of :
> http://jakarta.apache.org/commons/transaction/
> Works fine in production.
> 
> Geert Josten wrote:
> > Hi all,
> >
> > Available on wiki:
> >
> > http://wiki.apache.org/cocoon/SaveFilesTransformer
> >
> > It might be that someone else already wrote a Transformer 
> like this one.
> > It is derived from the SourceWritingTransformer (yet 
> simplified) and 
> > has one important benefit over it: it can take a src attribute that 
> > can be used to capture also binary streams and save them to disk.
> >
> > Comments are welcome..
> >
> > Kind regards,
> > Geert
> >    
> >  
> > Drs. G.P.H. Josten
> > Consultant
> >  
> >  
> >
> > Daidalos BV
> > Source of Innovation
> > Hoekeindsehof 1-4
> > 2665  JZ  Bleiswijk
> > Tel.: +31 (0) 10 850 1200
> > Fax: +31 (0) 10 850 1199
> > www.daidalos.nl
> > KvK 27164984
> >
> >
> > De informatie - verzonden in of met dit emailbericht - is 
> afkomstig van Daidalos BV en is uitsluitend bestemd voor de 
> geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, 
> verzoeken wij u het te verwijderen. Aan dit bericht kunnen 
> geen rechten worden ontleend.
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> >   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

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


Re: Free for use: SaveFilesTransformer

Posted by Olivier <ol...@orcades.net>.
Hi all,
 I've build a transactionnal write transformer on top of :
http://jakarta.apache.org/commons/transaction/
Works fine in production.

Geert Josten wrote:
> Hi all,
>
> Available on wiki:
>
> http://wiki.apache.org/cocoon/SaveFilesTransformer
>
> It might be that someone else already wrote a Transformer like this one.
> It is derived from the SourceWritingTransformer (yet simplified) and has
> one important benefit over it: it can take a src attribute that can be
> used to capture also binary streams and save them to disk.
>
> Comments are welcome..
>
> Kind regards,
> Geert
>    
>  
> Drs. G.P.H. Josten
> Consultant
>  
>  
>
> Daidalos BV
> Source of Innovation
> Hoekeindsehof 1-4
> 2665  JZ  Bleiswijk
> Tel.: +31 (0) 10 850 1200
> Fax: +31 (0) 10 850 1199
> www.daidalos.nl
> KvK 27164984
>
>
> De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>   


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


RE: Free for use: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
> Can I ask why we need a simplified SourceWritingTransformer?

Ofcourse you can: you just did.. :-)

No, I don't think a simplified one is needed, but it is the second use
case that is most interesting.

Perhaps I should have said that it is *another*
SourceWritingTransformer.. :-P

Kind regards,
Geert
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

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


Re: Free for use: SaveFilesTransformer

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Geert Josten wrote:
> Hi all,
> 
> Available on wiki:
> 
> http://wiki.apache.org/cocoon/SaveFilesTransformer
> 
> It might be that someone else already wrote a Transformer like this one.
> It is derived from the SourceWritingTransformer (yet simplified) and has
> one important benefit over it: it can take a src attribute that can be
> used to capture also binary streams and save them to disk.
> 
> Comments are welcome..
Can I ask why we need a simplified SourceWritingTransformer?

-- 
Leszek Gawron, IT Manager                          MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

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


RE: Free for use: SaveFilesTransformer

Posted by Geert Josten <ge...@daidalos.nl>.
> Er... why a brand new transformer when you could have 
> provided a patch adding support for the src attribute in 
> SourceWritingTransformer???
> 
> Sylvain

I am actually surprised that no one says that the newest
SourceWritingTransformer already supports this feature..

;-) 

No really, I wasn't confident enough (2 years ago?) and don't have mucht
time now to dive into it. But if you think it is useful and perhaps even
worth adding to the latest version, I could make a little time to create
a patch out of it..

Kind regards,
Geert
   
 
Drs. G.P.H. Josten
Consultant
 
 

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984


De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.

Re: Free for use: SaveFilesTransformer

Posted by Sylvain Wallez <sy...@apache.org>.
Geert Josten wrote:
> Hi all,
>
> Available on wiki:
>
> http://wiki.apache.org/cocoon/SaveFilesTransformer
>
> It might be that someone else already wrote a Transformer like this one.
> It is derived from the SourceWritingTransformer (yet simplified) and has
> one important benefit over it: it can take a src attribute that can be
> used to capture also binary streams and save them to disk.
>
> Comments are welcome..
>   

Er... why a brand new transformer when you could have provided a patch
adding support for the src attribute in SourceWritingTransformer???

Sylvain

-- 
Sylvain Wallez - http://bluxte.net