]> granicus.if.org Git - docbook-dsssl/commitdiff
Generate localized title for Refsynopsisdiv if no appropriate
authorMichael Smith <xmldoc@users.sourceforge.net>
Thu, 29 Sep 2005 15:00:45 +0000 (15:00 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Thu, 29 Sep 2005 15:00:45 +0000 (15:00 +0000)
Title descendant found in source. Closes #1212398. This change
makes behavior for the Synopsis title consistent with the behavior
of HTML and manpages output.

Also, added xsl:use-attribute-sets="normal.para.spacing" to block
generated for Cmdsynopsis output. Previously, that block had no
spacing at all specified, which resulted it being crammed up to
closely to the Synopsis head.

xsl/fo/refentry.xsl
xsl/fo/synop.xsl

index 78c7061d4cd5647ef432d4f957b58147eb0f4c77..1aec7b5811afbf6fce2bf5532c2b0f6a1c1d61c0 100644 (file)
   </xsl:variable>
 
   <fo:block id="{$id}">
+    <xsl:if test="not(refsynopsisdivinfo/title|docinfo/title|info/title|title)">
+      <!-- * if we there is no appropriate title for this Refsynopsisdiv, -->
+      <!-- * then we need to call format.refentry.subheading to generate one -->
+      <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
+                xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style"
+                font-family="{$title.fontset}">
+        <!-- Contents of what is now the format.refentry.subheading -->
+        <!-- template were formerly intended to be used only to -->
+        <!-- process those subsections of Refentry that have "real" -->
+        <!-- title children. So as a kludge to get around the fact -->
+        <!-- that the template still basically "expects" to be -->
+        <!-- processing that kind of a node, when we call the -->
+        <!-- template to process generated titles, we must call it -->
+        <!-- with values for the "offset" and "section" parameters -->
+        <!-- that are different from the default values in the -->
+        <!-- format.refentry.subheading template itself. Because -->
+        <!-- those defaults are the values appropriate for processing -->
+        <!-- "real" title nodes. -->
+        <xsl:call-template name="format.refentry.subheading">
+          <xsl:with-param name="section" select="parent::*"/>
+          <xsl:with-param name="offset" select="1"/>
+          <xsl:with-param name="gentext.key" select="'RefSynopsisDiv'"/>
+        </xsl:call-template>
+      </fo:block>
+    </xsl:if>
     <xsl:call-template name="refsynopsisdiv.titlepage"/>
     <xsl:apply-templates/>
   </fo:block>
index 6ab561c3a9ecc4ca9b039191746844daa5b90424..60e2c4ae98bfa2d94d5d4a467892cf8b8f248664 100644 (file)
@@ -24,7 +24,7 @@
 <!-- ==================================================================== -->
 
 <xsl:template match="cmdsynopsis">
-  <fo:block>
+  <fo:block xsl:use-attribute-sets="normal.para.spacing">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>