You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Steve Quirk <sq...@ieee.org> on 2007/03/14 01:49:18 UTC

keep-together implementation

I'm using keep-together to maintain adjacent data on the page, but I need 
it to flow to the next page if it doesn't fit.  The xsl is

   <fo:table-cell column-number="5" text-indent="3mm">
     <fo:block keep-together.within-page="1">
       <fo:block padding-top="2mm">
           Piece Count: <xsl:value-of select="count(Items/Item)"/>
       </fo:block>
       <xsl:for-each select="Items/Item">
         <fo:block padding-top="1mm" font-size="9pt">
           <xsl:value-of select="TrackingNumber"/>
         </fo:block>
       </xsl:for-each>
     </fo:block>
   </fo:table-cell>

But if the number of Items is too large, it runs off the page and doesn't 
flow to the next page.  Did I do something wrong?

keep-with-next/keep-with-previous doesn't produce the desired effect: 
keeping the item count and item list on the same page when possible. 
(The result is the same as keep-together="auto").

I'm not sure of the implication of the spec here 
http://www.w3.org/TR/xsl/#keepbreak, the explaination here 
http://www.biglist.com/lists/xsl-list/archives/200506/msg00534.html sounds 
reasonable, but I'm not sure how it's implemented by apache fo.

An alternative solution would be to induce a page break if the Item block 
won't fit on the current page.  Is this possible?

Thanks for any insight.

Steve

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org