]> granicus.if.org Git - docbook-dsssl/commitdiff
Bug #558333: use containing section for the label of a bridgehead if section.autolabe...
authorNorman Walsh <ndw@nwalsh.com>
Tue, 9 Jul 2002 11:41:00 +0000 (11:41 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Tue, 9 Jul 2002 11:41:00 +0000 (11:41 +0000)
xsl/common/labels.xsl

index 54122c626397d4378a5545672b10fd4aaf5d8140..3aec644e2a46436627ee1f7be55b35df50f79a33 100644 (file)
@@ -255,6 +255,26 @@ element label.</para>
   </xsl:choose>
 </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::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"/>
+</xsl:template>
+
 <xsl:template match="refsect1" mode="label.markup">
   <xsl:choose>
     <xsl:when test="@label">