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:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xlink" version="1.0">
|
---|
2 |
|
---|
3 | <!-- ********************************************************************
|
---|
4 | $Id: glossary.xsl 9709 2013-01-22 18:56:09Z bobstayton $
|
---|
5 | ********************************************************************
|
---|
6 |
|
---|
7 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
8 | See ../README or http://docbook.sf.net/release/xsl/current/ for
|
---|
9 | copyright and other information.
|
---|
10 |
|
---|
11 | ******************************************************************** -->
|
---|
12 |
|
---|
13 | <!-- ==================================================================== -->
|
---|
14 |
|
---|
15 | <xsl:template match="glossary">
|
---|
16 |
|
---|
17 | <xsl:variable name="language">
|
---|
18 | <xsl:call-template name="l10n.language"/>
|
---|
19 | </xsl:variable>
|
---|
20 |
|
---|
21 | <xsl:variable name="lowercase">
|
---|
22 | <xsl:call-template name="gentext">
|
---|
23 | <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
|
---|
24 | </xsl:call-template>
|
---|
25 | </xsl:variable>
|
---|
26 |
|
---|
27 | <xsl:variable name="uppercase">
|
---|
28 | <xsl:call-template name="gentext">
|
---|
29 | <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
|
---|
30 | </xsl:call-template>
|
---|
31 | </xsl:variable>
|
---|
32 |
|
---|
33 | <xsl:call-template name="id.warning"/>
|
---|
34 |
|
---|
35 | <xsl:element name="{$div.element}" namespace="http://www.w3.org/1999/xhtml">
|
---|
36 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
37 | <xsl:call-template name="id.attribute">
|
---|
38 | <xsl:with-param name="conditional" select="0"/>
|
---|
39 | </xsl:call-template>
|
---|
40 |
|
---|
41 | <xsl:call-template name="glossary.titlepage"/>
|
---|
42 |
|
---|
43 | <xsl:choose>
|
---|
44 | <xsl:when test="glossdiv">
|
---|
45 | <xsl:apply-templates select="(glossdiv[1]/preceding-sibling::*)"/>
|
---|
46 | </xsl:when>
|
---|
47 | <xsl:when test="glossentry">
|
---|
48 | <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
|
---|
49 | </xsl:when>
|
---|
50 | <xsl:otherwise>
|
---|
51 | <xsl:apply-templates/>
|
---|
52 | </xsl:otherwise>
|
---|
53 | </xsl:choose>
|
---|
54 |
|
---|
55 | <xsl:choose>
|
---|
56 | <xsl:when test="glossdiv">
|
---|
57 | <xsl:apply-templates select="glossdiv"/>
|
---|
58 | </xsl:when>
|
---|
59 | <xsl:when test="glossentry">
|
---|
60 | <dl>
|
---|
61 | <xsl:choose>
|
---|
62 | <xsl:when test="$glossary.sort != 0">
|
---|
63 | <xsl:apply-templates select="glossentry">
|
---|
64 | <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
|
---|
65 | </xsl:apply-templates>
|
---|
66 | </xsl:when>
|
---|
67 | <xsl:otherwise>
|
---|
68 | <xsl:apply-templates select="glossentry"/>
|
---|
69 | </xsl:otherwise>
|
---|
70 | </xsl:choose>
|
---|
71 | </dl>
|
---|
72 | </xsl:when>
|
---|
73 | <xsl:otherwise>
|
---|
74 | <!-- empty glossary -->
|
---|
75 | </xsl:otherwise>
|
---|
76 | </xsl:choose>
|
---|
77 |
|
---|
78 | <xsl:if test="not(parent::article)">
|
---|
79 | <xsl:call-template name="process.footnotes"/>
|
---|
80 | </xsl:if>
|
---|
81 | </xsl:element>
|
---|
82 | </xsl:template>
|
---|
83 |
|
---|
84 | <xsl:template match="glossary/glossaryinfo"/>
|
---|
85 | <xsl:template match="glossary/info"/>
|
---|
86 | <xsl:template match="glossary/title"/>
|
---|
87 | <xsl:template match="glossary/subtitle"/>
|
---|
88 | <xsl:template match="glossary/titleabbrev"/>
|
---|
89 |
|
---|
90 | <!-- ==================================================================== -->
|
---|
91 |
|
---|
92 | <xsl:template match="glosslist">
|
---|
93 |
|
---|
94 | <xsl:variable name="language">
|
---|
95 | <xsl:call-template name="l10n.language"/>
|
---|
96 | </xsl:variable>
|
---|
97 |
|
---|
98 | <xsl:variable name="lowercase">
|
---|
99 | <xsl:call-template name="gentext">
|
---|
100 | <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
|
---|
101 | </xsl:call-template>
|
---|
102 | </xsl:variable>
|
---|
103 |
|
---|
104 | <xsl:variable name="uppercase">
|
---|
105 | <xsl:call-template name="gentext">
|
---|
106 | <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
|
---|
107 | </xsl:call-template>
|
---|
108 | </xsl:variable>
|
---|
109 |
|
---|
110 | <div>
|
---|
111 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
112 | <xsl:call-template name="id.attribute"/>
|
---|
113 | <xsl:call-template name="anchor"/>
|
---|
114 | <xsl:if test="blockinfo/title|info/title|title">
|
---|
115 | <xsl:call-template name="formal.object.heading"/>
|
---|
116 | </xsl:if>
|
---|
117 | <dl>
|
---|
118 | <xsl:choose>
|
---|
119 | <xsl:when test="$glossary.sort != 0">
|
---|
120 | <xsl:apply-templates select="glossentry">
|
---|
121 | <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
|
---|
122 | </xsl:apply-templates>
|
---|
123 | </xsl:when>
|
---|
124 | <xsl:otherwise>
|
---|
125 | <xsl:apply-templates select="glossentry"/>
|
---|
126 | </xsl:otherwise>
|
---|
127 | </xsl:choose>
|
---|
128 | </dl>
|
---|
129 | </div>
|
---|
130 | </xsl:template>
|
---|
131 |
|
---|
132 | <!-- ==================================================================== -->
|
---|
133 |
|
---|
134 | <xsl:template match="glossdiv">
|
---|
135 |
|
---|
136 | <xsl:variable name="language">
|
---|
137 | <xsl:call-template name="l10n.language"/>
|
---|
138 | </xsl:variable>
|
---|
139 |
|
---|
140 | <xsl:variable name="lowercase">
|
---|
141 | <xsl:call-template name="gentext">
|
---|
142 | <xsl:with-param name="key">normalize.sort.input</xsl:with-param>
|
---|
143 | </xsl:call-template>
|
---|
144 | </xsl:variable>
|
---|
145 |
|
---|
146 | <xsl:variable name="uppercase">
|
---|
147 | <xsl:call-template name="gentext">
|
---|
148 | <xsl:with-param name="key">normalize.sort.output</xsl:with-param>
|
---|
149 | </xsl:call-template>
|
---|
150 | </xsl:variable>
|
---|
151 |
|
---|
152 | <xsl:call-template name="id.warning"/>
|
---|
153 |
|
---|
154 | <div>
|
---|
155 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
156 | <xsl:call-template name="id.attribute">
|
---|
157 | <xsl:with-param name="conditional" select="0"/>
|
---|
158 | </xsl:call-template>
|
---|
159 | <xsl:apply-templates select="(glossentry[1]/preceding-sibling::*)"/>
|
---|
160 |
|
---|
161 | <dl>
|
---|
162 | <xsl:choose>
|
---|
163 | <xsl:when test="$glossary.sort != 0">
|
---|
164 | <xsl:apply-templates select="glossentry">
|
---|
165 | <xsl:sort lang="{$language}" select="translate(glossterm, $lowercase, $uppercase)"/>
|
---|
166 | </xsl:apply-templates>
|
---|
167 | </xsl:when>
|
---|
168 | <xsl:otherwise>
|
---|
169 | <xsl:apply-templates select="glossentry"/>
|
---|
170 | </xsl:otherwise>
|
---|
171 | </xsl:choose>
|
---|
172 | </dl>
|
---|
173 | </div>
|
---|
174 | </xsl:template>
|
---|
175 |
|
---|
176 | <xsl:template match="glossdiv/title">
|
---|
177 | <h3>
|
---|
178 | <xsl:apply-templates select="." mode="common.html.attributes"/>
|
---|
179 | <xsl:apply-templates/>
|
---|
180 | </h3>
|
---|
181 | </xsl:template>
|
---|
182 |
|
---|
183 | <!-- ==================================================================== -->
|
---|
184 |
|
---|
185 | <!--
|
---|
186 | GlossEntry ::=
|
---|
187 | GlossTerm, Acronym?, Abbrev?,
|
---|
188 | (IndexTerm)*,
|
---|
189 | RevHistory?,
|
---|
190 | (GlossSee | GlossDef+)
|
---|
191 | -->
|
---|
192 |
|
---|
193 | <xsl:template match="glossentry">
|
---|
194 | <xsl:choose>
|
---|
195 | <xsl:when test="$glossentry.show.acronym = 'primary'">
|
---|
196 | <dt>
|
---|
197 | <xsl:call-template name="id.attribute">
|
---|
198 | <xsl:with-param name="conditional">
|
---|
199 | <xsl:choose>
|
---|
200 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
201 | <xsl:otherwise>1</xsl:otherwise>
|
---|
202 | </xsl:choose>
|
---|
203 | </xsl:with-param>
|
---|
204 | </xsl:call-template>
|
---|
205 | <xsl:call-template name="anchor">
|
---|
206 | <xsl:with-param name="conditional">
|
---|
207 | <xsl:choose>
|
---|
208 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
209 | <xsl:otherwise>1</xsl:otherwise>
|
---|
210 | </xsl:choose>
|
---|
211 | </xsl:with-param>
|
---|
212 | </xsl:call-template>
|
---|
213 |
|
---|
214 | <xsl:choose>
|
---|
215 | <xsl:when test="acronym|abbrev">
|
---|
216 | <xsl:apply-templates select="acronym|abbrev"/>
|
---|
217 | <xsl:text> (</xsl:text>
|
---|
218 | <xsl:apply-templates select="glossterm"/>
|
---|
219 | <xsl:text>)</xsl:text>
|
---|
220 | </xsl:when>
|
---|
221 | <xsl:otherwise>
|
---|
222 | <xsl:apply-templates select="glossterm"/>
|
---|
223 | </xsl:otherwise>
|
---|
224 | </xsl:choose>
|
---|
225 | </dt>
|
---|
226 | </xsl:when>
|
---|
227 | <xsl:when test="$glossentry.show.acronym = 'yes'">
|
---|
228 | <dt>
|
---|
229 | <xsl:call-template name="id.attribute">
|
---|
230 | <xsl:with-param name="conditional">
|
---|
231 | <xsl:choose>
|
---|
232 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
233 | <xsl:otherwise>1</xsl:otherwise>
|
---|
234 | </xsl:choose>
|
---|
235 | </xsl:with-param>
|
---|
236 | </xsl:call-template>
|
---|
237 | <xsl:call-template name="anchor">
|
---|
238 | <xsl:with-param name="conditional">
|
---|
239 | <xsl:choose>
|
---|
240 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
241 | <xsl:otherwise>1</xsl:otherwise>
|
---|
242 | </xsl:choose>
|
---|
243 | </xsl:with-param>
|
---|
244 | </xsl:call-template>
|
---|
245 |
|
---|
246 | <xsl:apply-templates select="glossterm"/>
|
---|
247 |
|
---|
248 | <xsl:if test="acronym|abbrev">
|
---|
249 | <xsl:text> (</xsl:text>
|
---|
250 | <xsl:apply-templates select="acronym|abbrev"/>
|
---|
251 | <xsl:text>)</xsl:text>
|
---|
252 | </xsl:if>
|
---|
253 | </dt>
|
---|
254 | </xsl:when>
|
---|
255 | <xsl:otherwise>
|
---|
256 | <dt>
|
---|
257 | <xsl:call-template name="id.attribute">
|
---|
258 | <xsl:with-param name="conditional">
|
---|
259 | <xsl:choose>
|
---|
260 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
261 | <xsl:otherwise>1</xsl:otherwise>
|
---|
262 | </xsl:choose>
|
---|
263 | </xsl:with-param>
|
---|
264 | </xsl:call-template>
|
---|
265 | <xsl:call-template name="anchor">
|
---|
266 | <xsl:with-param name="conditional">
|
---|
267 | <xsl:choose>
|
---|
268 | <xsl:when test="$glossterm.auto.link != 0">0</xsl:when>
|
---|
269 | <xsl:otherwise>1</xsl:otherwise>
|
---|
270 | </xsl:choose>
|
---|
271 | </xsl:with-param>
|
---|
272 | </xsl:call-template>
|
---|
273 |
|
---|
274 | <xsl:apply-templates select="glossterm"/>
|
---|
275 | </dt>
|
---|
276 | </xsl:otherwise>
|
---|
277 | </xsl:choose>
|
---|
278 |
|
---|
279 | <xsl:apply-templates select="indexterm|revhistory|glosssee|glossdef"/>
|
---|
280 | </xsl:template>
|
---|
281 |
|
---|
282 | <xsl:template match="glossentry/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::glossterm">, </xsl:if>
|
---|
290 | </xsl:template>
|
---|
291 |
|
---|
292 | <xsl:template match="glossentry/acronym">
|
---|
293 | <xsl:apply-templates/>
|
---|
294 | <xsl:if test="following-sibling::acronym|following-sibling::abbrev">, </xsl:if>
|
---|
295 | </xsl:template>
|
---|
296 |
|
---|
297 | <xsl:template match="glossentry/abbrev">
|
---|
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/revhistory">
|
---|
303 | </xsl:template>
|
---|
304 |
|
---|
305 | <xsl:template match="glossentry/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="glossentry/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="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="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="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="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="//glossterm[not(parent::glossdef)]|//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="glossdiv and $collection//glossdiv">
|
---|
490 | <xsl:for-each select="$collection//glossdiv">
|
---|
491 | <!-- first see if there are any in this div -->
|
---|
492 | <xsl:variable name="exist.test">
|
---|
493 | <xsl:for-each select="glossentry">
|
---|
494 | <xsl:variable name="cterm" select="glossterm"/>
|
---|
495 | <xsl:if test="$terms[@baseform = $cterm or . = $cterm]">
|
---|
496 | <xsl:value-of select="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//glossentry">
|
---|
513 | <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
|
---|
514 | <xsl:variable name="cterm" select="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//glossentry">
|
---|
522 | <xsl:variable name="cterm" select="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::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="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="(glossentry[1]/preceding-sibling::*)"/>
|
---|
571 |
|
---|
572 | <dl>
|
---|
573 | <xsl:choose>
|
---|
574 | <xsl:when test="$glossary.sort != 0">
|
---|
575 | <xsl:for-each select="glossentry">
|
---|
576 | <xsl:sort lang="{$language}" select="normalize-space(translate(concat(@sortas, glossterm[not(parent::glossentry/@sortas) or parent::glossentry/@sortas = '']), 'AaÀàÁáÂâÃãÄäÅåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧḀḁẚẠạẢảẤấẦầẨẩẪẫẬậẮắẰằẲẳẴẵẶặBbƀƁɓƂƃḂḃḄḅḆḇCcÇçĆćĈĉĊċČčƇƈɕḈḉDdĎďĐđƊɗƋƌDžDzȡɖḊḋḌḍḎḏḐḑḒḓEeÈèÉéÊêËëĒēĔĕĖėĘęĚěȄȅȆȇȨȩḔḕḖḗḘḙḚḛḜḝẸẹẺẻẼẽẾếỀềỂểỄễỆệFfƑƒḞḟGgĜĝĞğĠġĢģƓɠǤǥǦǧǴǵḠḡHhĤĥĦħȞȟɦḢḣḤḥḦḧḨḩḪḫẖIiÌìÍíÎîÏïĨĩĪīĬĭĮįİƗɨǏǐȈȉȊȋḬḭḮḯỈỉỊịJjĴĵǰʝKkĶķƘƙǨǩḰḱḲḳḴḵLlĹĺĻļĽľĿŀŁłƚLjȴɫɬɭḶḷḸḹḺḻḼḽMmɱḾḿṀṁṂṃNnÑñŃńŅņŇňƝɲƞȠNjǸǹȵɳṄṅṆṇṈṉṊṋOoÒòÓóÔôÕõÖöØøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱṌṍṎṏṐṑṒṓỌọỎỏỐốỒồỔổỖỗỘộỚớỜờỞởỠỡỢợPpƤƥṔṕṖṗQqʠRrŔŕŖŗŘřȐȑȒȓɼɽɾṘṙṚṛṜṝṞṟSsŚśŜŝŞşŠšȘșʂṠṡṢṣṤṥṦṧṨṩTtŢţŤťŦŧƫƬƭƮʈȚțȶṪṫṬṭṮṯṰṱẗUuÙùÚúÛûÜüŨũŪūŬŭŮůŰűŲųƯưǓǔǕǖǗǘǙǚǛǜȔȕȖȗṲṳṴṵṶṷṸṹṺṻỤụỦủỨứỪừỬửỮữỰựVvƲʋṼṽṾṿWwŴŵẀẁẂẃẄẅẆẇẈẉẘXxẊẋẌẍYyÝýÿŸŶŷƳƴȲȳẎẏẙỲỳỴỵỶỷỸỹZzŹźŻżŽžƵƶȤȥʐʑẐẑẒẓẔẕẕ', 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJKKKKKKKKKKKKKKLLLLLLLLLLLLLLLLLLLLLLLLLLMMMMMMMMMNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPPPPPPPQQQRRRRRRRRRRRRRRRRRRRRRRRSSSSSSSSSSSSSSSSSSSSSSSTTTTTTTTTTTTTTTTTTTTTTTTTUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVVVVWWWWWWWWWWWWWWWXXXXXXYYYYYYYYYYYYYYYYYYYYYYYZZZZZZZZZZZZZZZZZZZZZ'))"/>
|
---|
577 | <xsl:variable name="cterm" select="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="glossentry">
|
---|
585 | <xsl:variable name="cterm" select="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> |
---|