<!-- ==================================================================== -->
+<!-- Create a page sequence for an element -->
+<xsl:template match="*" mode="page.sequence">
+ <xsl:param name="content" select="NOTANODE"/>
+ <xsl:param name="master-reference">
+ <xsl:call-template name="select.pagemaster"/>
+ </xsl:param>
+
+ <fo:page-sequence hyphenate="{$hyphenate}"
+ master-reference="{$master-reference}">
+ <xsl:attribute name="language">
+ <xsl:call-template name="l10n.language"/>
+ </xsl:attribute>
+ <xsl:attribute name="format">
+ <xsl:call-template name="page.number.format">
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:attribute name="initial-page-number">
+ <xsl:call-template name="initial.page.number">
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:attribute name="force-page-count">
+ <xsl:call-template name="force.page.count">
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:attribute name="hyphenation-character">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'hyphenation-character'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="hyphenation-push-character-count">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'hyphenation-push-character-count'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:attribute name="hyphenation-remain-character-count">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'hyphenation-remain-character-count'"/>
+ </xsl:call-template>
+ </xsl:attribute>
+
+ <xsl:apply-templates select="." mode="running.head.mode">
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:apply-templates>
+
+ <xsl:apply-templates select="." mode="running.foot.mode">
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:apply-templates>
+
+ <fo:flow flow-name="xsl-region-body">
+ <xsl:call-template name="set.flow.properties">
+ <xsl:with-param name="element" select="local-name(.)"/>
+ <xsl:with-param name="master-reference" select="$master-reference"/>
+ </xsl:call-template>
+
+ <xsl:copy-of select="$content"/>
+
+ </fo:flow>
+ </fo:page-sequence>
+</xsl:template>
+
</xsl:stylesheet>