]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:xlink='http://www.w3.org/1999/xlink'
+ exclude-result-prefixes="xlink"
version='1.0'>
<!-- ********************************************************************
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.list">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.blocks">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.blocks">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.list">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="glossentry" mode="glossary.as.list">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="glossentry" mode="glossary.as.blocks">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="glossentry" mode="glossary.as.list">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:for-each select="$collection//glossentry">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
<xsl:variable name="cterm" select="glossterm"/>
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
<xsl:apply-templates select="."
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:for-each select="$collection//glossentry">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
<xsl:variable name="cterm" select="glossterm"/>
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
<xsl:apply-templates select="."
<xsl:when test="$glossary.sort != 0">
<xsl:for-each select="$collection//glossentry">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
<xsl:variable name="cterm" select="glossterm"/>
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
<xsl:apply-templates select="."
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:for-each select="glossentry">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
<xsl:variable name="cterm" select="glossterm"/>
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
<xsl:apply-templates select="." mode="auto-glossary-as-list"/>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:for-each select="glossentry">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
<xsl:variable name="cterm" select="glossterm"/>
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
<xsl:apply-templates select="." mode="auto-glossary-as-blocks"/>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.list">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="otherterm" select="@otherterm"/>
<xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
+ <xsl:variable name="xlink" select="@xlink:href"/>
<fo:block>
<xsl:variable name="template">
<xsl:apply-templates select="$target" mode="xref-to"/>
</fo:basic-link>
</xsl:when>
+ <xsl:when test="$xlink">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="$otherterm != '' and not($target)">
<xsl:message>
<xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
<xsl:variable name="otherterm" select="@otherterm"/>
<xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
+ <xsl:variable name="xlink" select="@xlink:href"/>
<xsl:choose>
<xsl:when test="$target">
<xsl:apply-templates select="$target" mode="xref-to"/>
</fo:basic-link>
</xsl:when>
+ <xsl:when test="$xlink">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="$otherterm != '' and not($target)">
<xsl:message>
<xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
<xsl:choose>
<xsl:when test="$glossary.sort != 0">
<xsl:apply-templates select="$entries" mode="glossary.as.blocks">
- <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
+ <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), &lowercase;, &uppercase;))"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="otherterm" select="@otherterm"/>
<xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
+ <xsl:variable name="xlink" select="@xlink:href"/>
<xsl:variable name="template">
<xsl:call-template name="gentext.template">
<xsl:apply-templates select="$target" mode="xref-to"/>
</fo:basic-link>
</xsl:when>
+ <xsl:when test="$xlink">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="$otherterm != '' and not($target)">
<xsl:message>
<xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
<xsl:variable name="otherterm" select="@otherterm"/>
<xsl:variable name="targets" select="key('id', $otherterm)"/>
<xsl:variable name="target" select="$targets[1]"/>
+ <xsl:variable name="xlink" select="@xlink:href"/>
<xsl:choose>
<xsl:when test="$target">
<xsl:apply-templates select="$target" mode="xref-to"/>
</fo:basic-link>
</xsl:when>
+ <xsl:when test="$xlink">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="$otherterm != '' and not($target)">
<xsl:message>
<xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>