]> git.lyx.org Git - lyx.git/blob - lib/docbook/xhtml/glossary.xsl
Release notes
[lyx.git] / lib / docbook / xhtml / glossary.xsl
1 <?xml version="1.0" encoding="ASCII"?><!--This file was created automatically by html2xhtml--><!--from the HTML stylesheets.--><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:d="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink d" version="1.0">
2
3 <!-- ********************************************************************
4
5      This file is part of the XSL DocBook Stylesheet distribution.
6      See ../README or http://cdn.docbook.org/release/xsl/current/ for
7      copyright and other information.
8
9      ******************************************************************** -->
10
11 <!-- ==================================================================== -->
12
13 <xsl:template match="d:glossary">
14   
15 <xsl:variable name="language">
16   <xsl:call-template name="l10n.language"/>
17 </xsl:variable>
18
19 <xsl:variable name="lowercase">
20   <xsl:call-template name="gentext">
21     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
22   </xsl:call-template>
23 </xsl:variable>
24
25 <xsl:variable name="uppercase">
26   <xsl:call-template name="gentext">
27     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
28   </xsl:call-template>
29 </xsl:variable>
30
31   <xsl:call-template name="id.warning"/>
32
33   <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
34     <xsl:apply-templates select="." mode="common.html.attributes"/>
35     <xsl:call-template name="id.attribute">
36       <xsl:with-param name="conditional" select="0"/>
37     </xsl:call-template>
38
39     <xsl:call-template name="glossary.titlepage"/>
40
41     <xsl:choose>
42       <xsl:when test="d:glossdiv">
43         <xsl:apply-templates select="(d:glossdiv[1]/preceding-sibling::*)"/>
44       </xsl:when>
45       <xsl:when test="d:glossentry">
46         <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
47       </xsl:when>
48       <xsl:otherwise>
49         <xsl:apply-templates/>
50       </xsl:otherwise>
51     </xsl:choose>
52
53     <xsl:choose>
54       <xsl:when test="d:glossdiv">
55         <xsl:apply-templates select="d:glossdiv"/>
56       </xsl:when>
57       <xsl:when test="d:glossentry">
58         <dl>
59           <xsl:choose>
60             <xsl:when test="$glossary.sort != 0">
61               <xsl:apply-templates select="d:glossentry">
62                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'Aa&#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'))"/>
63               </xsl:apply-templates>
64             </xsl:when>
65             <xsl:otherwise>
66               <xsl:apply-templates select="d:glossentry"/>
67             </xsl:otherwise>
68           </xsl:choose>
69         </dl>
70       </xsl:when>
71       <xsl:otherwise>
72         <!-- empty glossary -->
73       </xsl:otherwise>
74     </xsl:choose>
75
76     <xsl:if test="not(parent::d:article)">
77       <xsl:call-template name="process.footnotes"/>
78     </xsl:if>
79   </xsl:element>
80 </xsl:template>
81
82 <xsl:template match="d:glossary/d:glossaryinfo"/>
83 <xsl:template match="d:glossary/d:info"/>
84 <xsl:template match="d:glossary/d:title"/>
85 <xsl:template match="d:glossary/d:subtitle"/>
86 <xsl:template match="d:glossary/d:titleabbrev"/>
87
88 <!-- ==================================================================== -->
89
90 <xsl:template match="d:glosslist">
91   
92 <xsl:variable name="language">
93   <xsl:call-template name="l10n.language"/>
94 </xsl:variable>
95
96 <xsl:variable name="lowercase">
97   <xsl:call-template name="gentext">
98     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
99   </xsl:call-template>
100 </xsl:variable>
101
102 <xsl:variable name="uppercase">
103   <xsl:call-template name="gentext">
104     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
105   </xsl:call-template>
106 </xsl:variable>
107
108   <div>
109     <xsl:apply-templates select="." mode="common.html.attributes"/>
110     <xsl:call-template name="id.attribute"/>
111     <xsl:call-template name="anchor"/>
112     <xsl:if test="d:blockinfo/d:title|d:info/d:title|d:title">
113       <xsl:call-template name="formal.object.heading"/>
114     </xsl:if>
115     <dl>
116       <xsl:choose>
117         <xsl:when test="$glossary.sort != 0">
118           <xsl:apply-templates select="d:glossentry">
119                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'Aa&#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'))"/>
120           </xsl:apply-templates>
121         </xsl:when>
122         <xsl:otherwise>
123           <xsl:apply-templates select="d:glossentry"/>
124         </xsl:otherwise>
125       </xsl:choose>
126     </dl>
127   </div>
128 </xsl:template>
129
130 <!-- ==================================================================== -->
131
132 <xsl:template match="d:glossdiv">
133   
134 <xsl:variable name="language">
135   <xsl:call-template name="l10n.language"/>
136 </xsl:variable>
137
138 <xsl:variable name="lowercase">
139   <xsl:call-template name="gentext">
140     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
141   </xsl:call-template>
142 </xsl:variable>
143
144 <xsl:variable name="uppercase">
145   <xsl:call-template name="gentext">
146     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
147   </xsl:call-template>
148 </xsl:variable>
149
150   <xsl:call-template name="id.warning"/>
151
152   <div>
153     <xsl:apply-templates select="." mode="common.html.attributes"/>
154     <xsl:call-template name="id.attribute">
155       <xsl:with-param name="conditional" select="0"/>
156     </xsl:call-template>
157     <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
158
159     <dl>
160       <xsl:choose>
161         <xsl:when test="$glossary.sort != 0">
162           <xsl:apply-templates select="d:glossentry">
163             <xsl:sort lang="{$language}" select="translate(d:glossterm, $lowercase,                                         $uppercase)"/>
164           </xsl:apply-templates>
165         </xsl:when>
166         <xsl:otherwise>
167           <xsl:apply-templates select="d:glossentry"/>
168         </xsl:otherwise>
169       </xsl:choose>
170     </dl>
171   </div>
172 </xsl:template>
173
174 <xsl:template match="d:glossdiv/d:title">
175   <h3>
176     <xsl:apply-templates select="." mode="common.html.attributes"/>
177     <xsl:apply-templates/>
178   </h3>
179 </xsl:template>
180
181 <!-- ==================================================================== -->
182
183 <!--
184 GlossEntry ::=
185   GlossTerm, Acronym?, Abbrev?,
186   (IndexTerm)*,
187   RevHistory?,
188   (GlossSee | GlossDef+)
189 -->
190
191 <xsl:template match="d:glossentry">
192   <xsl:choose>
193     <xsl:when test="$glossentry.show.acronym = 'primary'">
194       <dt>
195         <xsl:call-template name="id.attribute">
196           <xsl:with-param name="conditional">
197             <xsl:choose>
198               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
199               <xsl:otherwise>1</xsl:otherwise>
200             </xsl:choose>
201           </xsl:with-param>
202         </xsl:call-template>
203         <xsl:call-template name="anchor">
204           <xsl:with-param name="conditional">
205             <xsl:choose>
206               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
207               <xsl:otherwise>1</xsl:otherwise>
208             </xsl:choose>
209           </xsl:with-param>
210         </xsl:call-template>
211
212         <xsl:choose>
213           <xsl:when test="d:acronym|d:abbrev">
214             <xsl:apply-templates select="d:acronym|d:abbrev"/>
215             <xsl:text> (</xsl:text>
216             <xsl:apply-templates select="d:glossterm"/>
217             <xsl:text>)</xsl:text>
218           </xsl:when>
219           <xsl:otherwise>
220             <xsl:apply-templates select="d:glossterm"/>
221           </xsl:otherwise>
222         </xsl:choose>
223       </dt>
224     </xsl:when>
225     <xsl:when test="$glossentry.show.acronym = 'yes'">
226       <dt>
227         <xsl:call-template name="id.attribute">
228           <xsl:with-param name="conditional">
229             <xsl:choose>
230               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
231               <xsl:otherwise>1</xsl:otherwise>
232             </xsl:choose>
233           </xsl:with-param>
234         </xsl:call-template>
235         <xsl:call-template name="anchor">
236           <xsl:with-param name="conditional">
237             <xsl:choose>
238               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
239               <xsl:otherwise>1</xsl:otherwise>
240             </xsl:choose>
241           </xsl:with-param>
242         </xsl:call-template>
243
244         <xsl:apply-templates select="d:glossterm"/>
245
246         <xsl:if test="d:acronym|d:abbrev">
247           <xsl:text> (</xsl:text>
248           <xsl:apply-templates select="d:acronym|d:abbrev"/>
249           <xsl:text>)</xsl:text>
250         </xsl:if>
251         <xsl:apply-templates select="d:indexterm"/>
252       </dt>
253     </xsl:when>
254     <xsl:otherwise>
255       <dt>
256         <xsl:call-template name="id.attribute">
257           <xsl:with-param name="conditional">
258             <xsl:choose>
259               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
260               <xsl:otherwise>1</xsl:otherwise>
261             </xsl:choose>
262           </xsl:with-param>
263         </xsl:call-template>
264         <xsl:call-template name="anchor">
265           <xsl:with-param name="conditional">
266             <xsl:choose>
267               <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
268               <xsl:otherwise>1</xsl:otherwise>
269             </xsl:choose>
270           </xsl:with-param>
271         </xsl:call-template>
272
273         <xsl:apply-templates select="d:glossterm"/>
274         <xsl:apply-templates select="d:indexterm"/>
275       </dt>
276     </xsl:otherwise>
277   </xsl:choose>
278
279   <xsl:apply-templates select="d:glosssee|d:glossdef"/>
280 </xsl:template>
281
282 <xsl:template match="d:glossentry/d:glossterm">
283   <span>
284     <xsl:apply-templates select="." mode="common.html.attributes"/>
285     <xsl:call-template name="id.attribute"/>
286     <xsl:call-template name="anchor"/>
287     <xsl:apply-templates/>
288   </span>
289   <xsl:if test="following-sibling::d:glossterm">, </xsl:if>
290 </xsl:template>
291
292 <xsl:template match="d:glossentry/d:acronym">
293   <xsl:apply-templates/>
294   <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
295 </xsl:template>
296
297 <xsl:template match="d:glossentry/d:abbrev">
298   <xsl:apply-templates/>
299   <xsl:if test="following-sibling::d:acronym|following-sibling::d:abbrev">, </xsl:if>
300 </xsl:template>
301
302 <xsl:template match="d:glossentry/d:revhistory">
303 </xsl:template>
304
305 <xsl:template match="d:glossentry/d:glosssee">
306   <xsl:variable name="otherterm" select="@otherterm"/>
307   <xsl:variable name="targets" select="key('id', $otherterm)"/>
308   <xsl:variable name="target" select="$targets[1]"/>
309   <xsl:variable name="xlink" select="@xlink:href"/>
310
311   <dd>
312     <p>
313       <xsl:variable name="template">
314         <xsl:call-template name="gentext.template">
315           <xsl:with-param name="context" select="'glossary'"/>
316           <xsl:with-param name="name" select="'see'"/>
317         </xsl:call-template>
318       </xsl:variable>
319
320       <xsl:variable name="title">
321         <xsl:choose>
322           <xsl:when test="$target">
323             <a>
324               <xsl:apply-templates select="." mode="common.html.attributes"/>
325               <xsl:call-template name="id.attribute"/>
326               <xsl:attribute name="href">
327                 <xsl:call-template name="href.target">
328                   <xsl:with-param name="object" select="$target"/>
329                 </xsl:call-template>
330               </xsl:attribute>
331               <xsl:apply-templates select="$target" mode="xref-to"/>
332             </a>
333           </xsl:when>
334           <xsl:when test="$xlink">
335             <xsl:call-template name="simple.xlink">
336               <xsl:with-param name="content">
337                 <xsl:apply-templates/>
338               </xsl:with-param>
339             </xsl:call-template>
340           </xsl:when>
341           <xsl:when test="$otherterm != '' and not($target)">
342             <xsl:message>
343               <xsl:text>Warning: glosssee @otherterm reference not found: </xsl:text>
344               <xsl:value-of select="$otherterm"/>
345             </xsl:message>
346             <xsl:apply-templates/>
347           </xsl:when>
348           <xsl:otherwise>
349             <xsl:apply-templates/>
350           </xsl:otherwise>
351         </xsl:choose>
352       </xsl:variable>
353
354       <xsl:call-template name="substitute-markup">
355         <xsl:with-param name="template" select="$template"/>
356         <xsl:with-param name="title" select="$title"/>
357       </xsl:call-template>
358     </p>
359   </dd>
360 </xsl:template>
361
362 <xsl:template match="d:glossentry/d:glossdef">
363   <dd>
364     <xsl:apply-templates select="." mode="common.html.attributes"/>
365     <xsl:call-template name="id.attribute"/>
366     <xsl:call-template name="anchor"/>
367     <xsl:apply-templates select="*[local-name(.) != 'glossseealso']"/>
368     <xsl:if test="d:glossseealso">
369       <p>
370         <xsl:variable name="template">
371           <xsl:call-template name="gentext.template">
372             <xsl:with-param name="context" select="'glossary'"/>
373             <xsl:with-param name="name" select="'seealso'"/>
374           </xsl:call-template>
375         </xsl:variable>
376         <xsl:variable name="title">
377           <xsl:apply-templates select="d:glossseealso"/>
378         </xsl:variable>
379         <xsl:call-template name="substitute-markup">
380           <xsl:with-param name="template" select="$template"/>
381           <xsl:with-param name="title" select="$title"/>
382         </xsl:call-template>
383       </p>
384     </xsl:if>
385   </dd>
386 </xsl:template>
387
388 <xsl:template match="d:glossseealso">
389   <xsl:variable name="otherterm" select="@otherterm"/>
390   <xsl:variable name="targets" select="key('id', $otherterm)"/>
391   <xsl:variable name="target" select="$targets[1]"/>
392   <xsl:variable name="xlink" select="@xlink:href"/>
393
394   <xsl:choose>
395     <xsl:when test="$target">
396       <a>
397         <xsl:apply-templates select="." mode="common.html.attributes"/>
398         <xsl:call-template name="id.attribute"/>
399         <xsl:attribute name="href">
400           <xsl:call-template name="href.target">
401             <xsl:with-param name="object" select="$target"/>
402           </xsl:call-template>
403         </xsl:attribute>
404         <xsl:apply-templates select="$target" mode="xref-to"/>
405       </a>
406     </xsl:when>
407     <xsl:when test="$xlink">
408       <xsl:call-template name="simple.xlink">
409         <xsl:with-param name="content">
410           <xsl:apply-templates/>
411         </xsl:with-param>
412       </xsl:call-template>
413     </xsl:when>
414     <xsl:when test="$otherterm != '' and not($target)">
415       <xsl:message>
416         <xsl:text>Warning: glossseealso @otherterm reference not found: </xsl:text>
417         <xsl:value-of select="$otherterm"/>
418       </xsl:message>
419       <xsl:apply-templates/>
420     </xsl:when>
421     <xsl:otherwise>
422       <xsl:apply-templates/>
423     </xsl:otherwise>
424   </xsl:choose>
425
426   <xsl:choose>
427     <xsl:when test="position() = last()"/>
428     <xsl:otherwise>
429                 <xsl:call-template name="gentext.template">
430                   <xsl:with-param name="context" select="'glossary'"/>
431                   <xsl:with-param name="name" select="'seealso-separator'"/>
432                 </xsl:call-template>
433     </xsl:otherwise>
434   </xsl:choose>
435 </xsl:template>
436
437 <!-- ==================================================================== -->
438
439 <!-- Glossary collection -->
440
441 <xsl:template match="d:glossary[@role='auto']" priority="2">
442   
443 <xsl:variable name="language">
444   <xsl:call-template name="l10n.language"/>
445 </xsl:variable>
446
447 <xsl:variable name="lowercase">
448   <xsl:call-template name="gentext">
449     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
450   </xsl:call-template>
451 </xsl:variable>
452
453 <xsl:variable name="uppercase">
454   <xsl:call-template name="gentext">
455     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
456   </xsl:call-template>
457 </xsl:variable>
458
459   <xsl:variable name="terms" select="//d:glossterm[not(parent::d:glossdef)]|//d:firstterm"/>
460   <xsl:variable name="collection" select="document($glossary.collection, .)"/>
461
462   <xsl:call-template name="id.warning"/>
463
464   <xsl:if test="$glossary.collection = ''">
465     <xsl:message>
466       <xsl:text>Warning: processing automatic glossary </xsl:text>
467       <xsl:text>without a glossary.collection file.</xsl:text>
468     </xsl:message>
469   </xsl:if>
470
471   <xsl:if test="not($collection) and $glossary.collection != ''">
472     <xsl:message>
473       <xsl:text>Warning: processing automatic glossary but unable to </xsl:text>
474       <xsl:text>open glossary.collection file '</xsl:text>
475       <xsl:value-of select="$glossary.collection"/>
476       <xsl:text>'</xsl:text>
477     </xsl:message>
478   </xsl:if>
479
480   <div>
481     <xsl:apply-templates select="." mode="common.html.attributes"/>
482     <xsl:call-template name="id.attribute">
483       <xsl:with-param name="conditional" select="0"/>
484     </xsl:call-template>
485
486     <xsl:call-template name="glossary.titlepage"/>
487
488     <xsl:choose>
489       <xsl:when test="d:glossdiv and $collection//d:glossdiv">
490         <xsl:for-each select="$collection//d:glossdiv">
491           <!-- first see if there are any in this div -->
492           <xsl:variable name="exist.test">
493             <xsl:for-each select="d:glossentry">
494               <xsl:variable name="cterm" select="d:glossterm"/>
495               <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
496                 <xsl:value-of select="d:glossterm"/>
497               </xsl:if>
498             </xsl:for-each>
499           </xsl:variable>
500
501           <xsl:if test="$exist.test != ''">
502             <xsl:apply-templates select="." mode="auto-glossary">
503               <xsl:with-param name="terms" select="$terms"/>
504             </xsl:apply-templates>
505           </xsl:if>
506         </xsl:for-each>
507       </xsl:when>
508       <xsl:otherwise>
509         <dl>
510           <xsl:choose>
511             <xsl:when test="$glossary.sort != 0">
512               <xsl:for-each select="$collection//d:glossentry">
513                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'Aa&#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'))"/>
514                 <xsl:variable name="cterm" select="d:glossterm"/>
515                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
516                   <xsl:apply-templates select="." mode="auto-glossary"/>
517                 </xsl:if>
518               </xsl:for-each>
519             </xsl:when>
520             <xsl:otherwise>
521               <xsl:for-each select="$collection//d:glossentry">
522                 <xsl:variable name="cterm" select="d:glossterm"/>
523                 <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
524                   <xsl:apply-templates select="." mode="auto-glossary"/>
525                 </xsl:if>
526               </xsl:for-each>
527             </xsl:otherwise>
528           </xsl:choose>
529         </dl>
530       </xsl:otherwise>
531     </xsl:choose>
532
533     <xsl:if test="not(parent::d:article)">
534       <xsl:call-template name="process.footnotes"/>
535     </xsl:if>
536   </div>
537 </xsl:template>
538
539 <xsl:template match="*" mode="auto-glossary">
540   <!-- pop back out to the default mode for most elements -->
541   <xsl:apply-templates select="."/>
542 </xsl:template>
543
544 <xsl:template match="d:glossdiv" mode="auto-glossary">
545   <xsl:param name="terms" select="."/>
546
547   
548 <xsl:variable name="language">
549   <xsl:call-template name="l10n.language"/>
550 </xsl:variable>
551
552 <xsl:variable name="lowercase">
553   <xsl:call-template name="gentext">
554     <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
555   </xsl:call-template>
556 </xsl:variable>
557
558 <xsl:variable name="uppercase">
559   <xsl:call-template name="gentext">
560     <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
561   </xsl:call-template>
562 </xsl:variable>
563
564
565   <div>
566     <xsl:apply-templates select="." mode="common.html.attributes"/>
567     <xsl:call-template name="id.attribute">
568       <xsl:with-param name="conditional" select="0"/>
569     </xsl:call-template>
570     <xsl:apply-templates select="(d:glossentry[1]/preceding-sibling::*)"/>
571
572     <dl>
573       <xsl:choose>
574         <xsl:when test="$glossary.sort != 0">
575           <xsl:for-each select="d:glossentry">
576                                 <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, d:glossterm[not(parent::d:glossentry/@sortas) or parent::d:glossentry/@sortas = '']), 'Aa&#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'))"/>
577             <xsl:variable name="cterm" select="d:glossterm"/>
578             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
579               <xsl:apply-templates select="." mode="auto-glossary"/>
580             </xsl:if>
581           </xsl:for-each>
582         </xsl:when>
583         <xsl:otherwise>
584           <xsl:for-each select="d:glossentry">
585             <xsl:variable name="cterm" select="d:glossterm"/>
586             <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
587               <xsl:apply-templates select="." mode="auto-glossary"/>
588             </xsl:if>
589           </xsl:for-each>
590         </xsl:otherwise>
591       </xsl:choose>
592     </dl>
593   </div>
594 </xsl:template>
595
596 <!-- ==================================================================== -->
597
598 </xsl:stylesheet>