]> granicus.if.org Git - docbook-dsssl/commitdiff
Support HTML tables
authorNorman Walsh <ndw@nwalsh.com>
Wed, 27 Aug 2003 14:37:16 +0000 (14:37 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 27 Aug 2003 14:37:16 +0000 (14:37 +0000)
xsl/common/titles.xsl

index 82764f42c28b4b6d3e9ab8468ab2c203a933f84b..2abdd3b2720a036f3beab2d198edcff148191ce6 100644 (file)
@@ -62,6 +62,20 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
+<!-- only occurs in HTML Tables! -->
+<xsl:template match="caption" mode="title.markup">
+  <xsl:param name="allow-anchors" select="0"/>
+
+  <xsl:choose>
+    <xsl:when test="$allow-anchors != 0">
+      <xsl:apply-templates/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:apply-templates mode="no.anchor.mode"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
 <xsl:template match="set" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:apply-templates select="(setinfo/title|title)[1]"
@@ -322,13 +336,20 @@ title of the element. This does not include the label.
   </xsl:choose>
 </xsl:template>
 
-<xsl:template match="figure|table|example|equation" mode="title.markup">
+<xsl:template match="figure|example|equation" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:apply-templates select="title" 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" mode="title.markup">
+    <xsl:with-param name="allow-anchors" select="$allow-anchors"/>
+  </xsl:apply-templates>
+</xsl:template>
+
 <xsl:template match="procedure" mode="title.markup">
   <xsl:param name="allow-anchors" select="0"/>
   <xsl:apply-templates select="title" mode="title.markup">