]> granicus.if.org Git - docbook-dsssl/commitdiff
Make glossterms hot if they're links. And make them italic.
authorNorman Walsh <ndw@nwalsh.com>
Thu, 26 Apr 2001 15:21:19 +0000 (15:21 +0000)
committerNorman Walsh <ndw@nwalsh.com>
Thu, 26 Apr 2001 15:21:19 +0000 (15:21 +0000)
xsl/html/inline.xsl

index 6e825ada440b3c7bed873ce534548c1142deedca..82e147e7190d034ee489365e64d3f037cc51992c 100644 (file)
 </xsl:template>
 
 <xsl:template match="glossterm">
-  <xsl:call-template name="inline.charseq"/>
+  <xsl:choose>
+    <xsl:when test="@linkend">
+      <xsl:variable name="targets" select="id(@linkend)"/>
+      <xsl:variable name="target" select="$targets[1]"/>
+
+      <xsl:call-template name="check.id.unique">
+        <xsl:with-param name="linkend" select="@linkend"/>
+      </xsl:call-template>
+
+      <a>
+        <xsl:if test="@id">
+          <xsl:attribute name="name">
+            <xsl:value-of select="@id"/>
+          </xsl:attribute>
+        </xsl:if>
+
+        <xsl:attribute name="href">
+          <xsl:call-template name="href.target">
+            <xsl:with-param name="object" select="$target"/>
+          </xsl:call-template>
+        </xsl:attribute>
+
+        <xsl:call-template name="inline.italicseq"/>
+      </a>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="inline.italicseq"/>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <xsl:template match="sgmltag">