views:

81

answers:

1

I have a linear list of items which I wish to arrange in a table using XSLT. I wish to specify the number of columns as a parameter. For example, if I have a list of 12 items, I can select a 2x6, 3x4, 4x3 or 6x2 table. I cannot see a general way to do this.

I have seen this article: http://www.nedcomp.nl/support/origdocs/xml4/extracted/xpath_hdi_1_4llx.aspx

It tells you how to generate a table with a specific number of columns, but does not allow a general case. (Ideally there would be a loop for the xsl:value-of lines).

Thanks

Mark

+3  A: 

This is possible, in earlier answers of mine I show ways to do it.

To give an answer that fits your needs better, you'd have do show your XML.

Tomalak
Thanks. Your solution works perfectly.
Mark Sp
@Mark: Glad to hear! :-) (P.S.: Please mark the answer as accepted, if your problem is solved and have no further questions. Thank you.)
Tomalak