]> granicus.if.org Git - docbook-dsssl/commitdiff
Applied patch #1143814 to avoid making bad links from glossterm.
authorBob Stayton <bobs@sagehill.net>
Mon, 8 May 2006 04:23:10 +0000 (04:23 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 8 May 2006 04:23:10 +0000 (04:23 +0000)
xsl/html/inline.xsl

index 06f5379444357be8f3dae61dcbe7548aa7d6d20f..6df5f5f6c8116fee3a0a6d7efc147e228b051fa3 100644 (file)
         <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:choose>
+        <xsl:when test="$target">
+          <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: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">
-          <xsl:with-param name="content" select="$content"/>
-        </xsl:call-template>
-      </a>
+            <xsl:call-template name="inline.italicseq">
+              <xsl:with-param name="content" select="$content"/>
+            </xsl:call-template>
+          </a>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:call-template name="inline.italicseq">
+            <xsl:with-param name="content" select="$content"/>
+          </xsl:call-template>
+        </xsl:otherwise>
+      </xsl:choose>
     </xsl:when>
 
     <xsl:when test="not(@linkend)