Re: Implementing a multi-column list

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">
  <item>111</item>
  <item>111</item>
  <item>111</item>
</list>


> 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]">
<row>
<xsl:for-each select=".|following-sibling::item[position() mod $n = 0]">
 <cell>
   <xsl:value-of select="."/>
 </cell>
</xsl:for-each>
</row>
</xsl:for-each>


(with suitable FO replacements for <row and <cell

David

_____________________________________________________________________
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