]> granicus.if.org Git - docbook-dsssl/commitdiff
Separate qanda set title properties from section heading
authorBob Stayton <bobs@sagehill.net>
Sun, 22 Jun 2003 20:19:57 +0000 (20:19 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 22 Jun 2003 20:19:57 +0000 (20:19 +0000)
properties so they can be customized without conflict.

xsl/fo/param.ent
xsl/fo/param.xweb
xsl/fo/qandaset.xsl

index ed3f479689962350e7ba15f74e4db8e53c48d7e3..d44773a0e724f40bc66b1e4658cad14eff265acb 100644 (file)
 <!ENTITY column.gap.index SYSTEM "../params/column.gap.index.xml">
 <!ENTITY column.gap.lot SYSTEM "../params/column.gap.lot.xml">
 <!ENTITY column.gap.titlepage SYSTEM "../params/column.gap.titlepage.xml">
+<!ENTITY qanda.title.properties SYSTEM "../params/qanda.title.properties.xml">
+<!ENTITY qanda.title.level1.properties SYSTEM "../params/qanda.title.level1.properties.xml">
+<!ENTITY qanda.title.level2.properties SYSTEM "../params/qanda.title.level2.properties.xml">
+<!ENTITY qanda.title.level3.properties SYSTEM "../params/qanda.title.level3.properties.xml">
+<!ENTITY qanda.title.level4.properties SYSTEM "../params/qanda.title.level4.properties.xml">
+<!ENTITY qanda.title.level5.properties SYSTEM "../params/qanda.title.level5.properties.xml">
+<!ENTITY qanda.title.level6.properties SYSTEM "../params/qanda.title.level6.properties.xml">
index a036831cb23c8e0b74e66b7799cfaf03d67b6533..98f54bab9aaf16e8b6fe377a5bd1dd8bd754db3a 100644 (file)
@@ -388,6 +388,13 @@ zero by default, so this is simply the page-master region-left.
 &table.properties;
 &procedure.properties;
 &root.properties;
+&qanda.title.properties;
+&qanda.title.level1.properties;
+&qanda.title.level2.properties;
+&qanda.title.level3.properties;
+&qanda.title.level4.properties;
+&qanda.title.level5.properties;
+&qanda.title.level6.properties;
 </reference>
 
 <reference><title>Profiling</title>
index 2898b2871a0d6a414cc79cfeaecffc1c6d4ed0bc..86992b1395097089f1dc4a0a6f2bc196406e4054 100644 (file)
@@ -59,7 +59,7 @@
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:call-template name="section.heading">
+  <xsl:call-template name="qanda.heading">
     <xsl:with-param name="level" select="$sectlvl + 1"/>
     <xsl:with-param name="marker" select="0"/>
     <xsl:with-param name="title">
     </xsl:call-template>
   </xsl:variable>
 
-  <xsl:call-template name="section.heading">
+  <xsl:call-template name="qanda.heading">
     <xsl:with-param name="level"  select="$sectlvl + 1 + count(ancestor::qandadiv)"/>
     <xsl:with-param name="marker" select="0"/>
     <xsl:with-param name="title">
   <xsl:apply-templates/>
 </xsl:template>
 
+<xsl:template name="qanda.heading">
+  <xsl:param name="level" select="1"/>
+  <xsl:param name="marker" select="0"/>
+  <xsl:param name="title"/>
+  <xsl:param name="titleabbrev"/>
+
+  <fo:block xsl:use-attribute-sets="qanda.title.properties">
+    <xsl:if test="$marker != 0">
+      <fo:marker marker-class-name="section.head.marker">
+        <xsl:choose>
+          <xsl:when test="$titleabbrev = ''">
+            <xsl:value-of select="$title"/>
+          </xsl:when>
+          <xsl:otherwise>
+            <xsl:value-of select="$titleabbrev"/>
+          </xsl:otherwise>
+        </xsl:choose>
+      </fo:marker>
+    </xsl:if>
+    <xsl:choose>
+      <xsl:when test="$level=1">
+        <fo:block xsl:use-attribute-sets="qanda.title.level1.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=2">
+        <fo:block xsl:use-attribute-sets="qanda.title.level2.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=3">
+        <fo:block xsl:use-attribute-sets="qanda.title.level3.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=4">
+        <fo:block xsl:use-attribute-sets="qanda.title.level4.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:when test="$level=5">
+        <fo:block xsl:use-attribute-sets="qanda.title.level5.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <fo:block xsl:use-attribute-sets="qanda.title.level6.properties">
+          <xsl:copy-of select="$title"/>
+        </fo:block>
+      </xsl:otherwise>
+    </xsl:choose>
+  </fo:block>
+</xsl:template>
+
 </xsl:stylesheet>