You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by jim basilakis <ji...@ee.unsw.edu.au> on 2003/12/02 03:24:39 UTC
RE: SourceWritingTransformer to save jpeg/png to filesystem
Thanks for your reply.
I have tried replacing the serializer value from 'xml' to 'svg2png' and it
gave an error saying it not able to do this. I will try and look at the
source code and see what I can do save an image on the filesystem. If I get
the answer I will let you know.
Thanks again,
Jim
-----Original Message-----
From: Upayavira [mailto:uv@upaya.co.uk]
Sent: Saturday, 29 November 2003 6:46 PM
To: users@cocoon.apache.org
Subject: Re: SourceWritingTransformer to save jpeg/png to filesystem
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org