]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure bridgeheads are not numbered in all contexts, including html title attributes.
authorBob Stayton <bobs@sagehill.net>
Wed, 16 Jan 2013 18:56:16 +0000 (18:56 +0000)
committerBob Stayton <bobs@sagehill.net>
Wed, 16 Jan 2013 18:56:16 +0000 (18:56 +0000)
xsl/common/gentext.xsl
xsl/common/labels.xsl

index bfb5e300399b13ab6cfb0a51811ef025a8b49192..197815fd63b88ddf4bd45c88f942ce4d09109209 100644 (file)
 </xsl:template>
 
 <xsl:template match="bridgehead" mode="is.autonumber">
-  <xsl:value-of select="$section.autolabel"/>
+  <!-- bridgeheads are not numbered -->
+  <xsl:text>0</xsl:text>
 </xsl:template>
 
 <xsl:template match="procedure" mode="is.autonumber">
index 6c81d4513bdc5b7cc51e41cc00f82194941910c7..ec49eb85ddf40946adc6a41df5d4d4505cb07631 100644 (file)
@@ -378,24 +378,7 @@ element label.</para>
 </xsl:template>
 
 <xsl:template match="bridgehead" mode="label.markup">
-  <!-- FIXME: could we do a better job here? -->
-  <xsl:variable name="contsec"
-                select="(ancestor::section
-                         |ancestor::simplesect
-                         |ancestor::topic
-                         |ancestor::sect1
-                         |ancestor::sect2
-                         |ancestor::sect3
-                         |ancestor::sect4
-                         |ancestor::sect5
-                         |ancestor::refsect1
-                         |ancestor::refsect2
-                         |ancestor::refsect3
-                         |ancestor::chapter
-                         |ancestor::appendix
-                         |ancestor::preface)[last()]"/>
-
-  <xsl:apply-templates select="$contsec" mode="label.markup"/>
+  <!-- bridgeheads are not normally numbered -->
 </xsl:template>
 
 <xsl:template match="refsect1" mode="label.markup">
@@ -821,6 +804,8 @@ element label.</para>
   </xsl:variable>
 
   <xsl:choose>
+    <!-- bridgeheads are not numbered -->
+    <xsl:when test="$section/self::bridgehead">0</xsl:when>
     <xsl:when test="$level &lt;= $section.autolabel.max.depth">      
       <xsl:value-of select="$section.autolabel"/>
     </xsl:when>