cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <coc...@leverageweb.com>
Subject Re: svg2png dynamic static generation
Date Wed, 08 Oct 2003 18:59:18 GMT
Lars Huttar wrote:
> I'm pretty much a cocoon newbie, but here's what I know:
> In your sitemap you can use the resource-exists action to
> take different routes through the pipeline depending on the
> existence of a file.  E.g.:
> 
>       <map:match pattern="picture-*.png">
>         <map:act type="resource-exists">
>           <map:parameter name="url" value="picture-{1}.png" />
>           <!-- If it exists, read it. -->
>           <map:read type="resource"
> 			src="picture-{../1}.png" mime-type="image/png" />
>         </map:act>
>         <!-- Otherwise, generate the png from svg: -->
>         <!-- This part I don't know how to do. :-) Anyone? -->
> 	   <!-- Especially the part about saving the result to a file. -->
>       </map:match>
> 
>>because serializing svg to png is very slow, is it possible to do
>>somehow next:
>>
>>-> if picture-{id} exists -> map:read src="picture-{id}"
>>-> if not -> generate png file from svg and then save it to filesystem
>>and then show it.
>>
>>It would make things much faster.


I missed the first part of the question, but did you know that Cocoon is 
  probably already caching these for you?  What is your current pipeline 
like?

Geoff


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


Mime
View raw message