cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rachid harradi" <rachid.harr...@gmx.net>
Subject Re: RE: SaveFilesTransformer
Date Thu, 21 Sep 2006 11:09:59 GMT

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" <geert.josten@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


Mime
View raw message