RE: [xsl] How to split sets into separate TR sets depending on maximumcolumn count

Subject: RE: [xsl] How to split sets into separate TR sets depending on maximumcolumn count
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 7 Jun 2003 20:47:19 +0100
Look in the FAQ under "Tables", the very first entry.

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Dave Bartmess
> Sent: 07 June 2003 20:12
> To: XSL List
> Subject: [xsl] How to split sets into separate TR sets 
> depending on maximumcolumn count
> 
> 
> I'm trying to establish a web page showing pictures from 
> directories, but the number of pictures (using thumbnails) 
> for one single page may exceed the limits of the web page 
> screen output.
> 
> For example, a directory contains 20 pictures, but the web 
> page has a maximum column count of 5.
> 
> But when transforming I keep running up against the fact that 
> <TR> and </TR> elements can't be split into two <xsl:if> 
> statements, causing me to only get one <TD> element per 
> <TR></TR>, or ALL the <TD> elements for the number of 
> pictures in the directory in one <TR></TR> pair.
> 
> Can someone tell me how to transform this XML (shown below) 
> to allow the output to look like this:
> 
> <TR>
>   <TD>
>     ...Some picture...
>   </TD>
>   <TD>
>     ...Some picture...
>   </TD>
>   <TD>
>     ...Some picture...
>   </TD>
>   <TD>
>     ...Some picture...
>   </TD>
>   <TD>
>     ...Some picture...
>   </TD>
> </TR>
> <TR>
>    ...etc etc ...
> </TR>
> 
> 
> XML doc:
>     <folder name="2003" path="images">
>         <Picture name="dsc01842.jpg">
>             <thumbnail name="dsc01842_thumb.jpg" width="80" 
> height="80" />
>         </Picture>
>         <Picture name="dsc01843.jpg">
>             <thumbnail name="dsc01843_thumb.jpg" width="80" 
> height="80" />
>         </Picture>
>         <Picture name="ReadyForWar.jpg">
>             <thumbnail name="ReadyForWar_thumb.jpg" 
> width="80" height="80" />
>         </Picture>
>         <Picture name="dsc01844.jpg">
>             <thumbnail name="dsc01844_thumb.jpg" width="80" 
> height="80" />
>         </Picture>
>         <Picture name="dsc01845.jpg">
>             <thumbnail name="dsc01845_thumb.jpg" width="80" 
> height="80" />
>         </Picture>
>         <Picture name="ReadyForWar2.jpg">
>             <thumbnail name="ReadyForWar2_thumb.jpg" 
> width="80" height="80" />
>         </Picture>
>         <Picture name="Farmer_Michael_and_guitar.jpg">
>             <thumbnail name="Farmer_Michael_and_guitar_thumb.jpg"
> width="80" height="80" />
>         </Picture>
>     </folder>
> 
> -- 
> David A. Bartmess
> Software Configuration Manager / Sr. Software Developer
> eDingo Enterprises
> http://edingo.net
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread