|
11 | 11 | xmlns="http://www.w3.org/1999/xhtml" |
12 | 12 | xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0" |
13 | 13 | xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" |
14 | | - exclude-result-prefixes="exsl l t"> |
| 14 | + xmlns:xlink="http://www.w3.org/1999/xlink" |
| 15 | + exclude-result-prefixes="exsl l t xlink"> |
15 | 16 |
|
16 | 17 | <xsl:template match="glossary"> |
17 | 18 | <xsl:variable name="language"> |
|
143 | 144 | <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/> |
144 | 145 | </xsl:template> |
145 | 146 |
|
| 147 | + |
| 148 | +<xsl:template match="glossseealso"> |
| 149 | + <xsl:variable name="otherterm" select="(@otherterm|@linkend)[1]"/><!-- SUSE --> |
| 150 | + <xsl:variable name="targets" select="key('id', $otherterm)"/> |
| 151 | + <xsl:variable name="target" select="$targets[1]"/> |
| 152 | + <xsl:variable name="xlink" select="@xlink:href"/> |
| 153 | + |
| 154 | + <xsl:choose> |
| 155 | + <xsl:when test="$target"> |
| 156 | + <a> |
| 157 | + <xsl:apply-templates select="." mode="common.html.attributes"/> |
| 158 | + <xsl:call-template name="id.attribute"/> |
| 159 | + <xsl:attribute name="href"> |
| 160 | + <xsl:call-template name="href.target"> |
| 161 | + <xsl:with-param name="object" select="$target"/> |
| 162 | + </xsl:call-template> |
| 163 | + </xsl:attribute> |
| 164 | + <xsl:apply-templates select="$target" mode="xref-to"/> |
| 165 | + </a> |
| 166 | + </xsl:when> |
| 167 | + <xsl:when test="$xlink"> |
| 168 | + <xsl:call-template name="simple.xlink"> |
| 169 | + <xsl:with-param name="content"> |
| 170 | + <xsl:apply-templates/> |
| 171 | + </xsl:with-param> |
| 172 | + </xsl:call-template> |
| 173 | + </xsl:when> |
| 174 | + <xsl:when test="$otherterm != '' and not($target)"> |
| 175 | + <xsl:message> |
| 176 | + <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> |
| 177 | + <xsl:value-of select="$otherterm"/> |
| 178 | + </xsl:message> |
| 179 | + <xsl:apply-templates/> |
| 180 | + </xsl:when> |
| 181 | + <xsl:otherwise> |
| 182 | + <xsl:apply-templates/> |
| 183 | + </xsl:otherwise> |
| 184 | + </xsl:choose> |
| 185 | + |
| 186 | + <xsl:choose> |
| 187 | + <xsl:when test="position() = last()"/> |
| 188 | + <xsl:otherwise> |
| 189 | + <xsl:call-template name="gentext.template"> |
| 190 | + <xsl:with-param name="context" select="'glossary'"/> |
| 191 | + <xsl:with-param name="name" select="'seealso-separator'"/> |
| 192 | + </xsl:call-template> |
| 193 | + </xsl:otherwise> |
| 194 | + </xsl:choose> |
| 195 | +</xsl:template> |
| 196 | + |
146 | 197 | </xsl:stylesheet> |
0 commit comments