]> granicus.if.org Git - docbook-dsssl/commitdiff
Added template to process part element in mode object.title.template
authorBob Stayton <bobs@sagehill.net>
Sun, 10 Jul 2005 08:54:39 +0000 (08:54 +0000)
committerBob Stayton <bobs@sagehill.net>
Sun, 10 Jul 2005 08:54:39 +0000 (08:54 +0000)
so it can properly choose gentext template for numbered
or unnumbered parts.

xsl/common/gentext.xsl

index 3fac3d9b2de3afcd8f8fa6ab6562e8f64afd03ef..7b318a0f479bb1280ff31bf15083fcbe039f903a 100644 (file)
   </xsl:choose>
 </xsl:template>
 
+<xsl:template match="part" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="string($part.autolabel) != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-unnumbered'"/>
+        <xsl:with-param name="name">
+          <xsl:call-template name="xpath.location"/>
+        </xsl:with-param>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
                      |bridgehead"
               mode="object.title.template">