double-sided output so last page of document ends on even page.
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'hyphenation-character'"/>
</xsl:when>
</xsl:choose>
- <xsl:if test="$double.sided = 0">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
</xsl:when>
</xsl:choose>
- <xsl:if test="$double.sided = 0">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
</xsl:when>
</xsl:choose>
- <xsl:if test="$double.sided = 0">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
</xsl:when>
</xsl:choose>
- <xsl:if test="$double.sided = 0">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
</xsl:when>
</xsl:choose>
- <xsl:if test="$double.sided = 0">
- <xsl:attribute name="force-page-count">no-force</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:choose>
<xsl:when test="$double.sided != 0">
<xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="force-page-count">no-force</xsl:attribute>
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:attribute name="format">
<xsl:call-template name="page.number.format"/>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">
<xsl:with-param name="element" select="'toc'"/>
</xsl:call-template>
</xsl:attribute>
- <xsl:if test="$double.sided != 0">
- <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
- </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="$double.sided != 0">
+ <xsl:attribute name="force-page-count">end-on-even</xsl:attribute>
+ <xsl:attribute name="initial-page-number">auto-odd</xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="force-page-count">no-force</xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:attribute name="hyphenation-character">
<xsl:call-template name="gentext">