cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joose Vettenranta <>
Subject Re: svg2png dynamic static generation
Date Wed, 08 Oct 2003 10:19:32 GMT
On ke, 2003-10-08 at 13:07, Jorg Heymans wrote:
> so how did you expect us to know all this ;-) ?
> Could you please post the pipeline you want to optimize ? That way we 
> can get a better understanding of what components you are using.

     <map:match pattern="framet/nelio-*.png">
      <map:aggregate element="data">
       <map:part src="../../2/xsp/ipsa1.xsp" strip-root="true" />
       <map:part src="cocoon:/piilotettu/ipsadata-{1}.xml" />
<!-- created answers and metadata for the answers -->
      <map:transform src="style/ipsadata/merge.xsl" />
<!-- transformed metadata and answers to same elements -->
      <map:transform src="style/ipsadata/count.xsl" label="raw"/>
<!-- does some calculation -->
      <map:transform src="style/ipsadata/toSVG.xsl" label="raw2"/>
<!-- appends svg template and on top of that draws a polygon -->
      <map:serialize type="svg2png" />

    <map:match pattern="piilotettu/ipsadata-*.xml">
     <map:generate type="serverpages" src="xsp/ipsadata.xsp">
      <map:parameter name="id" value="{1}" />
     <map:transform src="style/ipsadata/prettySQL.xsl" />
 changes <"name of the column">value</"name of the column"> to
         <object name="name of the column>value</object>
     <map:serialize type="xml" />

The transformation from data to svg is not linear, I have to do some
math in XSLT (I'm creating 10 edged polygon)

map:part uses .xsp -file,because the same file is used in another part
of the system, with different purpose.

I don't know is it clear, but the data in the database is not changing
once inserted. So, SVG-grapchics is the same always. And why I don't
want to use memory/something caching mechanism, is that after reloading
tomcat, I want those .png files to be served fast (as in map:read ...).

- Joose

Joose Vettenranta, Intertechnika Oy
GSM: 044 561 0270

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

View raw message