This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A fascinating puzzle



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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]