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

Re: Implementing a multi-column list

From: David Carlisle <davidc@nag.co.uk>
Date: Tue, 3 Dec 2002 16:43:44 GMT
Message-Id: <200212031643.QAA11675@penguin.nag.co.uk>
To: Cindy.Hunt@sas.com
CC: www-xsl-fo@w3.org

If your list will always fit on one page it sounds like you can just
make a table.

I think your input is something like
<list cols="3">

> I need to count the number of items in the list and divide it by the
> number of columns they specified

<xsl:variable name="n" select="ceiling(count(item) div @cols"/>

<xsl:for-each select="item[position() &lt;= $n]">
<xsl:for-each select=".|following-sibling::item[position() mod $n = 0]">
   <xsl:value-of select="."/>

(with suitable FO replacements for <row and <cell


This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
Received on Tuesday, 3 December 2002 11:44:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:09:56 UTC