Skip to content

Commit

Permalink
Merge pull request #553 from openSUSE/xref-to-footnote-524
Browse files Browse the repository at this point in the history
Fix #524: Add footnote template in mode=xref-to
  • Loading branch information
tomschr committed Jul 26, 2023
2 parents 6ba70e0 + a1d9af5 commit e586b70
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions suse2022-ns/xhtml/xref.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@
<xsl:apply-templates select="."/>
</xsl:template>

<xsl:template match="d:footnote" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="verbose" select="1"/>
<xsl:variable name="href">
<xsl:text>ftn.</xsl:text>
<xsl:call-template name="object.id">
<xsl:with-param name="object" select="."/>
</xsl:call-template>
</xsl:variable>

<a href="{$href}">
<sup>[<xsl:apply-templates select="." mode="footnote.number"/>]</sup>
</a>
</xsl:template>

<xsl:template match="d:xref" name="xref">
<xsl:variable name="context" select="."/>
Expand Down

0 comments on commit e586b70

Please sign in to comment.