#124 Do not output html glossterm link if no glossentry

output: HTML
closed-fixed
XSL (122)
5
2006-05-23
2005-02-18
Camille Bégnis
No

That mis notably useful when in a modular environment
some documents include the glossary, while others not.

the glossterm template head might be changed in this way:

<xsl:template match="glossterm" name="glossterm">
<xsl:param name="firstterm" select="0"/>

<!-- To avoid extra <a name=""> anchor from
inline.italicseq -->
<xsl:variable name="content">
<xsl:apply-templates/>
</xsl:variable>

<xsl:choose>
<xsl:when test="($firstterm.only.link = 0 or
$firstterm = 1) and @linkend">
<xsl:variable name="targets"
select="key('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>

<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: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>

Discussion

  • Logged In: YES
    user_id=118135

    Camiile,

    Is this a duplicate of #1143813? And do you have an actual
    diff for the change you are suggesting?

     
  • Logged In: YES
    user_id=246594

    #1143814 is for HTML, #1143813 is for FO
    Patch attached

     
  • Robert Stayton
    Robert Stayton
    2006-05-08

    Logged In: YES
    user_id=193218

    A fix for this issue has been added to the current codebase.
    Please test the fix with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Robert Stayton
    Robert Stayton
    2006-05-08

    • status: open --> pending
     
  • Robert Stayton
    Robert Stayton
    2006-05-08

    Logged In: YES
    user_id=193218

    I applied both of these patches. Thanks for the
    contribution.

     
  • Robert Stayton
    Robert Stayton
    2006-05-08

    • assigned_to: nobody --> bobstayton
    • status: pending --> pending-fixed
     
  • Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-fixed --> closed-fixed