Menu

#1359 inline.monoseq and other inline.*seq templates handle links incorrectly

output: all formats
pending-fixed
None
5
2015-05-20
2015-05-20
No

When content is passed as a parameter to any of the inline.*seq templates (e.g., inline.monoseq), the link handling code is skipped. The call to simple.xlink is inside the fallback case for the content parameter, which means it is only called when the template is called with a null content parameter. Although these functions are usually called without setting the content parameter, this does happen in several cases where a link is not unlikely (e.g., <tag> with the class parameter equal to starttag and a linkend to a definition for the tag).</tag>

I believe that the fix for fo output is straightforward and can be implemented with the following steps:

Replace the xsl:param statement with the following:

<xsl:param name="content">
<xsl:apply-templates>
</xsl:apply-templates></xsl:param>

Then create a variable as follows:

<xsl:variable name="contentwithlink">
<xsl:call-template name="simple.xlink">
<xsl:with-param name="content" select="$content">
</xsl:with-param></xsl:call-template>
</xsl:variable>

And, finally, replace references to $content with $contentwithlink throughout the rest of the template.

The following templates in fo/inline.xsl exhibit this behavior: inline.sansseq, inline.charseq, inline.monoseq, inline.boldseq, inline.italic.seq, inline.boldmonoseq, inline.italicmonoseq, inline.superscriptseq, and inline.subscriptseq. However, only inline.monoseq, inline.boldseq, and inline.superscriptseq are called with parameters in the standard stylesheets, and the only use of inline.superscriptseq in this way seems to be with hard-coded trademark and copyright symbols that don't have links.

Also, it looks like the same thing happens with the html stylesheets, though the code fix would be somewhat different.

Discussion

  • Robert Stayton

    Robert Stayton - 2015-05-20
    • status: open --> pending-fixed
    • assigned_to: Robert Stayton
     
  • Robert Stayton

    Robert Stayton - 2015-05-20

    I checked in fixes for this in fo/inline.xsl and html/inline.xsl.

     
Auth0 Logo