W3C home > Mailing lists > Public > www-xsl-fo@w3.org > December 2002

Implementing a multi-column list

From: Cindy Hunt <Cindy.Hunt@sas.com>
Date: Tue, 3 Dec 2002 11:25:49 -0500
Message-ID: <187D6D956106D84E9D8B280F6458FE140FC0E6@merc12.na.sas.com>
To: <www-xsl-fo@w3.org>

Hi-

I wanted to see if anyone has done something similar to this and offer implementation suggestions. In our DTD, we have a list type that allows the user to specify the number of columns that they would like the list to format in via an attribute on the list element. The list then contains a series of 2 or more items that are just PCDATA.

Basically, I need to count the number of items in the list and divide it by the number of columns they specified. The items should then fill each column from top to bottom and then any remainders would be placed in the last column.

For example if the list contained 5 items and the user specified they wanted 3 columns it would look like so:

item 1	item 3	item 5    
item 2	item 4

Or if the list contained 5 items and the user specified they wanted 2 columns it would look like so:

item 1	item 4
item 2	item 5
item 3

Any suggestions are greatly appreciated!
Cindy Hunt
Received on Tuesday, 3 December 2002 11:26:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT