]> granicus.if.org Git - docbook-dsssl/commitdiff
Use unnumbered gentext keys appropriately
authorNorman Walsh <ndw@nwalsh.com>
Thu, 3 Jan 2002 14:21:31 +0000 (14:21 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 3 Jan 2002 14:21:31 +0000 (14:21 +0000)
xsl/common/gentext.xsl

index cee0f3c78022447ec614a21c1eabeede358eda5e..e54ae2b52a7d3afe155171122f2cb6b18ca621f8 100644 (file)
   </xsl:call-template>
 </xsl:template>
 
+<xsl:template match="chapter" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$chapter.autolabel != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name" select="local-name(.)"/>
+      </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" select="local-name(.)"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template match="appendix" mode="object.title.template">
+  <xsl:choose>
+    <xsl:when test="$appendix.autolabel != 0">
+      <xsl:call-template name="gentext.template">
+        <xsl:with-param name="context" select="'title-numbered'"/>
+        <xsl:with-param name="name" select="local-name(.)"/>
+      </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" select="local-name(.)"/>
+      </xsl:call-template>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 <xsl:template match="section|sect1|sect2|sect3|sect4|sect5|simplesect
                      |bridgehead"
               mode="object.title.template">
   <xsl:choose>
     <xsl:when test="$section.autolabel != 0">
       <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'section-title-numbered'"/>
+        <xsl:with-param name="context" select="'title-numbered'"/>
         <xsl:with-param name="name" select="local-name(.)"/>
       </xsl:call-template>
     </xsl:when>
     <xsl:otherwise>
       <xsl:call-template name="gentext.template">
-        <xsl:with-param name="context" select="'section-title'"/>
+        <xsl:with-param name="context" select="'title-unnumbered'"/>
         <xsl:with-param name="name" select="local-name(.)"/>
       </xsl:call-template>
     </xsl:otherwise>