cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: [RT] the quest for the perfect template language
Date Thu, 03 Apr 2003 21:06:19 GMT
Robert Koberg wrote:
> Hmmm... You seem to be making this much more complex than it needs to be.
> 
> Why not do something like this:
> 
> XSL:
> <xsl:template match="fotografie">
>   <xsl:apply-templates/>
> </xsl:template>
> 
> <xsl:template match="foto">
>   <div class="thumbnail" onclick="expandImage()">
>     <div class="imageContainer">    
>       <img src="{@id}" class="img"/>
>     </div>
>     <div class="description">
>       <xsl:apply-templates select="."/>
>     </div>
>   </div>
> </xsl:template>
> 
> CSS:
> .thumbnail {
> display:inline;
> margin:10px;
> }
> 
> .imageContainer {
> padding:3px;
> border:1px solid blue;
> }
> 
> .img {
> width:20px;
> height:20px;
> }
> 
> .description {
> font-size:80%;
> padding:10px;
> }
> 
> With this you can have you gallery have the columns fit the width of the
> (resized) window and they will wrap when necessary. Perhaps I am missing why
> you need the complexity?

Because I need a 'matrix' of thumbnails, with the number of columns in 
this matrix/table to be customizable. Your stylesheet generates only one 
column all the time.

Stefano.



Mime
View raw message