cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [C2] Stylebook features
Date Tue, 23 May 2000 22:25:09 GMT
Ross Burton wrote:
> 
> > > Any ideas of what would be the cleanest way of implementing this idea in
> > > Cocoon 2?
> >
> > I would have thought SVG is the cleanest and simplest way of
> > achieving that - gives you total flexibility to build the
> > images as you see fit, and we can serialize them to PNG
> > (using your code, Ross ;) until the browsers support SVG
> > directly.
> 
> My point was that in Stylebook it is easy to automatically create a set of
> files by simply calling a XSL template.  An example ripped straight from the
> Stylebook docs:
> 
>     ...
>     <xsl:call-template name="header">
>       <xsl:with-param name="id"     select="@id"/>
>       <xsl:with-param name="source" select="@source"/>
>       <xsl:with-param name="label"  select="@label"/>
>     </xsl:call-template>
>     ...
> 
>   <xsl:template name="header">
>     <xsl:param name="id"/>
>     <xsl:param name="source"/>
>     <xsl:param name="label"/>
>     <xsl:param name="type"/>
> 
>     <create source="{$source}" target="graphics/{$id}-header.jpg"
> producer="parser" printer="image">
>       <processor name="xslt">
>         <parameter name="stylesheet"
> value="sbk:/style/stylesheets/document2image.xsl"/>
>       </processor>
>     </create>
>   </xsl:template>
> 
> Stylebook (as far as I know) understands the <create> tag and does the work.
> The point is that by simply having the name and ID of a label, an image of
> it can be generated easily.  I don't think I'm missing anything here (though
> I propably am) but can anyone see a way of reproducing this "automatic"
> behaviour?

This is not magic or anything.... it's a sitemap. Just link the image
you want in your page and them apply the SVG formatter when you create
that link.

It's even easier than using XSLT all over the place (like Stylebook
does).

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message