[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Disable Output Escaping - really useful
> -----Original Message----- >>In the template for loosegrids below, 5 items are put in each row. > When an item is the 5th, 10th, 15th etc. (using "position() mod 5 =0") it > should close this row and start the next > Anyone know a way of doing this without > disable-output-escaping? Is using > disable-output-escaping like this a bit of a hack? > Yes, it's a horrible hack. I posted the following solution a while back: <xsl:for-each select="item[position() mod 5 = 0] <tr> <td><xsl:value-of select="."/></td> <td><xsl:value-of select="following-sibling::item[1]"/></td> <td><xsl:value-of select="following-sibling::item[2]"/></td> <td><xsl:value-of select="following-sibling::item[3]"/></td> <td><xsl:value-of select="following-sibling::item[4]"/></td> </tr> </xsl:for-each> There are other solutions involving recursive templates. Mike Kay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|