[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: A fascinating puzzle

Subject: Re: A fascinating puzzle
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 May 2000 17:23:01 +0100 (BST)
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.