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

Keeping varying number of rows together

Subject: Keeping varying number of rows together
From: "Woosley, David" <David.Woosley@xxxxxxxx>
Date: Thu, 20 Feb 2003 10:29:00 -0500
keep rows together
I need to keep small clumps of table rows together on the same page, but the
solutions I've seen posted here are not working.  Assume the XML document
looks like this:

------------------------------

<record>
  <line stuff="aaa"/>
</record>
<record>
  <line stuff="bbb"/>
  <line stuff="bbb"/>
  <line stuff="bbb"/>
</record>
<record>
  <line stuff="ccc"/>
  <line stuff="ccc"/>
</record>

------------------------------

... and so forth.

Each record will contain from one to 'N' lines, where 'N' will probably be
less than five (5) or six (6).  This does NOT work:

------------------------------

<xsl:for-each select="record">

  <xsl:for-each select="line">

    <xsl:if test="position() = 1">
      <fo:table-row>
	  ...
      </fo:table-row>
    </xsl:if>

    <xsl:if test="position() > 1">
      <fo:table-row keep-with-previous.within-page="always">
	  ...
      </fo:table-row>
    </xsl:if>
    
  </xsl:for-each>

</xsl:for-each>

------------------------------

Any ideas on how to accomplish this goal?  Many thanks.

David Woosley
Iron Mountain Records Management
1000 Campus Drive
Collegeville, PA  19426
610-831-2657



 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.