cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <>
Subject RE: Map serialize flowscript output
Date Tue, 12 May 2009 13:24:45 GMT
I made a mistake in the xslt template ;-)


<xsl:template mactch="favourite">


   <xsl:attribute name="xlink:href" select="url" />

   <text x="10" y="20"><xsl:value-of select="description" /></text>





From: Robby Pelssers [] 
Sent: Tuesday, May 12, 2009 3:09 PM
Subject: RE: Map serialize flowscript output


If I have time this week I might try to create a more advanced tutorial on creating SVG. 


-          Use xml data as input for the images

-          The images show basic animation and hyperlinks


I can't really point you to good material at the moment.  At the time I did that project (2002)
I just googled a lot and created the SVG's by hand.  After that project I completely was thinking
in matrix/coordinates ;-)


The most difficult stuff I encountered was finding clever algorithms to position my SVG elements
on the canvas and having my elemens scale automatically if the use case had to many svg elements
to be drawn.


Just some quick example of links in SVG:


<svg xmlns=""



    <a xlink:href="">

        <text x="10" y="20">Apache Cocoon</text>




Take a quick look at  for additional info.



If you were to create the SVG with xslt, you could create a template.


Suppose your input looks like:



    <description>Google: Search engine</description>




    <description>Apache Cocoon: Java web development framework</description>

   <url> </url>




Xslt snippet:


<xsl:template mactch="favourite">

  <a xlink:href="">

   <xsl:attribute name="xlink:href" select="url" />  <!-not  100% sure anymore if
this will work with prefix:elementname à

   <text x="10" y="20"><xsl:value-of select="description" /></text>





One thing to note:  Take a look at 


I did not use this back then but I think it will make life easier and your code more reusable
and maintainable.







From: Christian Decker [] 
Sent: Tuesday, May 12, 2009 2:32 PM
Subject: Re: Map serialize flowscript output


That's really cool Robby,

actually I am trying to do something similar. What I need to do is embed clickable links into
the SVG image so that the users can then go to the details page of the item they clicked on.
Problem is that I'm using JGraph to do the layout of the graph and I have absolutely no clue
on how to pass the link data on through the layouting. Could you point me in the right direction
for this? Also the animation stuff sounds cool, do you have some good resources about that

Thanks for the help everybody, I'll try that as soon as possible ^^

Christian Decker
Software Architect

On Tue, May 12, 2009 at 11:27 AM, Robby Pelssers <> wrote:

And here's my response ;-)  I posted it on the blog as well.

"If the images do not require animation you can just serialize the
images to png or jpeg for instance.  At the first project i ever did
with SVG we used animated images for mobile network visualization. It
showed extra information if you hovered over the network elements. It
also offered hyperlinks to detailed information pages.  It was the
coolest project i've ever done but we were using the adobe plugin.  I
guess you're right why the need for a plugin to get all SVG
functionality working is a real showstopper ;-( "


-----Original Message-----
From: Derek Hohls []
Sent: Tuesday, May 12, 2009 11:12 AM

Subject: RE: Map serialize flowscript output

Added a blog comment Robby...

>>> On 2009/05/12 at 10:42, in message
<7C655C04B6F59643A1EF66056C0E095E023CC495@eusex01.sweden.ecsoft>, "Robby
Pelssers" <> wrote:
Yes... Jasha is right.

For the ones interested I wrote a small article on my blog showing you
how to create simple dynamic SVG images using Apache Cocoon.


-----Original Message-----
From: Jasha Joachimsthal []
Sent: Tuesday, May 12, 2009 7:03 AM
Subject: Re: Map serialize flowscript output

2009/5/12 Christian Decker <>:
> Hi everybody,
> I've created a transformer for the sitemap that takes a GXL file as
> and then applies layout algorithm and then passes the resulting graph
on as
> SVG image. It all works fine, but now I wanted to use JX to fill in a
> template that would then be transformed and serialized, but I can't
get it
> to work. Apparently the pages I send back with cocoon.sendPage are not
> transformed.
> Long story short: I have the following matcher:
> <map:match pattern="project.svg">
>   <map:call function="projectGraph">
>     <map:parameter name="screenURI"
value="screen/screens/project-graph" />
>     <map:parameter name="projectID" value="1" />
>   </map:call>
>   <map:transform type="gxl2svgTransformer"/>
>   <map:serialize type="svgxml"/>
> </map:match>
> But this just prints me the filled in template instead of feeding it
> the gxl2svgtransformer. The transformers work fine as I already tested
> with a simple generate tag. The flowscript sends pages using
> cocoon.sendPage( cocoon.parameters[ "screenURI" ], {"project"
> "dao" :dao} );
> Somehow I think I got the sitemap concept wrong. Somebody got an idea?
With the cocoon.sendPage you're passing the request processing on to
the pipeline that matches screenURI. In that pipeline you should do
the svg serialisation.

Jasha Joachimsthal -
Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
94952-5100 +1 (707) 773-4646

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

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

This message is subject to the CSIR's copyright terms and conditions,
e-mail legal notice, and implemented Open Document Format (ODF)
The full disclaimer details can be found at

This message has been scanned for viruses and dangerous content by
and is believed to be clean.  MailScanner thanks Transtec Computers for
their support.

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

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


View raw message