This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: A fascinating puzzle
- To: xsl-list at mulberrytech dot com
- Subject: Re: A fascinating puzzle
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 16 May 2000 17:23:01 +0100 (BST)
- References: <39215A55.A6DB92A5@courts.state.wi.us>
- Reply-To: xsl-list at mulberrytech dot com
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() <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