Imported Upstream version 1.78.1
[platform/upstream/docbook-xsl-stylesheets.git] / xhtml / glossary.xsl
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">
5
6 <!-- ********************************************************************
7      $Id: glossary.xsl 9709 2013-01-22 18:56:09Z bobstayton $
8      ********************************************************************
9
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.
13
14      ******************************************************************** -->
15
16 <!-- ==================================================================== -->
17
18 <xsl:template match="glossary">
19   
20 <xsl:variable name="language">
21   <xsl:call-template name="l10n.language"/>
22 </xsl:variable>
23
24 <xsl:variable name="lowercase">
25   <xsl:call-template name="gentext">
26     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
27   </xsl:call-template>
28 </xsl:variable>
29
30 <xsl:variable name="uppercase">
31   <xsl:call-template name="gentext">
32     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
33   </xsl:call-template>
34 </xsl:variable>
35
36   <xsl:call-template name="id.warning"/>
37
38   <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
39     <xsl:apply-templates select="." mode="common.html.attributes"/>
40     <xsl:call-template name="id.attribute">
41       <xsl:with-param name="conditional" select="0"/>
42     </xsl:call-template>
43
44     <xsl:call-template name="glossary.titlepage"/>
45
46     <xsl:choose>
47       <xsl:when test="glossdiv">
48         <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
49       </xsl:when>
50       <xsl:when test="glossentry">
51         <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
52       </xsl:when>
53       <xsl:otherwise>
54         <xsl:apply-templates/>
55       </xsl:otherwise>
56     </xsl:choose>
57
58     <xsl:choose>
59       <xsl:when test="glossdiv">
60         <xsl:apply-templates select="glossdiv"/>
61       </xsl:when>
62       <xsl:when test="glossentry">
63         <dl>
64           <xsl:choose>
65             <xsl:when test="$glossary.sort != 0">
66               <xsl:apply-templates select="glossentry">
67                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
68               </xsl:apply-templates>
69             </xsl:when>
70             <xsl:otherwise>
71               <xsl:apply-templates select="glossentry"/>
72             </xsl:otherwise>
73           </xsl:choose>
74         </dl>
75       </xsl:when>
76       <xsl:otherwise>
77         <!-- empty glossary -->
78       </xsl:otherwise>
79     </xsl:choose>
80
81     <xsl:if test="not(parent::article)">
82       <xsl:call-template name="process.footnotes"/>
83     </xsl:if>
84   </xsl:element>
85 </xsl:template>
86
87 <xsl:template match="glossary/glossaryinfo"/>
88 <xsl:template match="glossary/info"/>
89 <xsl:template match="glossary/title"/>
90 <xsl:template match="glossary/subtitle"/>
91 <xsl:template match="glossary/titleabbrev"/>
92
93 <!-- ==================================================================== -->
94
95 <xsl:template match="glosslist">
96   
97 <xsl:variable name="language">
98   <xsl:call-template name="l10n.language"/>
99 </xsl:variable>
100
101 <xsl:variable name="lowercase">
102   <xsl:call-template name="gentext">
103     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
104   </xsl:call-template>
105 </xsl:variable>
106
107 <xsl:variable name="uppercase">
108   <xsl:call-template name="gentext">
109     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
110   </xsl:call-template>
111 </xsl:variable>
112
113   <div>
114     <xsl:apply-templates select="." mode="common.html.attributes"/>
115     <xsl:call-template name="id.attribute"/>
116     <xsl:call-template name="anchor"/>
117     <xsl:if test="blockinfo/title|info/title|title">
118       <xsl:call-template name="formal.object.heading"/>
119     </xsl:if>
120     <dl>
121       <xsl:choose>
122         <xsl:when test="$glossary.sort != 0">
123           <xsl:apply-templates select="glossentry">
124                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
125           </xsl:apply-templates>
126         </xsl:when>
127         <xsl:otherwise>
128           <xsl:apply-templates select="glossentry"/>
129         </xsl:otherwise>
130       </xsl:choose>
131     </dl>
132   </div>
133 </xsl:template>
134
135 <!-- ==================================================================== -->
136
137 <xsl:template match="glossdiv">
138   
139 <xsl:variable name="language">
140   <xsl:call-template name="l10n.language"/>
141 </xsl:variable>
142
143 <xsl:variable name="lowercase">
144   <xsl:call-template name="gentext">
145     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
146   </xsl:call-template>
147 </xsl:variable>
148
149 <xsl:variable name="uppercase">
150   <xsl:call-template name="gentext">
151     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
152   </xsl:call-template>
153 </xsl:variable>
154
155   <xsl:call-template name="id.warning"/>
156
157   <div>
158     <xsl:apply-templates select="." mode="common.html.attributes"/>
159     <xsl:call-template name="id.attribute">
160       <xsl:with-param name="conditional" select="0"/>
161     </xsl:call-template>
162     <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
163
164     <dl>
165       <xsl:choose>
166         <xsl:when test="$glossary.sort != 0">
167           <xsl:apply-templates select="glossentry">
168             <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase,                                          $uppercase)"/>
169           </xsl:apply-templates>
170         </xsl:when>
171         <xsl:otherwise>
172           <xsl:apply-templates select="glossentry"/>
173         </xsl:otherwise>
174       </xsl:choose>
175     </dl>
176   </div>
177 </xsl:template>
178
179 <xsl:template match="glossdiv/title">
180   <h3>
181     <xsl:apply-templates select="." mode="common.html.attributes"/>
182     <xsl:apply-templates/>
183   </h3>
184 </xsl:template>
185
186 <!-- ==================================================================== -->
187
188 <!--
189 GlossEntry ::=
190   GlossTerm, Acronym?, Abbrev?,
191   (IndexTerm)*,
192   RevHistory?,
193   (GlossSee | GlossDef+)
194 -->
195
196 <xsl:template match="glossentry">
197   <xsl:choose>
198     <xsl:when test="$glossentry.show.acronym = 'primary'">
199       <dt>
200         <xsl:call-template name="id.attribute">
201           <xsl:with-param name="conditional">
202             <xsl:choose>
203               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
204               <xsl:otherwise>1</xsl:otherwise>
205             </xsl:choose>
206           </xsl:with-param>
207         </xsl:call-template>
208         <xsl:call-template name="anchor">
209           <xsl:with-param name="conditional">
210             <xsl:choose>
211               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
212               <xsl:otherwise>1</xsl:otherwise>
213             </xsl:choose>
214           </xsl:with-param>
215         </xsl:call-template>
216
217         <xsl:choose>
218           <xsl:when test="acronym|abbrev">
219             <xsl:apply-templates select="acronym|abbrev"/>
220             <xsl:text> (</xsl:text>
221             <xsl:apply-templates select="glossterm"/>
222             <xsl:text>)</xsl:text>
223           </xsl:when>
224           <xsl:otherwise>
225             <xsl:apply-templates select="glossterm"/>
226           </xsl:otherwise>
227         </xsl:choose>
228       </dt>
229     </xsl:when>
230     <xsl:when test="$glossentry.show.acronym = 'yes'">
231       <dt>
232         <xsl:call-template name="id.attribute">
233           <xsl:with-param name="conditional">
234             <xsl:choose>
235               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
236               <xsl:otherwise>1</xsl:otherwise>
237             </xsl:choose>
238           </xsl:with-param>
239         </xsl:call-template>
240         <xsl:call-template name="anchor">
241           <xsl:with-param name="conditional">
242             <xsl:choose>
243               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
244               <xsl:otherwise>1</xsl:otherwise>
245             </xsl:choose>
246           </xsl:with-param>
247         </xsl:call-template>
248
249         <xsl:apply-templates select="glossterm"/>
250
251         <xsl:if test="acronym|abbrev">
252           <xsl:text> (</xsl:text>
253           <xsl:apply-templates select="acronym|abbrev"/>
254           <xsl:text>)</xsl:text>
255         </xsl:if>
256       </dt>
257     </xsl:when>
258     <xsl:otherwise>
259       <dt>
260         <xsl:call-template name="id.attribute">
261           <xsl:with-param name="conditional">
262             <xsl:choose>
263               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
264               <xsl:otherwise>1</xsl:otherwise>
265             </xsl:choose>
266           </xsl:with-param>
267         </xsl:call-template>
268         <xsl:call-template name="anchor">
269           <xsl:with-param name="conditional">
270             <xsl:choose>
271               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
272               <xsl:otherwise>1</xsl:otherwise>
273             </xsl:choose>
274           </xsl:with-param>
275         </xsl:call-template>
276
277         <xsl:apply-templates select="glossterm"/>
278       </dt>
279     </xsl:otherwise>
280   </xsl:choose>
281
282   <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
283 </xsl:template>
284
285 <xsl:template match="glossentry/glossterm">
286   <span>
287     <xsl:apply-templates select="." mode="common.html.attributes"/>
288     <xsl:call-template name="id.attribute"/>
289     <xsl:call-template name="anchor"/>
290     <xsl:apply-templates/>
291   </span>
292   <xsl:if test="following-sibling::glossterm">, </xsl:if>
293 </xsl:template>
294
295 <xsl:template match="glossentry/acronym">
296   <xsl:apply-templates/>
297   <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
298 </xsl:template>
299
300 <xsl:template match="glossentry/abbrev">
301   <xsl:apply-templates/>
302   <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
303 </xsl:template>
304
305 <xsl:template match="glossentry/revhistory">
306 </xsl:template>
307
308 <xsl:template match="glossentry/glosssee">
309   <xsl:variable name="otherterm" select="@otherterm"/>
310   <xsl:variable name="targets" select="key('id', $otherterm)"/>
311   <xsl:variable name="target" select="$targets[1]"/>
312   <xsl:variable name="xlink" select="@xlink:href"/>
313
314   <dd>
315     <p>
316       <xsl:variable name="template">
317         <xsl:call-template name="gentext.template">
318           <xsl:with-param name="context" select="'glossary'"/>
319           <xsl:with-param name="name" select="'see'"/>
320         </xsl:call-template>
321       </xsl:variable>
322
323       <xsl:variable name="title">
324         <xsl:choose>
325           <xsl:when test="$target">
326             <a>
327               <xsl:apply-templates select="." mode="common.html.attributes"/>
328               <xsl:call-template name="id.attribute"/>
329               <xsl:attribute name="href">
330                 <xsl:call-template name="href.target">
331                   <xsl:with-param name="object" select="$target"/>
332                 </xsl:call-template>
333               </xsl:attribute>
334               <xsl:apply-templates select="$target" mode="xref-to"/>
335             </a>
336           </xsl:when>
337           <xsl:when test="$xlink">
338             <xsl:call-template name="simple.xlink">
339               <xsl:with-param name="content">
340                 <xsl:apply-templates/>
341               </xsl:with-param>
342             </xsl:call-template>
343           </xsl:when>
344           <xsl:when test="$otherterm != '' and not($target)">
345             <xsl:message>
346               <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
347               <xsl:value-of select="$otherterm"/>
348             </xsl:message>
349             <xsl:apply-templates/>
350           </xsl:when>
351           <xsl:otherwise>
352             <xsl:apply-templates/>
353           </xsl:otherwise>
354         </xsl:choose>
355       </xsl:variable>
356
357       <xsl:call-template name="substitute-markup">
358         <xsl:with-param name="template" select="$template"/>
359         <xsl:with-param name="title" select="$title"/>
360       </xsl:call-template>
361     </p>
362   </dd>
363 </xsl:template>
364
365 <xsl:template match="glossentry/glossdef">
366   <dd>
367     <xsl:apply-templates select="." mode="common.html.attributes"/>
368     <xsl:call-template name="id.attribute"/>
369     <xsl:call-template name="anchor"/>
370     <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
371     <xsl:if test="glossseealso">
372       <p>
373         <xsl:variable name="template">
374           <xsl:call-template name="gentext.template">
375             <xsl:with-param name="context" select="'glossary'"/>
376             <xsl:with-param name="name" select="'seealso'"/>
377           </xsl:call-template>
378         </xsl:variable>
379         <xsl:variable name="title">
380           <xsl:apply-templates select="glossseealso"/>
381         </xsl:variable>
382         <xsl:call-template name="substitute-markup">
383           <xsl:with-param name="template" select="$template"/>
384           <xsl:with-param name="title" select="$title"/>
385         </xsl:call-template>
386       </p>
387     </xsl:if>
388   </dd>
389 </xsl:template>
390
391 <xsl:template match="glossseealso">
392   <xsl:variable name="otherterm" select="@otherterm"/>
393   <xsl:variable name="targets" select="key('id', $otherterm)"/>
394   <xsl:variable name="target" select="$targets[1]"/>
395   <xsl:variable name="xlink" select="@xlink:href"/>
396
397   <xsl:choose>
398     <xsl:when test="$target">
399       <a>
400         <xsl:apply-templates select="." mode="common.html.attributes"/>
401         <xsl:call-template name="id.attribute"/>
402         <xsl:attribute name="href">
403           <xsl:call-template name="href.target">
404             <xsl:with-param name="object" select="$target"/>
405           </xsl:call-template>
406         </xsl:attribute>
407         <xsl:apply-templates select="$target" mode="xref-to"/>
408       </a>
409     </xsl:when>
410     <xsl:when test="$xlink">
411       <xsl:call-template name="simple.xlink">
412         <xsl:with-param name="content">
413           <xsl:apply-templates/>
414         </xsl:with-param>
415       </xsl:call-template>
416     </xsl:when>
417     <xsl:when test="$otherterm != '' and not($target)">
418       <xsl:message>
419         <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
420         <xsl:value-of select="$otherterm"/>
421       </xsl:message>
422       <xsl:apply-templates/>
423     </xsl:when>
424     <xsl:otherwise>
425       <xsl:apply-templates/>
426     </xsl:otherwise>
427   </xsl:choose>
428
429   <xsl:choose>
430     <xsl:when test="position() = last()"/>
431     <xsl:otherwise>
432                 <xsl:call-template name="gentext.template">
433                   <xsl:with-param name="context" select="'glossary'"/>
434                   <xsl:with-param name="name" select="'seealso-separator'"/>
435                 </xsl:call-template>
436     </xsl:otherwise>
437   </xsl:choose>
438 </xsl:template>
439
440 <!-- ==================================================================== -->
441
442 <!-- Glossary collection -->
443
444 <xsl:template match="glossary[@role='auto']" priority="2">
445   
446 <xsl:variable name="language">
447   <xsl:call-template name="l10n.language"/>
448 </xsl:variable>
449
450 <xsl:variable name="lowercase">
451   <xsl:call-template name="gentext">
452     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
453   </xsl:call-template>
454 </xsl:variable>
455
456 <xsl:variable name="uppercase">
457   <xsl:call-template name="gentext">
458     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
459   </xsl:call-template>
460 </xsl:variable>
461
462   <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
463   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
464
465   <xsl:call-template name="id.warning"/>
466
467   <xsl:if test="$glossary.collection = ''">
468     <xsl:message>
469       <xsl:text>Warning: processing automatic glossary </xsl:text>
470       <xsl:text>without a glossary.collection file.</xsl:text>
471     </xsl:message>
472   </xsl:if>
473
474   <xsl:if test="not($collection) and $glossary.collection != ''">
475     <xsl:message>
476       <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
477       <xsl:text>open glossary.collection file '</xsl:text>
478       <xsl:value-of select="$glossary.collection"/>
479       <xsl:text>'</xsl:text>
480     </xsl:message>
481   </xsl:if>
482
483   <div>
484     <xsl:apply-templates select="." mode="common.html.attributes"/>
485     <xsl:call-template name="id.attribute">
486       <xsl:with-param name="conditional" select="0"/>
487     </xsl:call-template>
488
489     <xsl:call-template name="glossary.titlepage"/>
490
491     <xsl:choose>
492       <xsl:when test="glossdiv and $collection//glossdiv">
493         <xsl:for-each select="$collection//glossdiv">
494           <!-- first see if there are any in this div -->
495           <xsl:variable name="exist.test">
496             <xsl:for-each select="glossentry">
497               <xsl:variable name="cterm" select="glossterm"/>
498               <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
499                 <xsl:value-of select="glossterm"/>
500               </xsl:if>
501             </xsl:for-each>
502           </xsl:variable>
503
504           <xsl:if test="$exist.test != ''">
505             <xsl:apply-templates select="." mode="auto-glossary">
506               <xsl:with-param name="terms" select="$terms"/>
507             </xsl:apply-templates>
508           </xsl:if>
509         </xsl:for-each>
510       </xsl:when>
511       <xsl:otherwise>
512         <dl>
513           <xsl:choose>
514             <xsl:when test="$glossary.sort != 0">
515               <xsl:for-each select="$collection//glossentry">
516                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
517                 <xsl:variable name="cterm" select="glossterm"/>
518                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
519                   <xsl:apply-templates select="." mode="auto-glossary"/>
520                 </xsl:if>
521               </xsl:for-each>
522             </xsl:when>
523             <xsl:otherwise>
524               <xsl:for-each select="$collection//glossentry">
525                 <xsl:variable name="cterm" select="glossterm"/>
526                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
527                   <xsl:apply-templates select="." mode="auto-glossary"/>
528                 </xsl:if>
529               </xsl:for-each>
530             </xsl:otherwise>
531           </xsl:choose>
532         </dl>
533       </xsl:otherwise>
534     </xsl:choose>
535
536     <xsl:if test="not(parent::article)">
537       <xsl:call-template name="process.footnotes"/>
538     </xsl:if>
539   </div>
540 </xsl:template>
541
542 <xsl:template match="*" mode="auto-glossary">
543   <!-- pop back out to the default mode for most elements -->
544   <xsl:apply-templates select="."/>
545 </xsl:template>
546
547 <xsl:template match="glossdiv" mode="auto-glossary">
548   <xsl:param name="terms" select="."/>
549
550   
551 <xsl:variable name="language">
552   <xsl:call-template name="l10n.language"/>
553 </xsl:variable>
554
555 <xsl:variable name="lowercase">
556   <xsl:call-template name="gentext">
557     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
558   </xsl:call-template>
559 </xsl:variable>
560
561 <xsl:variable name="uppercase">
562   <xsl:call-template name="gentext">
563     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
564   </xsl:call-template>
565 </xsl:variable>
566
567
568   <div>
569     <xsl:apply-templates select="." mode="common.html.attributes"/>
570     <xsl:call-template name="id.attribute">
571       <xsl:with-param name="conditional" select="0"/>
572     </xsl:call-template>
573     <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
574
575     <dl>
576       <xsl:choose>
577         <xsl:when test="$glossary.sort != 0">
578           <xsl:for-each select="glossentry">
579                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'Aa&#192;&#224;&#193;&#225;&#194;&#226;&#195;&#227;&#196;&#228;&#197;&#229;&#256;&#257;&#258;&#259;&#260;&#261;&#461;&#462;&#478;&#479;&#480;&#481;&#506;&#507;&#512;&#513;&#514;&#515;&#550;&#551;&#7680;&#7681;&#7834;&#7840;&#7841;&#7842;&#7843;&#7844;&#7845;&#7846;&#7847;&#7848;&#7849;&#7850;&#7851;&#7852;&#7853;&#7854;&#7855;&#7856;&#7857;&#7858;&#7859;&#7860;&#7861;&#7862;&#7863;Bb&#384;&#385;&#595;&#386;&#387;&#7682;&#7683;&#7684;&#7685;&#7686;&#7687;Cc&#199;&#231;&#262;&#263;&#264;&#265;&#266;&#267;&#268;&#269;&#391;&#392;&#597;&#7688;&#7689;Dd&#270;&#271;&#272;&#273;&#394;&#599;&#395;&#396;&#453;&#498;&#545;&#598;&#7690;&#7691;&#7692;&#7693;&#7694;&#7695;&#7696;&#7697;&#7698;&#7699;Ee&#200;&#232;&#201;&#233;&#202;&#234;&#203;&#235;&#274;&#275;&#276;&#277;&#278;&#279;&#280;&#281;&#282;&#283;&#516;&#517;&#518;&#519;&#552;&#553;&#7700;&#7701;&#7702;&#7703;&#7704;&#7705;&#7706;&#7707;&#7708;&#7709;&#7864;&#7865;&#7866;&#7867;&#7868;&#7869;&#7870;&#7871;&#7872;&#7873;&#7874;&#7875;&#7876;&#7877;&#7878;&#7879;Ff&#401;&#402;&#7710;&#7711;Gg&#284;&#285;&#286;&#287;&#288;&#289;&#290;&#291;&#403;&#608;&#484;&#485;&#486;&#487;&#500;&#501;&#7712;&#7713;Hh&#292;&#293;&#294;&#295;&#542;&#543;&#614;&#7714;&#7715;&#7716;&#7717;&#7718;&#7719;&#7720;&#7721;&#7722;&#7723;&#7830;Ii&#204;&#236;&#205;&#237;&#206;&#238;&#207;&#239;&#296;&#297;&#298;&#299;&#300;&#301;&#302;&#303;&#304;&#407;&#616;&#463;&#464;&#520;&#521;&#522;&#523;&#7724;&#7725;&#7726;&#7727;&#7880;&#7881;&#7882;&#7883;Jj&#308;&#309;&#496;&#669;Kk&#310;&#311;&#408;&#409;&#488;&#489;&#7728;&#7729;&#7730;&#7731;&#7732;&#7733;Ll&#313;&#314;&#315;&#316;&#317;&#318;&#319;&#320;&#321;&#322;&#410;&#456;&#564;&#619;&#620;&#621;&#7734;&#7735;&#7736;&#7737;&#7738;&#7739;&#7740;&#7741;Mm&#625;&#7742;&#7743;&#7744;&#7745;&#7746;&#7747;Nn&#209;&#241;&#323;&#324;&#325;&#326;&#327;&#328;&#413;&#626;&#414;&#544;&#459;&#504;&#505;&#565;&#627;&#7748;&#7749;&#7750;&#7751;&#7752;&#7753;&#7754;&#7755;Oo&#210;&#242;&#211;&#243;&#212;&#244;&#213;&#245;&#214;&#246;&#216;&#248;&#332;&#333;&#334;&#335;&#336;&#337;&#415;&#416;&#417;&#465;&#466;&#490;&#491;&#492;&#493;&#510;&#511;&#524;&#525;&#526;&#527;&#554;&#555;&#556;&#557;&#558;&#559;&#560;&#561;&#7756;&#7757;&#7758;&#7759;&#7760;&#7761;&#7762;&#7763;&#7884;&#7885;&#7886;&#7887;&#7888;&#7889;&#7890;&#7891;&#7892;&#7893;&#7894;&#7895;&#7896;&#7897;&#7898;&#7899;&#7900;&#7901;&#7902;&#7903;&#7904;&#7905;&#7906;&#7907;Pp&#420;&#421;&#7764;&#7765;&#7766;&#7767;Qq&#672;Rr&#340;&#341;&#342;&#343;&#344;&#345;&#528;&#529;&#530;&#531;&#636;&#637;&#638;&#7768;&#7769;&#7770;&#7771;&#7772;&#7773;&#7774;&#7775;Ss&#346;&#347;&#348;&#349;&#350;&#351;&#352;&#353;&#536;&#537;&#642;&#7776;&#7777;&#7778;&#7779;&#7780;&#7781;&#7782;&#7783;&#7784;&#7785;Tt&#354;&#355;&#356;&#357;&#358;&#359;&#427;&#428;&#429;&#430;&#648;&#538;&#539;&#566;&#7786;&#7787;&#7788;&#7789;&#7790;&#7791;&#7792;&#7793;&#7831;Uu&#217;&#249;&#218;&#250;&#219;&#251;&#220;&#252;&#360;&#361;&#362;&#363;&#364;&#365;&#366;&#367;&#368;&#369;&#370;&#371;&#431;&#432;&#467;&#468;&#469;&#470;&#471;&#472;&#473;&#474;&#475;&#476;&#532;&#533;&#534;&#535;&#7794;&#7795;&#7796;&#7797;&#7798;&#7799;&#7800;&#7801;&#7802;&#7803;&#7908;&#7909;&#7910;&#7911;&#7912;&#7913;&#7914;&#7915;&#7916;&#7917;&#7918;&#7919;&#7920;&#7921;Vv&#434;&#651;&#7804;&#7805;&#7806;&#7807;Ww&#372;&#373;&#7808;&#7809;&#7810;&#7811;&#7812;&#7813;&#7814;&#7815;&#7816;&#7817;&#7832;Xx&#7818;&#7819;&#7820;&#7821;Yy&#221;&#253;&#255;&#376;&#374;&#375;&#435;&#436;&#562;&#563;&#7822;&#7823;&#7833;&#7922;&#7923;&#7924;&#7925;&#7926;&#7927;&#7928;&#7929;Zz&#377;&#378;&#379;&#380;&#381;&#382;&#437;&#438;&#548;&#549;&#656;&#657;&#7824;&#7825;&#7826;&#7827;&#7828;&#7829;&#7829;', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
580             <xsl:variable name="cterm" select="glossterm"/>
581             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
582               <xsl:apply-templates select="." mode="auto-glossary"/>
583             </xsl:if>
584           </xsl:for-each>
585         </xsl:when>
586         <xsl:otherwise>
587           <xsl:for-each select="glossentry">
588             <xsl:variable name="cterm" select="glossterm"/>
589             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
590               <xsl:apply-templates select="." mode="auto-glossary"/>
591             </xsl:if>
592           </xsl:for-each>
593         </xsl:otherwise>
594       </xsl:choose>
595     </dl>
596   </div>
597 </xsl:template>
598
599 <!-- ==================================================================== -->
600
601 </xsl:stylesheet>