[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to split sets into separate TR sets depending on m

Subject: How to split sets into separate TR sets depending on maximumcolumn count
From: "Dave Bartmess" <dingodave@xxxxxxxxxx>
Date: 07 Jun 2003 13:12:08 -0600
tr sets
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.