]> granicus.if.org Git - docbook-dsssl/commitdiff
Make sure title inside info is used if no other title.
authorBob Stayton <bobs@sagehill.net>
Thu, 9 Jul 2009 21:49:16 +0000 (21:49 +0000)
committerBob Stayton <bobs@sagehill.net>
Thu, 9 Jul 2009 21:49:16 +0000 (21:49 +0000)
xsl/common/titles.xsl

index a57c230dca10c18a53df8933284d70cd35c25020..07ec6d42588319cee0a8149915bfbbd25a318750 100644 (file)
@@ -396,14 +396,14 @@ title of the element. This does not include the label.
 
 <xsl:template match="figure|example|equation" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="title|info/title" mode="title.markup">
+  <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
 
 <xsl:template match="table" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="(title|caption)[1]" mode="title.markup">
+  <xsl:apply-templates select="(title|info/title|caption)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
@@ -417,7 +417,7 @@ title of the element. This does not include the label.
 
 <xsl:template match="task" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
-  <xsl:apply-templates select="title" mode="title.markup">
+  <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
     <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
   </xsl:apply-templates>
 </xsl:template>
@@ -509,7 +509,7 @@ title of the element. This does not include the label.
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:choose>
     <xsl:when test="title|info/title">
-      <xsl:apply-templates select="title" mode="title.markup">
+      <xsl:apply-templates select="(title|info/title)[1]" mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
@@ -533,6 +533,11 @@ title of the element. This does not include the label.
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
       </xsl:apply-templates>
     </xsl:when>
+    <xsl:when test="info/titleabbrev">
+      <xsl:apply-templates select="info/titleabbrev[1]" mode="title.markup">
+        <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+      </xsl:apply-templates>
+    </xsl:when>
     <xsl:otherwise>
       <xsl:apply-templates select="." mode="title.markup">
         <xsl:with-param name="allow-anchors" select="$allow-anchors"/>