| 1 |
<?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink d" version="1.0"> |
| 2 |
|
| 3 |
<!-- ******************************************************************** |
| 4 |
|
| 5 |
This file is part of the XSL DocBook Stylesheet distribution. |
| 6 |
See ../README or http://cdn.docbook.org/release/xsl/current/ for |
| 7 |
copyright and other information. |
| 8 |
|
| 9 |
******************************************************************** --> |
| 10 |
|
| 11 |
<!-- ==================================================================== --> |
| 12 |
|
| 13 |
<xsl:template match="d:glossary"> |
| 14 |
|
| 15 |
<xsl:variable name="language"> |
| 16 |
<xsl:call-template name="l10n.language"/> |
| 17 |
</xsl:variable> |
| 18 |
|
| 19 |
<xsl:variable name="lowercase"> |
| 20 |
<xsl:call-template name="gentext"> |
| 21 |
<xsl:with-param name="key">normalize.sort.input</xsl:with-param> |
| 22 |
</xsl:call-template> |
| 23 |
</xsl:variable> |
| 24 |
|
| 25 |
<xsl:variable name="uppercase"> |
| 26 |
<xsl:call-template name="gentext"> |
| 27 |
<xsl:with-param name="key">normalize.sort.output</xsl:with-param> |
| 28 |
</xsl:call-template> |
| 29 |
</xsl:variable> |
| 30 |
|
| 31 |
<xsl:call-template name="id.warning"/> |
| 32 |
|
| 33 |
<xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml"> |
| 34 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 35 |
<xsl:call-template name="id.attribute"> |
| 36 |
<xsl:with-param name="conditional" select="0"/> |
| 37 |
</xsl:call-template> |
| 38 |
|
| 39 |
<xsl:call-template name="glossary.titlepage"/> |
| 40 |
|
| 41 |
<xsl:choose> |
| 42 |
<xsl:when test="d:glossdiv"> |
| 43 |
<xsl:apply-templates select="(d:glossdiv[1]/preceding-sibling::*)"/> |
| 44 |
</xsl:when> |
| 45 |
<xsl:when test="d:glossentry"> |
| 46 |
<xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/> |
| 47 |
</xsl:when> |
| 48 |
<xsl:otherwise> |
| 49 |
<xsl:apply-templates/> |
| 50 |
</xsl:otherwise> |
| 51 |
</xsl:choose> |
| 52 |
|
| 53 |
<xsl:choose> |
| 54 |
<xsl:when test="d:glossdiv"> |
| 55 |
<xsl:apply-templates select="d:glossdiv"/> |
| 56 |
</xsl:when> |
| 57 |
<xsl:when test="d:glossentry"> |
| 58 |
<dl> |
| 59 |
<xsl:choose> |
| 60 |
<xsl:when test="$glossary.sort != 0"> |
| 61 |
<xsl:apply-templates select="d:glossentry"> |
| 62 |
<xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/> |
| 63 |
</xsl:apply-templates> |
| 64 |
</xsl:when> |
| 65 |
<xsl:otherwise> |
| 66 |
<xsl:apply-templates select="d:glossentry"/> |
| 67 |
</xsl:otherwise> |
| 68 |
</xsl:choose> |
| 69 |
</dl> |
| 70 |
</xsl:when> |
| 71 |
<xsl:otherwise> |
| 72 |
<!-- empty glossary --> |
| 73 |
</xsl:otherwise> |
| 74 |
</xsl:choose> |
| 75 |
|
| 76 |
<xsl:if test="not(parent::d:article)"> |
| 77 |
<xsl:call-template name="process.footnotes"/> |
| 78 |
</xsl:if> |
| 79 |
</xsl:element> |
| 80 |
</xsl:template> |
| 81 |
|
| 82 |
<xsl:template match="d:glossary/d:glossaryinfo"/> |
| 83 |
<xsl:template match="d:glossary/d:info"/> |
| 84 |
<xsl:template match="d:glossary/d:title"/> |
| 85 |
<xsl:template match="d:glossary/d:subtitle"/> |
| 86 |
<xsl:template match="d:glossary/d:titleabbrev"/> |
| 87 |
|
| 88 |
<!-- ==================================================================== --> |
| 89 |
|
| 90 |
<xsl:template match="d:glosslist"> |
| 91 |
|
| 92 |
<xsl:variable name="language"> |
| 93 |
<xsl:call-template name="l10n.language"/> |
| 94 |
</xsl:variable> |
| 95 |
|
| 96 |
<xsl:variable name="lowercase"> |
| 97 |
<xsl:call-template name="gentext"> |
| 98 |
<xsl:with-param name="key">normalize.sort.input</xsl:with-param> |
| 99 |
</xsl:call-template> |
| 100 |
</xsl:variable> |
| 101 |
|
| 102 |
<xsl:variable name="uppercase"> |
| 103 |
<xsl:call-template name="gentext"> |
| 104 |
<xsl:with-param name="key">normalize.sort.output</xsl:with-param> |
| 105 |
</xsl:call-template> |
| 106 |
</xsl:variable> |
| 107 |
|
| 108 |
<div> |
| 109 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 110 |
<xsl:call-template name="id.attribute"/> |
| 111 |
<xsl:call-template name="anchor"/> |
| 112 |
<xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title"> |
| 113 |
<xsl:call-template name="formal.object.heading"/> |
| 114 |
</xsl:if> |
| 115 |
<dl> |
| 116 |
<xsl:choose> |
| 117 |
<xsl:when test="$glossary.sort != 0"> |
| 118 |
<xsl:apply-templates select="d:glossentry"> |
| 119 |
<xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/> |
| 120 |
</xsl:apply-templates> |
| 121 |
</xsl:when> |
| 122 |
<xsl:otherwise> |
| 123 |
<xsl:apply-templates select="d:glossentry"/> |
| 124 |
</xsl:otherwise> |
| 125 |
</xsl:choose> |
| 126 |
</dl> |
| 127 |
</div> |
| 128 |
</xsl:template> |
| 129 |
|
| 130 |
<!-- ==================================================================== --> |
| 131 |
|
| 132 |
<xsl:template match="d:glossdiv"> |
| 133 |
|
| 134 |
<xsl:variable name="language"> |
| 135 |
<xsl:call-template name="l10n.language"/> |
| 136 |
</xsl:variable> |
| 137 |
|
| 138 |
<xsl:variable name="lowercase"> |
| 139 |
<xsl:call-template name="gentext"> |
| 140 |
<xsl:with-param name="key">normalize.sort.input</xsl:with-param> |
| 141 |
</xsl:call-template> |
| 142 |
</xsl:variable> |
| 143 |
|
| 144 |
<xsl:variable name="uppercase"> |
| 145 |
<xsl:call-template name="gentext"> |
| 146 |
<xsl:with-param name="key">normalize.sort.output</xsl:with-param> |
| 147 |
</xsl:call-template> |
| 148 |
</xsl:variable> |
| 149 |
|
| 150 |
<xsl:call-template name="id.warning"/> |
| 151 |
|
| 152 |
<div> |
| 153 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 154 |
<xsl:call-template name="id.attribute"> |
| 155 |
<xsl:with-param name="conditional" select="0"/> |
| 156 |
</xsl:call-template> |
| 157 |
<xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/> |
| 158 |
|
| 159 |
<dl> |
| 160 |
<xsl:choose> |
| 161 |
<xsl:when test="$glossary.sort != 0"> |
| 162 |
<xsl:apply-templates select="d:glossentry"> |
| 163 |
<xsl:sort lang="{$language}" select="translate(d:glossterm, $lowercase, $uppercase)"/> |
| 164 |
</xsl:apply-templates> |
| 165 |
</xsl:when> |
| 166 |
<xsl:otherwise> |
| 167 |
<xsl:apply-templates select="d:glossentry"/> |
| 168 |
</xsl:otherwise> |
| 169 |
</xsl:choose> |
| 170 |
</dl> |
| 171 |
</div> |
| 172 |
</xsl:template> |
| 173 |
|
| 174 |
<xsl:template match="d:glossdiv/d:title"> |
| 175 |
<h3> |
| 176 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 177 |
<xsl:apply-templates/> |
| 178 |
</h3> |
| 179 |
</xsl:template> |
| 180 |
|
| 181 |
<!-- ==================================================================== --> |
| 182 |
|
| 183 |
<!-- |
| 184 |
GlossEntry ::= |
| 185 |
GlossTerm, Acronym?, Abbrev?, |
| 186 |
(IndexTerm)*, |
| 187 |
RevHistory?, |
| 188 |
(GlossSee | GlossDef+) |
| 189 |
--> |
| 190 |
|
| 191 |
<xsl:template match="d:glossentry"> |
| 192 |
<xsl:choose> |
| 193 |
<xsl:when test="$glossentry.show.acronym = 'primary'"> |
| 194 |
<dt> |
| 195 |
<xsl:call-template name="id.attribute"> |
| 196 |
<xsl:with-param name="conditional"> |
| 197 |
<xsl:choose> |
| 198 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 199 |
<xsl:otherwise>1</xsl:otherwise> |
| 200 |
</xsl:choose> |
| 201 |
</xsl:with-param> |
| 202 |
</xsl:call-template> |
| 203 |
<xsl:call-template name="anchor"> |
| 204 |
<xsl:with-param name="conditional"> |
| 205 |
<xsl:choose> |
| 206 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 207 |
<xsl:otherwise>1</xsl:otherwise> |
| 208 |
</xsl:choose> |
| 209 |
</xsl:with-param> |
| 210 |
</xsl:call-template> |
| 211 |
|
| 212 |
<xsl:choose> |
| 213 |
<xsl:when test="d:acronym|d:abbrev"> |
| 214 |
<xsl:apply-templates select="d:acronym|d:abbrev"/> |
| 215 |
<xsl:text> (</xsl:text> |
| 216 |
<xsl:apply-templates select="d:glossterm"/> |
| 217 |
<xsl:text>)</xsl:text> |
| 218 |
</xsl:when> |
| 219 |
<xsl:otherwise> |
| 220 |
<xsl:apply-templates select="d:glossterm"/> |
| 221 |
</xsl:otherwise> |
| 222 |
</xsl:choose> |
| 223 |
</dt> |
| 224 |
</xsl:when> |
| 225 |
<xsl:when test="$glossentry.show.acronym = 'yes'"> |
| 226 |
<dt> |
| 227 |
<xsl:call-template name="id.attribute"> |
| 228 |
<xsl:with-param name="conditional"> |
| 229 |
<xsl:choose> |
| 230 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 231 |
<xsl:otherwise>1</xsl:otherwise> |
| 232 |
</xsl:choose> |
| 233 |
</xsl:with-param> |
| 234 |
</xsl:call-template> |
| 235 |
<xsl:call-template name="anchor"> |
| 236 |
<xsl:with-param name="conditional"> |
| 237 |
<xsl:choose> |
| 238 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 239 |
<xsl:otherwise>1</xsl:otherwise> |
| 240 |
</xsl:choose> |
| 241 |
</xsl:with-param> |
| 242 |
</xsl:call-template> |
| 243 |
|
| 244 |
<xsl:apply-templates select="d:glossterm"/> |
| 245 |
|
| 246 |
<xsl:if test="d:acronym|d:abbrev"> |
| 247 |
<xsl:text> (</xsl:text> |
| 248 |
<xsl:apply-templates select="d:acronym|d:abbrev"/> |
| 249 |
<xsl:text>)</xsl:text> |
| 250 |
</xsl:if> |
| 251 |
<xsl:apply-templates select="d:indexterm"/> |
| 252 |
</dt> |
| 253 |
</xsl:when> |
| 254 |
<xsl:otherwise> |
| 255 |
<dt> |
| 256 |
<xsl:call-template name="id.attribute"> |
| 257 |
<xsl:with-param name="conditional"> |
| 258 |
<xsl:choose> |
| 259 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 260 |
<xsl:otherwise>1</xsl:otherwise> |
| 261 |
</xsl:choose> |
| 262 |
</xsl:with-param> |
| 263 |
</xsl:call-template> |
| 264 |
<xsl:call-template name="anchor"> |
| 265 |
<xsl:with-param name="conditional"> |
| 266 |
<xsl:choose> |
| 267 |
<xsl:when test="$glossterm.auto.link != 0">0</xsl:when> |
| 268 |
<xsl:otherwise>1</xsl:otherwise> |
| 269 |
</xsl:choose> |
| 270 |
</xsl:with-param> |
| 271 |
</xsl:call-template> |
| 272 |
|
| 273 |
<xsl:apply-templates select="d:glossterm"/> |
| 274 |
<xsl:apply-templates select="d:indexterm"/> |
| 275 |
</dt> |
| 276 |
</xsl:otherwise> |
| 277 |
</xsl:choose> |
| 278 |
|
| 279 |
<xsl:apply-templates select="d:glosssee|d:glossdef"/> |
| 280 |
</xsl:template> |
| 281 |
|
| 282 |
<xsl:template match="d:glossentry/d:glossterm"> |
| 283 |
<span> |
| 284 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 285 |
<xsl:call-template name="id.attribute"/> |
| 286 |
<xsl:call-template name="anchor"/> |
| 287 |
<xsl:apply-templates/> |
| 288 |
</span> |
| 289 |
<xsl:if test="following-sibling::d:glossterm">, </xsl:if> |
| 290 |
</xsl:template> |
| 291 |
|
| 292 |
<xsl:template match="d:glossentry/d:acronym"> |
| 293 |
<xsl:apply-templates/> |
| 294 |
<xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if> |
| 295 |
</xsl:template> |
| 296 |
|
| 297 |
<xsl:template match="d:glossentry/d:abbrev"> |
| 298 |
<xsl:apply-templates/> |
| 299 |
<xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if> |
| 300 |
</xsl:template> |
| 301 |
|
| 302 |
<xsl:template match="d:glossentry/d:revhistory"> |
| 303 |
</xsl:template> |
| 304 |
|
| 305 |
<xsl:template match="d:glossentry/d:glosssee"> |
| 306 |
<xsl:variable name="otherterm" select="@otherterm"/> |
| 307 |
<xsl:variable name="targets" select="key('id', $otherterm)"/> |
| 308 |
<xsl:variable name="target" select="$targets[1]"/> |
| 309 |
<xsl:variable name="xlink" select="@xlink:href"/> |
| 310 |
|
| 311 |
<dd> |
| 312 |
<p> |
| 313 |
<xsl:variable name="template"> |
| 314 |
<xsl:call-template name="gentext.template"> |
| 315 |
<xsl:with-param name="context" select="'glossary'"/> |
| 316 |
<xsl:with-param name="name" select="'see'"/> |
| 317 |
</xsl:call-template> |
| 318 |
</xsl:variable> |
| 319 |
|
| 320 |
<xsl:variable name="title"> |
| 321 |
<xsl:choose> |
| 322 |
<xsl:when test="$target"> |
| 323 |
<a> |
| 324 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 325 |
<xsl:call-template name="id.attribute"/> |
| 326 |
<xsl:attribute name="href"> |
| 327 |
<xsl:call-template name="href.target"> |
| 328 |
<xsl:with-param name="object" select="$target"/> |
| 329 |
</xsl:call-template> |
| 330 |
</xsl:attribute> |
| 331 |
<xsl:apply-templates select="$target" mode="xref-to"/> |
| 332 |
</a> |
| 333 |
</xsl:when> |
| 334 |
<xsl:when test="$xlink"> |
| 335 |
<xsl:call-template name="simple.xlink"> |
| 336 |
<xsl:with-param name="content"> |
| 337 |
<xsl:apply-templates/> |
| 338 |
</xsl:with-param> |
| 339 |
</xsl:call-template> |
| 340 |
</xsl:when> |
| 341 |
<xsl:when test="$otherterm != '' and not($target)"> |
| 342 |
<xsl:message> |
| 343 |
<xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text> |
| 344 |
<xsl:value-of select="$otherterm"/> |
| 345 |
</xsl:message> |
| 346 |
<xsl:apply-templates/> |
| 347 |
</xsl:when> |
| 348 |
<xsl:otherwise> |
| 349 |
<xsl:apply-templates/> |
| 350 |
</xsl:otherwise> |
| 351 |
</xsl:choose> |
| 352 |
</xsl:variable> |
| 353 |
|
| 354 |
<xsl:call-template name="substitute-markup"> |
| 355 |
<xsl:with-param name="template" select="$template"/> |
| 356 |
<xsl:with-param name="title" select="$title"/> |
| 357 |
</xsl:call-template> |
| 358 |
</p> |
| 359 |
</dd> |
| 360 |
</xsl:template> |
| 361 |
|
| 362 |
<xsl:template match="d:glossentry/d:glossdef"> |
| 363 |
<dd> |
| 364 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 365 |
<xsl:call-template name="id.attribute"/> |
| 366 |
<xsl:call-template name="anchor"/> |
| 367 |
<xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/> |
| 368 |
<xsl:if test="d:glossseealso"> |
| 369 |
<p> |
| 370 |
<xsl:variable name="template"> |
| 371 |
<xsl:call-template name="gentext.template"> |
| 372 |
<xsl:with-param name="context" select="'glossary'"/> |
| 373 |
<xsl:with-param name="name" select="'seealso'"/> |
| 374 |
</xsl:call-template> |
| 375 |
</xsl:variable> |
| 376 |
<xsl:variable name="title"> |
| 377 |
<xsl:apply-templates select="d:glossseealso"/> |
| 378 |
</xsl:variable> |
| 379 |
<xsl:call-template name="substitute-markup"> |
| 380 |
<xsl:with-param name="template" select="$template"/> |
| 381 |
<xsl:with-param name="title" select="$title"/> |
| 382 |
</xsl:call-template> |
| 383 |
</p> |
| 384 |
</xsl:if> |
| 385 |
</dd> |
| 386 |
</xsl:template> |
| 387 |
|
| 388 |
<xsl:template match="d:glossseealso"> |
| 389 |
<xsl:variable name="otherterm" select="@otherterm"/> |
| 390 |
<xsl:variable name="targets" select="key('id', $otherterm)"/> |
| 391 |
<xsl:variable name="target" select="$targets[1]"/> |
| 392 |
<xsl:variable name="xlink" select="@xlink:href"/> |
| 393 |
|
| 394 |
<xsl:choose> |
| 395 |
<xsl:when test="$target"> |
| 396 |
<a> |
| 397 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 398 |
<xsl:call-template name="id.attribute"/> |
| 399 |
<xsl:attribute name="href"> |
| 400 |
<xsl:call-template name="href.target"> |
| 401 |
<xsl:with-param name="object" select="$target"/> |
| 402 |
</xsl:call-template> |
| 403 |
</xsl:attribute> |
| 404 |
<xsl:apply-templates select="$target" mode="xref-to"/> |
| 405 |
</a> |
| 406 |
</xsl:when> |
| 407 |
<xsl:when test="$xlink"> |
| 408 |
<xsl:call-template name="simple.xlink"> |
| 409 |
<xsl:with-param name="content"> |
| 410 |
<xsl:apply-templates/> |
| 411 |
</xsl:with-param> |
| 412 |
</xsl:call-template> |
| 413 |
</xsl:when> |
| 414 |
<xsl:when test="$otherterm != '' and not($target)"> |
| 415 |
<xsl:message> |
| 416 |
<xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text> |
| 417 |
<xsl:value-of select="$otherterm"/> |
| 418 |
</xsl:message> |
| 419 |
<xsl:apply-templates/> |
| 420 |
</xsl:when> |
| 421 |
<xsl:otherwise> |
| 422 |
<xsl:apply-templates/> |
| 423 |
</xsl:otherwise> |
| 424 |
</xsl:choose> |
| 425 |
|
| 426 |
<xsl:choose> |
| 427 |
<xsl:when test="position() = last()"/> |
| 428 |
<xsl:otherwise> |
| 429 |
<xsl:call-template name="gentext.template"> |
| 430 |
<xsl:with-param name="context" select="'glossary'"/> |
| 431 |
<xsl:with-param name="name" select="'seealso-separator'"/> |
| 432 |
</xsl:call-template> |
| 433 |
</xsl:otherwise> |
| 434 |
</xsl:choose> |
| 435 |
</xsl:template> |
| 436 |
|
| 437 |
<!-- ==================================================================== --> |
| 438 |
|
| 439 |
<!-- Glossary collection --> |
| 440 |
|
| 441 |
<xsl:template match="d:glossary[@role='auto']" priority="2"> |
| 442 |
|
| 443 |
<xsl:variable name="language"> |
| 444 |
<xsl:call-template name="l10n.language"/> |
| 445 |
</xsl:variable> |
| 446 |
|
| 447 |
<xsl:variable name="lowercase"> |
| 448 |
<xsl:call-template name="gentext"> |
| 449 |
<xsl:with-param name="key">normalize.sort.input</xsl:with-param> |
| 450 |
</xsl:call-template> |
| 451 |
</xsl:variable> |
| 452 |
|
| 453 |
<xsl:variable name="uppercase"> |
| 454 |
<xsl:call-template name="gentext"> |
| 455 |
<xsl:with-param name="key">normalize.sort.output</xsl:with-param> |
| 456 |
</xsl:call-template> |
| 457 |
</xsl:variable> |
| 458 |
|
| 459 |
<xsl:variable name="terms" select="//d:glossterm[not(parent::d:glossdef)]|//d:firstterm"/> |
| 460 |
<xsl:variable name="collection" select="document($glossary.collection, .)"/> |
| 461 |
|
| 462 |
<xsl:call-template name="id.warning"/> |
| 463 |
|
| 464 |
<xsl:if test="$glossary.collection = ''"> |
| 465 |
<xsl:message> |
| 466 |
<xsl:text>Warning: processing automatic glossary </xsl:text> |
| 467 |
<xsl:text>without a glossary.collection file.</xsl:text> |
| 468 |
</xsl:message> |
| 469 |
</xsl:if> |
| 470 |
|
| 471 |
<xsl:if test="not($collection) and $glossary.collection != ''"> |
| 472 |
<xsl:message> |
| 473 |
<xsl:text>Warning: processing automatic glossary but unable to </xsl:text> |
| 474 |
<xsl:text>open glossary.collection file '</xsl:text> |
| 475 |
<xsl:value-of select="$glossary.collection"/> |
| 476 |
<xsl:text>'</xsl:text> |
| 477 |
</xsl:message> |
| 478 |
</xsl:if> |
| 479 |
|
| 480 |
<div> |
| 481 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 482 |
<xsl:call-template name="id.attribute"> |
| 483 |
<xsl:with-param name="conditional" select="0"/> |
| 484 |
</xsl:call-template> |
| 485 |
|
| 486 |
<xsl:call-template name="glossary.titlepage"/> |
| 487 |
|
| 488 |
<xsl:choose> |
| 489 |
<xsl:when test="d:glossdiv and $collection//d:glossdiv"> |
| 490 |
<xsl:for-each select="$collection//d:glossdiv"> |
| 491 |
<!-- first see if there are any in this div --> |
| 492 |
<xsl:variable name="exist.test"> |
| 493 |
<xsl:for-each select="d:glossentry"> |
| 494 |
<xsl:variable name="cterm" select="d:glossterm"/> |
| 495 |
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> |
| 496 |
<xsl:value-of select="d:glossterm"/> |
| 497 |
</xsl:if> |
| 498 |
</xsl:for-each> |
| 499 |
</xsl:variable> |
| 500 |
|
| 501 |
<xsl:if test="$exist.test != ''"> |
| 502 |
<xsl:apply-templates select="." mode="auto-glossary"> |
| 503 |
<xsl:with-param name="terms" select="$terms"/> |
| 504 |
</xsl:apply-templates> |
| 505 |
</xsl:if> |
| 506 |
</xsl:for-each> |
| 507 |
</xsl:when> |
| 508 |
<xsl:otherwise> |
| 509 |
<dl> |
| 510 |
<xsl:choose> |
| 511 |
<xsl:when test="$glossary.sort != 0"> |
| 512 |
<xsl:for-each select="$collection//d:glossentry"> |
| 513 |
<xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/> |
| 514 |
<xsl:variable name="cterm" select="d:glossterm"/> |
| 515 |
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> |
| 516 |
<xsl:apply-templates select="." mode="auto-glossary"/> |
| 517 |
</xsl:if> |
| 518 |
</xsl:for-each> |
| 519 |
</xsl:when> |
| 520 |
<xsl:otherwise> |
| 521 |
<xsl:for-each select="$collection//d:glossentry"> |
| 522 |
<xsl:variable name="cterm" select="d:glossterm"/> |
| 523 |
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> |
| 524 |
<xsl:apply-templates select="." mode="auto-glossary"/> |
| 525 |
</xsl:if> |
| 526 |
</xsl:for-each> |
| 527 |
</xsl:otherwise> |
| 528 |
</xsl:choose> |
| 529 |
</dl> |
| 530 |
</xsl:otherwise> |
| 531 |
</xsl:choose> |
| 532 |
|
| 533 |
<xsl:if test="not(parent::d:article)"> |
| 534 |
<xsl:call-template name="process.footnotes"/> |
| 535 |
</xsl:if> |
| 536 |
</div> |
| 537 |
</xsl:template> |
| 538 |
|
| 539 |
<xsl:template match="*" mode="auto-glossary"> |
| 540 |
<!-- pop back out to the default mode for most elements --> |
| 541 |
<xsl:apply-templates select="."/> |
| 542 |
</xsl:template> |
| 543 |
|
| 544 |
<xsl:template match="d:glossdiv" mode="auto-glossary"> |
| 545 |
<xsl:param name="terms" select="."/> |
| 546 |
|
| 547 |
|
| 548 |
<xsl:variable name="language"> |
| 549 |
<xsl:call-template name="l10n.language"/> |
| 550 |
</xsl:variable> |
| 551 |
|
| 552 |
<xsl:variable name="lowercase"> |
| 553 |
<xsl:call-template name="gentext"> |
| 554 |
<xsl:with-param name="key">normalize.sort.input</xsl:with-param> |
| 555 |
</xsl:call-template> |
| 556 |
</xsl:variable> |
| 557 |
|
| 558 |
<xsl:variable name="uppercase"> |
| 559 |
<xsl:call-template name="gentext"> |
| 560 |
<xsl:with-param name="key">normalize.sort.output</xsl:with-param> |
| 561 |
</xsl:call-template> |
| 562 |
</xsl:variable> |
| 563 |
|
| 564 |
|
| 565 |
<div> |
| 566 |
<xsl:apply-templates select="." mode="common.html.attributes"/> |
| 567 |
<xsl:call-template name="id.attribute"> |
| 568 |
<xsl:with-param name="conditional" select="0"/> |
| 569 |
</xsl:call-template> |
| 570 |
<xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/> |
| 571 |
|
| 572 |
<dl> |
| 573 |
<xsl:choose> |
| 574 |
<xsl:when test="$glossary.sort != 0"> |
| 575 |
<xsl:for-each select="d:glossentry"> |
| 576 |
<xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/> |
| 577 |
<xsl:variable name="cterm" select="d:glossterm"/> |
| 578 |
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> |
| 579 |
<xsl:apply-templates select="." mode="auto-glossary"/> |
| 580 |
</xsl:if> |
| 581 |
</xsl:for-each> |
| 582 |
</xsl:when> |
| 583 |
<xsl:otherwise> |
| 584 |
<xsl:for-each select="d:glossentry"> |
| 585 |
<xsl:variable name="cterm" select="d:glossterm"/> |
| 586 |
<xsl:if test="$terms[@baseform = $cterm or . = $cterm]"> |
| 587 |
<xsl:apply-templates select="." mode="auto-glossary"/> |
| 588 |
</xsl:if> |
| 589 |
</xsl:for-each> |
| 590 |
</xsl:otherwise> |
| 591 |
</xsl:choose> |
| 592 |
</dl> |
| 593 |
</div> |
| 594 |
</xsl:template> |
| 595 |
|
| 596 |
<!-- ==================================================================== --> |
| 597 |
|
| 598 |
</xsl:stylesheet> |