[xsl] fo:table - won't wrap to next page?

Subject: [xsl] fo:table - won't wrap to next page?
From: Nate Austin <naustin@xxxxxxxxxx>
Date: Wed, 15 Jan 2003 15:04:33 -0600
I'm finally making the jump to FO (previously I just stuck with XSLT), and
loving it except for a few nagging problems.  Here's the main one:

Everything I see in the spec, etc. tells me that a table should
automatically break at the bottom of a page and continue on to the next.  It
doesn't seem to matter what attributes I set or anything, the following
table blows right through my footer and out the bottom of the page (cuts off
any extra table-row's).  Would someone please shed some light on what I'm
missing here?

Table follows:

<fo:table-and-caption>
<fo:table-caption><fo:block text-align="center"
font-weight="bold">CAPTION</fo:block></fo:table-caption>
<fo:table border="2.2pt double" border-collapse="collapse">
<fo:table-column column-width="72pt"/>
<fo:table-column column-width="216pt"/>
<fo:table-column column-width="72pt"/>
<fo:table-header border="solid thin">
  <fo:table-row>
  <fo:table-cell border="solid thin"><fo:block text-align="center"
font-weight="bold">Quantity</fo:block></fo:table-cell>
  <fo:table-cell border="solid thin"><fo:block text-align="center"
font-weight="bold">Description</fo:block></fo:table-cell>
  <fo:table-cell border="solid thin"><fo:block text-align="center"
font-weight="bold">Amount</fo:block></fo:table-cell>
  </fo:table-row>
</fo:table-header>
<fo:table-footer>
  <fo:table-row>
  <fo:table-cell number-columns-spanned="3" border="solid thin"
background-color="#ededed"><fo:block text-align="right"
font-weight="bold">Total Amount:  $<xsl:value-of
select="format-number(sum(item/cost),'#,##0.00')"/></fo:block></fo:table-cel
l>
  </fo:table-row>
</fo:table-footer>
<fo:table-body border="solid thin">
<xsl:for-each select="AS">
  <fo:table-row break-before="page">
    <fo:table-cell border="solid thin"><fo:block
text-align="right"><xsl:value-of
select="item/quantity"/></fo:block></fo:table-cell>
    <fo:table-cell border="solid thin" padding-left="2pt"><fo:block
text-align="start"> <xsl:value-of select="
item/desc"/></fo:block></fo:table-cell>
    <fo:table-cell border="solid thin"><fo:block
text-align="right"><xsl:value-of
select="item/cost"/></fo:block></fo:table-cell>
  </fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:table-and-caption>

Sample XML:

<data>
   <item>
     <desc>Item 1</desc>
     <quantity>1</quantity>
     <cost>100.00</cost>
  </item>
   <item>
     <desc>Item 2</desc>
     <quantity>1</quantity>
     <cost>1000.00</cost>
  </item>
   <item>
     <desc>Item 3</desc>
     <quantity>1</quantity>
     <cost>1500.00</cost>
  </item>
</data>

Nate Austin
International Decision Systems
(612) 851-3200
naustin@xxxxxxxxxx
 

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


Current Thread