]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #451265: page number of first part is wrong
authorNorman Walsh <ndw@nwalsh.com>
Fri, 30 Nov 2001 12:08:32 +0000 (12:08 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Fri, 30 Nov 2001 12:08:32 +0000 (12:08 +0000)
xsl/fo/component.xsl
xsl/fo/division.xsl

index a4f41e7665e8c837abb0f9de889fd2ff66d89de1..f7521f4d8e1f1027b755fe3bce9c04963df684de 100644 (file)
     <xsl:attribute name="language">
       <xsl:call-template name="l10n.language"/>
     </xsl:attribute>
-    <xsl:if test="not(preceding::chapter)">
+
+    <!-- if there is a preceding chapter or this chapter appears in a part, the -->
+    <!-- page numbering will already be adjusted -->
+    <xsl:if test="not(preceding::chapter) and not(parent::part)">
       <xsl:attribute name="initial-page-number">1</xsl:attribute>
     </xsl:if>
     <xsl:if test="$double.sided != 0">
index c0a82ef7f0715ab31568510584d9b8d3eaa0e103..275e964d25a3750ae239f8e555cc4f448b7b3910 100644 (file)
       <xsl:attribute name="language">
         <xsl:call-template name="l10n.language"/>
       </xsl:attribute>
+
+      <!-- if there is a preceding chapter or part, page numbering will already -->
+      <!-- be adjusted, otherwise restart the page numbers -->
+      <xsl:if test="not(preceding::chapter) and not(preceding::part)">
+        <xsl:attribute name="initial-page-number">1</xsl:attribute>
+      </xsl:if>
+
       <xsl:if test="$double.sided != 0">
         <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
       </xsl:if>