[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Filling out a table row
Hi Sam,
One way is to check if there are missing elements and add a td for each missing image. <tr> <xsl:for-each select=".|following-sibling::image[position() < 5]"> <td><xsl:value-of select="concat(@name,':',.)"/></td> </xsl:for-each> <xsl:if test="not(following-sibling::image[4])"> <td> </td> <xsl:if test="not(following-sibling::image[3])"> <td> </td> <xsl:if test="not(following-sibling::image[2])"> <td> </td> <xsl:if test="not(following-sibling::image[1])"> <td> </td> </xsl:if> </xsl:if> </xsl:if> </xsl:if> </tr> Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Sam Carleton wrote: I have a node set that I need to get into a table with 5 columns and how ever many rows there needs to be. I have the basic code working. The problem I have is the table is not finished when the node set is not a multiple of 5. Here is a same dataset:
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|