]> granicus.if.org Git - docbook-dsssl/commitdiff
Add missing template for tocdiv/title elements to fix bug #1310.
authorBob Stayton <bobs@sagehill.net>
Tue, 3 Sep 2013 16:26:58 +0000 (16:26 +0000)
committerBob Stayton <bobs@sagehill.net>
Tue, 3 Sep 2013 16:26:58 +0000 (16:26 +0000)
xsl/fo/toc.xsl
xsl/html/toc.xsl

index 4095c636c7969385fddc272c05b432ad5917cf6a..8ca82330e19104d57274fe86c9a6bbd58f4f6307 100644 (file)
 </xsl:template>
 
 <xsl:template match="tocentry|lotentry|tocdiv|tocfront|tocback">
-  <fo:block text-align-last="justify"
-            end-indent="2pc"
+  <fo:block end-indent="2pc"
             last-line-end-indent="-2pc">
+    <xsl:if test="@linkend or @pagenum">
+      <xsl:attribute name="text-align-last">justify</xsl:attribute>
+    </xsl:if>
     <fo:inline keep-with-next.within-line="always">
       <xsl:choose>
         <xsl:when test="@linkend">
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/title">
+<xsl:template match="toc/title | tocdiv/title">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/subtitle">
+<xsl:template match="toc/subtitle | tocdiv/subtitle">
   <fo:block font-weight="bold">
     <xsl:apply-templates/>
   </fo:block>
 </xsl:template>
 
-<xsl:template match="toc/titleabbrev">
+<xsl:template match="toc/titleabbrev |tocdiv/titleabbrev">
 </xsl:template>
 
 <!-- ==================================================================== -->
index 41d9733c4b56a8d68deadc6c79b73927d19a58ab..332ec82a2eec6b97c86ae2d7415b02a76c3bb97a 100644 (file)
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="toc/title">
+<xsl:template match="toc/title | tocdiv/title">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="toc/subtitle">
+<xsl:template match="toc/subtitle | tocdiv/subtitle">
   <div>
     <xsl:apply-templates select="." mode="common.html.attributes"/>
     <xsl:apply-templates/>
   </div>
 </xsl:template>
 
-<xsl:template match="toc/titleabbrev">
+<xsl:template match="toc/titleabbrev | tocdiv/titleabbrev">
 </xsl:template>
 
 <!-- ==================================================================== -->