]> granicus.if.org Git - docbook-dsssl/commitdiff
Removed 'keep-with-next' from 'formal.title.properties' attribute set now
authorBob Stayton <bobs@sagehill.net>
Thu, 19 Sep 2002 08:35:12 +0000 (08:35 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 19 Sep 2002 08:35:12 +0000 (08:35 +0000)
that the stylesheets support the option of putting such
titles below the object.  Now the $placement value determines
if 'keep-with-next' or 'keep-with-previous' is used in the
title block.

xsl/fo/formal.xsl

index 8b48fd2ee873923cd1a9c9cbb5f992e200f5dbb9..6fc14ea4de317bdfbe9698cff07bae364fa7a97c 100644 (file)
 
 <xsl:template name="formal.object.heading">
   <xsl:param name="object" select="."/>
+  <xsl:param name="placement" select="'before'"/>
   <fo:block xsl:use-attribute-sets="formal.title.properties">
+    <xsl:choose>
+      <xsl:when test="$placement = 'before'">
+        <xsl:attribute
+               name="keep-with-next.within-column">always</xsl:attribute>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:attribute
+               name="keep-with-previous.within-column">always</xsl:attribute>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:apply-templates select="$object" mode="object.title.markup">
       <xsl:with-param name="allow-anchors" select="1"/>
     </xsl:apply-templates>
               keep-together.within-column="1">
 
       <xsl:if test="$placement = 'before'">
-        <xsl:call-template name="formal.object.heading"/>
+        <xsl:call-template name="formal.object.heading">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
       </xsl:if>
 
       <fo:table border-collapse="collapse">
       </fo:table>
 
       <xsl:if test="$placement != 'before'">
-        <xsl:call-template name="formal.object.heading"/>
+        <xsl:call-template name="formal.object.heading">
+          <xsl:with-param name="placement" select="$placement"/>
+        </xsl:call-template>
       </xsl:if>
     </fo:block>
   </xsl:variable>