Lauren Commons <[EMAIL PROTECTED]> wrote: > I am producing pdfs that will have a bullet list that > I want to display in two columns, like newspaper > columns. I won't know in advance how many items will > be in the list.
I suppose you have ... <li>Item1</li> <li>Item2</li> <li>Item3</li> ... and want to display o Item1 o Item3 o Item2 or perhaps o Item1 o Item2 o Item3 (note the difference) This is not easy to achieve. A first shot would be to use a two column table distribute the list items equally between the columns. You have also to decide whether you want to use one row in the table or a row for every pair of items. A sample XSLT snippet (untested): <fo:table table-layout="fixed"> <fo:table-column column-width="proportional-column-width()"/> <fo:table-column column-width="proportional-column-width()"/> <fo:table-body> <fo:table-row> <xsl:for-each select="li[position() div 2=0]"> <fo:table-cell> <xsl:apply-templates> </fo:table-cell> <fo:table-cell> <xsl:apply-templates select="following-sibling:li"> </fo:table-cell> </xsl:for-each> </fo:table-row> </fo:table-body> </fo:table> This will generate the secont variant, with one row. If you want multiple rows, move the <fo:table-row> into the xsl:for-each The first variant is a bit harder to get. Whether the table solution matches your expectations is up to you. Having two columns with items flowing from the first to the second column to fill a minimal area seems to be much harder unless you want to have the whole page in two columns. Ask on the XSL list for more ideas. J.Pietschmann