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 Costantino Sertorio <co...@ams.com> on 2002/01/28 16:50:58 UTC

keep-with-next?

Hello,
Is the keep-with-next attribute supported by FOP?
If yes, can anybody explain to me what I am doing wrong?
I have a "heading" template which I would like to keep together with the
following text, therefore I defined the following, but it doesn't work (the
following paragraph ends up in the next page):

  <xsl:template match="heading">
    <xsl:choose>
      <xsl:when test="@level='1'">
        <fo:block keep-with-next="always" space-before="0.6cm" space-after
="0.6cm" font-size="13pt" font-weight="bold">
           <xsl:apply-templates/>
        </fo:block>
      </xsl:when>
      <xsl:when test="@level='2'">
        <fo:block keep-with-next="always" space-before="5mm"  font-size="
10pt" font-weight="bold">
           <xsl:apply-templates/>
        </fo:block>
      </xsl:when>

Thank you,

Costantino