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

RE: Disable Output Escaping - really useful

Subject: RE: Disable Output Escaping - really useful
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Wed, 22 Mar 2000 12:54:37 -0000
disable output escaping for td

> -----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


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.