|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: displaying a list in a multi-column table
> You've got a grouping problem - which is easier to solve in XSLT 2.0. > You can use something like this: > > <table> > <xsl:for-each-group select="word" group-by="position() mod 4"> > <tr> > <xsl:for-each select="current-group()"> > <td><xsl:value-of select="."/></td> > </xsl:for-each> > </tr> > </xsl:for-each-group> > </table> > If the data is to be in columns, then I think it needs to be <xsl:for-each-group select="word" group-by="position() mod (last() idiv 4)"> At least that's what the example on page 300 of XSLT Prog Ref 3rd ed says... Michael Kay http://www.saxonica.com/
|
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
|






