]> granicus.if.org Git - docbook-dsssl/commitdiff
Added mode="page.sequence" to make it easier to put content
authorBob Stayton <bobs@sagehill.net>
Sun, 7 May 2006 07:17:14 +0000 (07:17 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 7 May 2006 07:17:14 +0000 (07:17 +0000)
into a page sequence.  First used for qandaset.

xsl/fo/component.xsl

index fdf6ccddefb9d119dd9a9ab8c77c7db3ac3b1227..d0ef2ff5be60e6a7d66641a396711877750c7c8e 100644 (file)
 
 <!-- ==================================================================== -->
 
+<!-- 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>