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

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Mark Sp
  • 11
  • 1
  • http://stackoverflow.com/questions/2355952/xslt-rendering-a-node-sequence-as-m-x-n-table – Krab Mar 29 '10 at 09:34

1 Answers1

3

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.

Community
  • 1
  • 1
Tomalak
  • 332,285
  • 67
  • 532
  • 628
  • @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 Mar 30 '10 at 11:18