1 <?xml version="1.0" encoding="ASCII"?>
2 <!--This file was created automatically by html2xhtml-->
3 <!--from the HTML stylesheets.-->
4 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink" version="1.0">
6 <!-- ********************************************************************
7 $Id: glossary.xsl 8421 2009-05-04 07:49:49Z bobstayton $
8 ********************************************************************
10 This file is part of the XSL DocBook Stylesheet distribution.
11 See ../README or http://docbook.sf.net/release/xsl/current/ for
12 copyright and other information.
14 ******************************************************************** -->
16 <!-- ==================================================================== -->
18 <xsl:template match="glossary">
20 <xsl:variable name="language">
21 <xsl:call-template name="l10n.language"/>
24 <xsl:variable name="lowercase">
25 <xsl:call-template name="gentext">
26 <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
30 <xsl:variable name="uppercase">
31 <xsl:call-template name="gentext">
32 <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
36 <xsl:call-template name="id.warning"/>
39 <xsl:apply-templates select="." mode="common.html.attributes"/>
40 <xsl:if test="$generate.id.attributes != 0">
41 <xsl:attribute name="id">
42 <xsl:call-template name="object.id"/>
46 <xsl:call-template name="glossary.titlepage"/>
49 <xsl:when test="glossdiv">
50 <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
52 <xsl:when test="glossentry">
53 <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
56 <xsl:apply-templates/>
61 <xsl:when test="glossdiv">
62 <xsl:apply-templates select="glossdiv"/>
64 <xsl:when test="glossentry">
67 <xsl:when test="$glossary.sort != 0">
68 <xsl:apply-templates select="glossentry">
69 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::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'))"/>
70 </xsl:apply-templates>
73 <xsl:apply-templates select="glossentry"/>
79 <!-- empty glossary -->
83 <xsl:if test="not(parent::article)">
84 <xsl:call-template name="process.footnotes"/>
89 <xsl:template match="glossary/glossaryinfo"/>
90 <xsl:template match="glossary/info"/>
91 <xsl:template match="glossary/title"/>
92 <xsl:template match="glossary/subtitle"/>
93 <xsl:template match="glossary/titleabbrev"/>
95 <!-- ==================================================================== -->
97 <xsl:template match="glosslist">
99 <xsl:variable name="language">
100 <xsl:call-template name="l10n.language"/>
103 <xsl:variable name="lowercase">
104 <xsl:call-template name="gentext">
105 <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
109 <xsl:variable name="uppercase">
110 <xsl:call-template name="gentext">
111 <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
116 <xsl:apply-templates select="." mode="common.html.attributes"/>
117 <xsl:call-template name="anchor"/>
118 <xsl:if test="blockinfo/title|info/title|title">
119 <xsl:call-template name="formal.object.heading"/>
123 <xsl:when test="$glossary.sort != 0">
124 <xsl:apply-templates select="glossentry">
125 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::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'))"/>
126 </xsl:apply-templates>
129 <xsl:apply-templates select="glossentry"/>
136 <!-- ==================================================================== -->
138 <xsl:template match="glossdiv">
140 <xsl:variable name="language">
141 <xsl:call-template name="l10n.language"/>
144 <xsl:variable name="lowercase">
145 <xsl:call-template name="gentext">
146 <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
150 <xsl:variable name="uppercase">
151 <xsl:call-template name="gentext">
152 <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
156 <xsl:call-template name="id.warning"/>
159 <xsl:apply-templates select="." mode="common.html.attributes"/>
160 <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
164 <xsl:when test="$glossary.sort != 0">
165 <xsl:apply-templates select="glossentry">
166 <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase, $uppercase)"/>
167 </xsl:apply-templates>
170 <xsl:apply-templates select="glossentry"/>
177 <xsl:template match="glossdiv/title">
179 <xsl:apply-templates select="." mode="common.html.attributes"/>
180 <xsl:apply-templates/>
184 <!-- ==================================================================== -->
188 GlossTerm, Acronym?, Abbrev?,
191 (GlossSee | GlossDef+)
194 <xsl:template match="glossentry">
196 <xsl:when test="$glossentry.show.acronym = 'primary'">
198 <xsl:call-template name="anchor">
199 <xsl:with-param name="conditional">
201 <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
202 <xsl:otherwise>1</xsl:otherwise>
208 <xsl:when test="acronym|abbrev">
209 <xsl:apply-templates select="acronym|abbrev"/>
210 <xsl:text> (</xsl:text>
211 <xsl:apply-templates select="glossterm"/>
212 <xsl:text>)</xsl:text>
215 <xsl:apply-templates select="glossterm"/>
220 <xsl:when test="$glossentry.show.acronym = 'yes'">
222 <xsl:call-template name="anchor">
223 <xsl:with-param name="conditional">
225 <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
226 <xsl:otherwise>1</xsl:otherwise>
231 <xsl:apply-templates select="glossterm"/>
233 <xsl:if test="acronym|abbrev">
234 <xsl:text> (</xsl:text>
235 <xsl:apply-templates select="acronym|abbrev"/>
236 <xsl:text>)</xsl:text>
242 <xsl:call-template name="anchor">
243 <xsl:with-param name="conditional">
245 <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
246 <xsl:otherwise>1</xsl:otherwise>
251 <xsl:apply-templates select="glossterm"/>
256 <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
259 <xsl:template match="glossentry/glossterm">
260 <xsl:apply-templates/>
261 <xsl:if test="following-sibling::glossterm">, </xsl:if>
264 <xsl:template match="glossentry/acronym">
265 <xsl:apply-templates/>
266 <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
269 <xsl:template match="glossentry/abbrev">
270 <xsl:apply-templates/>
271 <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
274 <xsl:template match="glossentry/revhistory">
277 <xsl:template match="glossentry/glosssee">
278 <xsl:variable name="otherterm" select="@otherterm"/>
279 <xsl:variable name="targets" select="key('id', $otherterm)"/>
280 <xsl:variable name="target" select="$targets[1]"/>
281 <xsl:variable name="xlink" select="@xlink:href"/>
285 <xsl:variable name="template">
286 <xsl:call-template name="gentext.template">
287 <xsl:with-param name="context" select="'glossary'"/>
288 <xsl:with-param name="name" select="'see'"/>
292 <xsl:variable name="title">
294 <xsl:when test="$target">
296 <xsl:apply-templates select="." mode="common.html.attributes"/>
297 <xsl:attribute name="href">
298 <xsl:call-template name="href.target">
299 <xsl:with-param name="object" select="$target"/>
302 <xsl:apply-templates select="$target" mode="xref-to"/>
305 <xsl:when test="$xlink">
306 <xsl:call-template name="simple.xlink">
307 <xsl:with-param name="content">
308 <xsl:apply-templates/>
312 <xsl:when test="$otherterm != '' and not($target)">
314 <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
315 <xsl:value-of select="$otherterm"/>
317 <xsl:apply-templates/>
320 <xsl:apply-templates/>
325 <xsl:call-template name="substitute-markup">
326 <xsl:with-param name="template" select="$template"/>
327 <xsl:with-param name="title" select="$title"/>
333 <xsl:template match="glossentry/glossdef">
335 <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
336 <xsl:if test="glossseealso">
338 <xsl:variable name="template">
339 <xsl:call-template name="gentext.template">
340 <xsl:with-param name="context" select="'glossary'"/>
341 <xsl:with-param name="name" select="'seealso'"/>
344 <xsl:variable name="title">
345 <xsl:apply-templates select="glossseealso"/>
347 <xsl:call-template name="substitute-markup">
348 <xsl:with-param name="template" select="$template"/>
349 <xsl:with-param name="title" select="$title"/>
356 <xsl:template match="glossseealso">
357 <xsl:variable name="otherterm" select="@otherterm"/>
358 <xsl:variable name="targets" select="key('id', $otherterm)"/>
359 <xsl:variable name="target" select="$targets[1]"/>
360 <xsl:variable name="xlink" select="@xlink:href"/>
363 <xsl:when test="$target">
365 <xsl:apply-templates select="." mode="common.html.attributes"/>
366 <xsl:attribute name="href">
367 <xsl:call-template name="href.target">
368 <xsl:with-param name="object" select="$target"/>
371 <xsl:apply-templates select="$target" mode="xref-to"/>
374 <xsl:when test="$xlink">
375 <xsl:call-template name="simple.xlink">
376 <xsl:with-param name="content">
377 <xsl:apply-templates/>
381 <xsl:when test="$otherterm != '' and not($target)">
383 <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
384 <xsl:value-of select="$otherterm"/>
386 <xsl:apply-templates/>
389 <xsl:apply-templates/>
394 <xsl:when test="position() = last()"/>
396 <xsl:call-template name="gentext.template">
397 <xsl:with-param name="context" select="'glossary'"/>
398 <xsl:with-param name="name" select="'seealso-separator'"/>
404 <!-- ==================================================================== -->
406 <!-- Glossary collection -->
408 <xsl:template match="glossary[@role='auto']" priority="2">
410 <xsl:variable name="language">
411 <xsl:call-template name="l10n.language"/>
414 <xsl:variable name="lowercase">
415 <xsl:call-template name="gentext">
416 <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
420 <xsl:variable name="uppercase">
421 <xsl:call-template name="gentext">
422 <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
426 <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
427 <xsl:variable name="collection" select="document($glossary.collection, .)"/>
429 <xsl:call-template name="id.warning"/>
431 <xsl:if test="$glossary.collection = ''">
433 <xsl:text>Warning: processing automatic glossary </xsl:text>
434 <xsl:text>without a glossary.collection file.</xsl:text>
438 <xsl:if test="not($collection) and $glossary.collection != ''">
440 <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
441 <xsl:text>open glossary.collection file '</xsl:text>
442 <xsl:value-of select="$glossary.collection"/>
443 <xsl:text>'</xsl:text>
448 <xsl:apply-templates select="." mode="common.html.attributes"/>
449 <xsl:if test="$generate.id.attributes != 0">
450 <xsl:attribute name="id">
451 <xsl:call-template name="object.id"/>
455 <xsl:call-template name="glossary.titlepage"/>
458 <xsl:when test="glossdiv and $collection//glossdiv">
459 <xsl:for-each select="$collection//glossdiv">
460 <!-- first see if there are any in this div -->
461 <xsl:variable name="exist.test">
462 <xsl:for-each select="glossentry">
463 <xsl:variable name="cterm" select="glossterm"/>
464 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
465 <xsl:value-of select="glossterm"/>
470 <xsl:if test="$exist.test != ''">
471 <xsl:apply-templates select="." mode="auto-glossary">
472 <xsl:with-param name="terms" select="$terms"/>
473 </xsl:apply-templates>
480 <xsl:when test="$glossary.sort != 0">
481 <xsl:for-each select="$collection//glossentry">
482 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::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'))"/>
483 <xsl:variable name="cterm" select="glossterm"/>
484 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
485 <xsl:apply-templates select="." mode="auto-glossary"/>
490 <xsl:for-each select="$collection//glossentry">
491 <xsl:variable name="cterm" select="glossterm"/>
492 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
493 <xsl:apply-templates select="." mode="auto-glossary"/>
502 <xsl:if test="not(parent::article)">
503 <xsl:call-template name="process.footnotes"/>
508 <xsl:template match="*" mode="auto-glossary">
509 <!-- pop back out to the default mode for most elements -->
510 <xsl:apply-templates select="."/>
513 <xsl:template match="glossdiv" mode="auto-glossary">
514 <xsl:param name="terms" select="."/>
517 <xsl:variable name="language">
518 <xsl:call-template name="l10n.language"/>
521 <xsl:variable name="lowercase">
522 <xsl:call-template name="gentext">
523 <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
527 <xsl:variable name="uppercase">
528 <xsl:call-template name="gentext">
529 <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
535 <xsl:apply-templates select="." mode="common.html.attributes"/>
536 <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
540 <xsl:when test="$glossary.sort != 0">
541 <xsl:for-each select="glossentry">
542 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::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'))"/>!
543 <xsl:variable name="cterm" select="glossterm"/>
544 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
545 <xsl:apply-templates select="." mode="auto-glossary"/>
550 <xsl:for-each select="glossentry">
551 <xsl:variable name="cterm" select="glossterm"/>
552 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
553 <xsl:apply-templates select="." mode="auto-glossary"/>
562 <!-- ==================================================================== -->