]> granicus.if.org Git - docbook-dsssl/commitdiff
Use titleabbrev instead of title in xrefs
authorNorman Walsh <ndw@nwalsh.com>
Wed, 1 Jan 2003 21:24:58 +0000 (21:24 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Wed, 1 Jan 2003 21:24:58 +0000 (21:24 +0000)
xsl/fo/xref.xsl
xsl/html/formal.xsl
xsl/html/xref.xsl

index c5274b9638d735521cf0812ad96d08f512717e58..29fcdd3ff4e61ce178d207913cdf39b5de18b308 100644 (file)
   <xsl:param name="xrefstyle"/>
   <xsl:param name="title"/>
 
-  <xsl:copy-of select="$title"/>
+  <xsl:choose>
+    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
+    <xsl:when test="$purpose = 'xref' and titleabbrev">
+      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="chapter" mode="insert.title.markup">
index 04ca27e11f3f9c04b1cedff881ad3f110a45e9ea..b826169e7c7f98e142140eddc5281a74c27ce16a 100644 (file)
 </xsl:template>
 
 <xsl:template match="figure/title"></xsl:template>
+<xsl:template match="figure/titleabbrev"></xsl:template>
 <xsl:template match="table/title"></xsl:template>
+<xsl:template match="table/titleabbrev"></xsl:template>
 <xsl:template match="table/textobject"></xsl:template>
 <xsl:template match="example/title"></xsl:template>
+<xsl:template match="example/titleabbrev"></xsl:template>
 <xsl:template match="equation/title"></xsl:template>
+<xsl:template match="equation/titleabbrev"></xsl:template>
 
 <xsl:template match="informalfigure">
   <xsl:call-template name="informal.object"/>
index 7848bb05f77abedf563d23e58338c79e2a2807cf..12ad187bf7138454f5e688132ea47da4f85c461b 100644 (file)
   <xsl:param name="xrefstyle"/>
   <xsl:param name="title"/>
 
-  <xsl:copy-of select="$title"/>
+  <xsl:choose>
+    <!-- FIXME: what about the case where titleabbrev is inside the info? -->
+    <xsl:when test="$purpose = 'xref' and titleabbrev">
+      <xsl:apply-templates select="." mode="titleabbrev.markup"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:copy-of select="$title"/>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="chapter" mode="insert.title.markup">