]> granicus.if.org Git - docbook-dsssl/commitdiff
Use titlepage templates for indexdiv title formatting
authorNorman Walsh <ndw@nwalsh.com>
Mon, 20 Jan 2003 21:23:35 +0000 (21:23 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Mon, 20 Jan 2003 21:23:35 +0000 (21:23 +0000)
xsl/fo/autoidx.xsl
xsl/fo/index.xsl

index 96343b3510219284df798c4f0b0fda1cb53e2296..f4a720dae99f554f2deebdbfbb8ef78ef17cdb3f 100644 (file)
                                              substring(&primary;, 1, 1)))]"/>
   <fo:block>
     <xsl:if test="$others">
-      <fo:block font-size="16pt"
-                font-weight="bold"
-                keep-with-next.within-column="always"
-                space-before="1em">
-        <xsl:call-template name="gentext">
-          <xsl:with-param name="key" select="'index symbols'"/>
-        </xsl:call-template>
-      </fo:block>
+      <xsl:call-template name="indexdiv.title">
+        <xsl:with-param name="titlecontent">
+          <xsl:call-template name="gentext">
+            <xsl:with-param name="key" select="'index symbols'"/>
+          </xsl:call-template>
+        </xsl:with-param>
+      </xsl:call-template>
+
       <fo:block>
         <xsl:apply-templates select="$others[count(.|key('primary',
                                      &primary;)[&scope;][1]) = 1]"
                 [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
     <fo:block>
       <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
-        <fo:block font-size="16pt"
-                  font-weight="bold"
-                  keep-with-next.within-column="always"
-                  space-before="1em">
-          <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
-        </fo:block>
+        <xsl:call-template name="indexdiv.title">
+          <xsl:with-param name="titlecontent">
+            <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
+          </xsl:with-param>
+        </xsl:call-template>
       </xsl:if>
       <fo:block>
         <xsl:apply-templates select="key('letter', $key)[&scope;]
index 51b558738b313473b40daaa9d91ddb8eb5d6be89..1d59cdc0c5876c189f54163ce6d6a45613fa4023 100644 (file)
@@ -31,7 +31,6 @@
     </xsl:when>
     <xsl:otherwise>
       <fo:block id="{$id}">
-        <xsl:call-template name="component.separator"/>
         <xsl:call-template name="index.titlepage"/>
         <xsl:apply-templates/>
         <xsl:if test="count(indexentry) = 0 and count(indexdiv) = 0">
 
 <!-- ==================================================================== -->
 
-<xsl:template match="indexdiv">
-  <fo:block>
-    <xsl:apply-templates/>
-  </fo:block>
-</xsl:template>
+<xsl:template name="indexdiv.title">
+  <xsl:param name="title"/>
+  <xsl:param name="titlecontent"/>
 
-<xsl:template match="indexdiv/title">
-  <xsl:variable name="id">
-    <xsl:call-template name="object.id">
-      <xsl:with-param name="object" select=".."/>
-    </xsl:call-template>
-  </xsl:variable>
-  <fo:block font-size="16pt"
+  <fo:block margin-left="{$title.margin.left}"
+           font-size="14.4pt"
+            font-family="{$title.font.family}"
             font-weight="bold"
             keep-with-next.within-column="always"
-            space-before="1em">
+            space-before.optimum="{$body.font.master}pt"
+            space-before.minimum="{$body.font.master * 0.8}pt"
+            space-before.maximum="{$body.font.master * 1.2}pt">
+    <xsl:choose>
+      <xsl:when test="$title">
+        <xsl:apply-templates select="$title" mode="object.title.markup">
+          <xsl:with-param name="allow-anchors" select="1"/>
+        </xsl:apply-templates>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:copy-of select="$titlecontent"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
+<xsl:template match="indexdiv">
+  <fo:block>
+    <xsl:call-template name="indexdiv.titlepage"/>
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
+<xsl:template match="indexdiv/title"/>
+<xsl:template match="indexdiv/subtitle"/>
+<xsl:template match="indexdiv/titleabbrev"/>
+
 <!-- ==================================================================== -->
 
 <xsl:template match="indexterm">