W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2002

how to avoid page breaks between two block

From: Florence Deforge <florence.deforge@europe.planete-inter.fr>
Date: Tue, 21 May 2002 16:47:35 +0200
Message-ID: <025501c200d6$755e7080$fb100850@PI2000>
To: <www-xsl-fo@w3.org>
Hello
I'm facing a problem trying to display several tables with a Title before
each table.
I want the page to display each sequence "title / table" without a page
break. That means the page break should always occurs before the Title, if
several pages are needed.

I wrote the following template, but there is still an innapropriate break
between a title and the following table.
Any advice would be greatly appreciated.


<xsl:for-each select="ltableau/tableau">
   <!-- first the title-->
   <fo:block space-before="15pt" padding-after="15pt"
keep-with-next="always">
    <fo:inline font-weight="bold" font-size="100%" >
     <xsl:value-of select="entetetableau/etiquette/valeur"/>
    </fo:inline>
   </fo:block>
   <!-- then the table-->
   <fo:table border="0.5pt solid black" text-align="center"
keep-with-previous="always" space-after="10pt">
   <fo:table-body>
     <xsl:for-each select="lcase">
      <fo:table-row border="0.3pt solid black" keep-with-previous="always">
       <xsl:for-each select="case">
        <fo:table-cell border="0.3pt solid black">
         <fo:block font-size="65%">
          <xsl:value-of select="valeur"/>
         </fo:block>
        </fo:table-cell>
       </xsl:for-each>
      </fo:table-row>
     </xsl:for-each>
    </fo:table-body>
   </fo:table>
</xsl:for-each>
etc

Thanks in advance
Flo

PS : I'm using FOP to transform XML to pdf
Received on Tuesday, 21 May 2002 10:44:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:09 GMT