Re: A fascinating puzzle

Subject: Re: A fascinating puzzle
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 May 2000 17:23:01 +0100 (BST)
this is the same problem as the faq of distributing cells into an n
column table, even though you described it as the problem of doing a 33
row page.

<xsl:for-each select="record[position() mod 33 = 1]">
<page>
<xsl:apply-templates select=".|following-sibling::record[position() &lt;33]"/>
<call-template name="pad">
  <xsl:with-param name="x" select="count(following-sibling::record)"/>
</xsl:call-template>
</page>
</xsl:for-each>

where the pad named template does nothing unless the param is less than
33 in which case it adds a line break and recurses adding one to the
parameter until it gets up to 33.

David
(untested)


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread