This is a FAQ -- XSLT deals with nodes -- not with tags.
<TR> and </TR> are not nodes, but tags.
Try to think nodes, not tags.
The link below contains a solution to the problem how to output the nodes of
a node-set into a table with N columns and also to colour every second row
with a specified colour.
http://www.topxml.com/code/default.asp?p=3&id=v20020514091249
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
"Dave Bartmess" <dingodave(_at_)edingo(_dot_)net> wrote in message
news:1055013128(_dot_)2138(_dot_)40(_dot_)camel(_at_)Dingo(_dot_)(_dot_)(_dot_)
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