Whamcloud - gitweb
LUDOC-120 presentation: build bits for webhelp.
[doc/manual.git] / webhelp / 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 9922 2014-07-31 17:33:43Z 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         <xsl:apply-templates select="indexterm"/>
257       </dt>
258     </xsl:when>
259     <xsl:otherwise>
260       <dt>
261         <xsl:call-template name="id.attribute">
262           <xsl:with-param name="conditional">
263             <xsl:choose>
264               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
265               <xsl:otherwise>1</xsl:otherwise>
266             </xsl:choose>
267           </xsl:with-param>
268         </xsl:call-template>
269         <xsl:call-template name="anchor">
270           <xsl:with-param name="conditional">
271             <xsl:choose>
272               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
273               <xsl:otherwise>1</xsl:otherwise>
274             </xsl:choose>
275           </xsl:with-param>
276         </xsl:call-template>
277
278         <xsl:apply-templates select="glossterm"/>
279         <xsl:apply-templates select="indexterm"/>
280       </dt>
281     </xsl:otherwise>
282   </xsl:choose>
283
284   <xsl:apply-templates select="glosssee|glossdef"/>
285 </xsl:template>
286
287 <xsl:template match="glossentry/glossterm">
288   <span>
289     <xsl:apply-templates select="." mode="common.html.attributes"/>
290     <xsl:call-template name="id.attribute"/>
291     <xsl:call-template name="anchor"/>
292     <xsl:apply-templates/>
293   </span>
294   <xsl:if test="following-sibling::glossterm">, </xsl:if>
295 </xsl:template>
296
297 <xsl:template match="glossentry/acronym">
298   <xsl:apply-templates/>
299   <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
300 </xsl:template>
301
302 <xsl:template match="glossentry/abbrev">
303   <xsl:apply-templates/>
304   <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
305 </xsl:template>
306
307 <xsl:template match="glossentry/revhistory">
308 </xsl:template>
309
310 <xsl:template match="glossentry/glosssee">
311   <xsl:variable name="otherterm" select="@otherterm"/>
312   <xsl:variable name="targets" select="key('id', $otherterm)"/>
313   <xsl:variable name="target" select="$targets[1]"/>
314   <xsl:variable name="xlink" select="@xlink:href"/>
315
316   <dd>
317     <p>
318       <xsl:variable name="template">
319         <xsl:call-template name="gentext.template">
320           <xsl:with-param name="context" select="'glossary'"/>
321           <xsl:with-param name="name" select="'see'"/>
322         </xsl:call-template>
323       </xsl:variable>
324
325       <xsl:variable name="title">
326         <xsl:choose>
327           <xsl:when test="$target">
328             <a>
329               <xsl:apply-templates select="." mode="common.html.attributes"/>
330               <xsl:call-template name="id.attribute"/>
331               <xsl:attribute name="href">
332                 <xsl:call-template name="href.target">
333                   <xsl:with-param name="object" select="$target"/>
334                 </xsl:call-template>
335               </xsl:attribute>
336               <xsl:apply-templates select="$target" mode="xref-to"/>
337             </a>
338           </xsl:when>
339           <xsl:when test="$xlink">
340             <xsl:call-template name="simple.xlink">
341               <xsl:with-param name="content">
342                 <xsl:apply-templates/>
343               </xsl:with-param>
344             </xsl:call-template>
345           </xsl:when>
346           <xsl:when test="$otherterm != '' and not($target)">
347             <xsl:message>
348               <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
349               <xsl:value-of select="$otherterm"/>
350             </xsl:message>
351             <xsl:apply-templates/>
352           </xsl:when>
353           <xsl:otherwise>
354             <xsl:apply-templates/>
355           </xsl:otherwise>
356         </xsl:choose>
357       </xsl:variable>
358
359       <xsl:call-template name="substitute-markup">
360         <xsl:with-param name="template" select="$template"/>
361         <xsl:with-param name="title" select="$title"/>
362       </xsl:call-template>
363     </p>
364   </dd>
365 </xsl:template>
366
367 <xsl:template match="glossentry/glossdef">
368   <dd>
369     <xsl:apply-templates select="." mode="common.html.attributes"/>
370     <xsl:call-template name="id.attribute"/>
371     <xsl:call-template name="anchor"/>
372     <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
373     <xsl:if test="glossseealso">
374       <p>
375         <xsl:variable name="template">
376           <xsl:call-template name="gentext.template">
377             <xsl:with-param name="context" select="'glossary'"/>
378             <xsl:with-param name="name" select="'seealso'"/>
379           </xsl:call-template>
380         </xsl:variable>
381         <xsl:variable name="title">
382           <xsl:apply-templates select="glossseealso"/>
383         </xsl:variable>
384         <xsl:call-template name="substitute-markup">
385           <xsl:with-param name="template" select="$template"/>
386           <xsl:with-param name="title" select="$title"/>
387         </xsl:call-template>
388       </p>
389     </xsl:if>
390   </dd>
391 </xsl:template>
392
393 <xsl:template match="glossseealso">
394   <xsl:variable name="otherterm" select="@otherterm"/>
395   <xsl:variable name="targets" select="key('id', $otherterm)"/>
396   <xsl:variable name="target" select="$targets[1]"/>
397   <xsl:variable name="xlink" select="@xlink:href"/>
398
399   <xsl:choose>
400     <xsl:when test="$target">
401       <a>
402         <xsl:apply-templates select="." mode="common.html.attributes"/>
403         <xsl:call-template name="id.attribute"/>
404         <xsl:attribute name="href">
405           <xsl:call-template name="href.target">
406             <xsl:with-param name="object" select="$target"/>
407           </xsl:call-template>
408         </xsl:attribute>
409         <xsl:apply-templates select="$target" mode="xref-to"/>
410       </a>
411     </xsl:when>
412     <xsl:when test="$xlink">
413       <xsl:call-template name="simple.xlink">
414         <xsl:with-param name="content">
415           <xsl:apply-templates/>
416         </xsl:with-param>
417       </xsl:call-template>
418     </xsl:when>
419     <xsl:when test="$otherterm != '' and not($target)">
420       <xsl:message>
421         <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
422         <xsl:value-of select="$otherterm"/>
423       </xsl:message>
424       <xsl:apply-templates/>
425     </xsl:when>
426     <xsl:otherwise>
427       <xsl:apply-templates/>
428     </xsl:otherwise>
429   </xsl:choose>
430
431   <xsl:choose>
432     <xsl:when test="position() = last()"/>
433     <xsl:otherwise>
434                 <xsl:call-template name="gentext.template">
435                   <xsl:with-param name="context" select="'glossary'"/>
436                   <xsl:with-param name="name" select="'seealso-separator'"/>
437                 </xsl:call-template>
438     </xsl:otherwise>
439   </xsl:choose>
440 </xsl:template>
441
442 <!-- ==================================================================== -->
443
444 <!-- Glossary collection -->
445
446 <xsl:template match="glossary[@role='auto']" priority="2">
447   
448 <xsl:variable name="language">
449   <xsl:call-template name="l10n.language"/>
450 </xsl:variable>
451
452 <xsl:variable name="lowercase">
453   <xsl:call-template name="gentext">
454     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
455   </xsl:call-template>
456 </xsl:variable>
457
458 <xsl:variable name="uppercase">
459   <xsl:call-template name="gentext">
460     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
461   </xsl:call-template>
462 </xsl:variable>
463
464   <xsl:variable name="terms" select="//glossterm[not(parent::glossdef)]|//firstterm"/>
465   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
466
467   <xsl:call-template name="id.warning"/>
468
469   <xsl:if test="$glossary.collection = ''">
470     <xsl:message>
471       <xsl:text>Warning: processing automatic glossary </xsl:text>
472       <xsl:text>without a glossary.collection file.</xsl:text>
473     </xsl:message>
474   </xsl:if>
475
476   <xsl:if test="not($collection) and $glossary.collection != ''">
477     <xsl:message>
478       <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
479       <xsl:text>open glossary.collection file '</xsl:text>
480       <xsl:value-of select="$glossary.collection"/>
481       <xsl:text>'</xsl:text>
482     </xsl:message>
483   </xsl:if>
484
485   <div>
486     <xsl:apply-templates select="." mode="common.html.attributes"/>
487     <xsl:call-template name="id.attribute">
488       <xsl:with-param name="conditional" select="0"/>
489     </xsl:call-template>
490
491     <xsl:call-template name="glossary.titlepage"/>
492
493     <xsl:choose>
494       <xsl:when test="glossdiv and $collection//glossdiv">
495         <xsl:for-each select="$collection//glossdiv">
496           <!-- first see if there are any in this div -->
497           <xsl:variable name="exist.test">
498             <xsl:for-each select="glossentry">
499               <xsl:variable name="cterm" select="glossterm"/>
500               <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
501                 <xsl:value-of select="glossterm"/>
502               </xsl:if>
503             </xsl:for-each>
504           </xsl:variable>
505
506           <xsl:if test="$exist.test != ''">
507             <xsl:apply-templates select="." mode="auto-glossary">
508               <xsl:with-param name="terms" select="$terms"/>
509             </xsl:apply-templates>
510           </xsl:if>
511         </xsl:for-each>
512       </xsl:when>
513       <xsl:otherwise>
514         <dl>
515           <xsl:choose>
516             <xsl:when test="$glossary.sort != 0">
517               <xsl:for-each select="$collection//glossentry">
518                                 <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'))"/>
519                 <xsl:variable name="cterm" select="glossterm"/>
520                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
521                   <xsl:apply-templates select="." mode="auto-glossary"/>
522                 </xsl:if>
523               </xsl:for-each>
524             </xsl:when>
525             <xsl:otherwise>
526               <xsl:for-each select="$collection//glossentry">
527                 <xsl:variable name="cterm" select="glossterm"/>
528                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
529                   <xsl:apply-templates select="." mode="auto-glossary"/>
530                 </xsl:if>
531               </xsl:for-each>
532             </xsl:otherwise>
533           </xsl:choose>
534         </dl>
535       </xsl:otherwise>
536     </xsl:choose>
537
538     <xsl:if test="not(parent::article)">
539       <xsl:call-template name="process.footnotes"/>
540     </xsl:if>
541   </div>
542 </xsl:template>
543
544 <xsl:template match="*" mode="auto-glossary">
545   <!-- pop back out to the default mode for most elements -->
546   <xsl:apply-templates select="."/>
547 </xsl:template>
548
549 <xsl:template match="glossdiv" mode="auto-glossary">
550   <xsl:param name="terms" select="."/>
551
552   
553 <xsl:variable name="language">
554   <xsl:call-template name="l10n.language"/>
555 </xsl:variable>
556
557 <xsl:variable name="lowercase">
558   <xsl:call-template name="gentext">
559     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
560   </xsl:call-template>
561 </xsl:variable>
562
563 <xsl:variable name="uppercase">
564   <xsl:call-template name="gentext">
565     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
566   </xsl:call-template>
567 </xsl:variable>
568
569
570   <div>
571     <xsl:apply-templates select="." mode="common.html.attributes"/>
572     <xsl:call-template name="id.attribute">
573       <xsl:with-param name="conditional" select="0"/>
574     </xsl:call-template>
575     <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
576
577     <dl>
578       <xsl:choose>
579         <xsl:when test="$glossary.sort != 0">
580           <xsl:for-each select="glossentry">
581                                 <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'))"/>
582             <xsl:variable name="cterm" select="glossterm"/>
583             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
584               <xsl:apply-templates select="." mode="auto-glossary"/>
585             </xsl:if>
586           </xsl:for-each>
587         </xsl:when>
588         <xsl:otherwise>
589           <xsl:for-each select="glossentry">
590             <xsl:variable name="cterm" select="glossterm"/>
591             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
592               <xsl:apply-templates select="." mode="auto-glossary"/>
593             </xsl:if>
594           </xsl:for-each>
595         </xsl:otherwise>
596       </xsl:choose>
597     </dl>
598   </div>
599 </xsl:template>
600
601 <!-- ==================================================================== -->
602
603 </xsl:stylesheet>