</xsl:apply-templates>
</xsl:template>
+<xsl:template match="glossentry" mode="xref-to">
+ <xsl:choose>
+ <xsl:when test="$glossentry.show.acronym = 'primary'">
+ <xsl:choose>
+ <xsl:when test="acronym|abbrev">
+ <xsl:apply-templates select="(acronym|abbrev)[1]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="glossterm" mode="xref-to">
+ <xsl:apply-templates/>
+</xsl:template>
+
<xsl:template match="index" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<!-- yes, show the URI -->
<xsl:choose>
<xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
- <xsl:variable name="ulink.fn.mark">
- <fo:inline>
- <!-- FIXME: this isn't going to be perfect! -->
- <xsl:text>[</xsl:text>
- <xsl:number level="any"
- from="chapter|appendix|preface|article|refentry"
- format="1"/>
- <xsl:text>]</xsl:text>
- </fo:inline>
- </xsl:variable>
-
<fo:footnote>
- <fo:inline font-size="90%">
- <xsl:copy-of select="$ulink.fn.mark"/>
- </fo:inline>
+ <xsl:call-template name="ulink.footnote.number"/>
<fo:footnote-body font-family="{$body.font.family}"
font-size="{$footnote.font.size}">
<fo:block>
- <fo:inline font-size="90%">
- <xsl:copy-of select="$ulink.fn.mark"/>
- <xsl:text> </xsl:text>
- </fo:inline>
+ <xsl:call-template name="ulink.footnote.number"/>
+ <xsl:text> </xsl:text>
<fo:inline>
<xsl:value-of select="@url"/>
</fo:inline>
</xsl:if>
</xsl:template>
+<xsl:template name="ulink.footnote.number">
+ <fo:inline font-size="90%">
+ <!-- FIXME: this isn't going to be perfect! -->
+ <xsl:text>[</xsl:text>
+ <xsl:number level="any"
+ from="chapter|appendix|preface|article|refentry"
+ format="{$ulink.footnote.number.format}"/>
+ <xsl:text>]</xsl:text>
+ </fo:inline>
+</xsl:template>
+
<xsl:template name="hyphenate-url">
<xsl:param name="url" select="''"/>
<xsl:choose>