cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: SourceWritingTransformer to save jpeg/png to filesystem
Date Sat, 29 Nov 2003 07:45:47 GMT
jim basilakis wrote:

>Hi, 
>
>Does anyone know how to save a png/jpg generated by .svg file onto the
>file system. I have been hinted before to use SourceWritingTransformer
>but does this apply to images as well as simple files?
>
>If so, what would I need to do?
>
>Would something like this work...
>
>
><map:transform type="write-source">
>       <map:parameter name="serializer" value="svg2png"/>
></map:transform>
>  
>
You can certainly set the serializer. The javadocs say:

Definition:

 <map:transformer     name="tofile"     src="org.apache.cocoon.transformation.SourceWritingTransformer">
   <!-- 'xml' is the default Serializer (if your Source needs one, like for instance FileSource)
-->
   <map:parameter name="serializer" value="xml"/>
 </map:transformer/>
 

Invocation:

 <map:transform type="tofile">
   <map:parameter name="serializer" value="xml"/>   <!-- you can optionally override
the serializer here -->
 </map:transform>

And you replace the xml with svg2png.

[Never tried it though...]

Regards, Upayavira



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


Mime
View raw message