cocoon-users mailing list archives

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

>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"/>
You can certainly set the serializer. The javadocs say:


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

And you replace the xml with svg2png.

[Never tried it though...]

Regards, Upayavira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message