2 <!DOCTYPE xsl:stylesheet [
3 <!ENTITY % common.entities SYSTEM
"../common/entities.ent">
6 <xsl:stylesheet xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
7 xmlns:
exslt=
"http://exslt.org/common"
8 extension-element-prefixes=
"exslt"
9 exclude-result-prefixes=
"exslt"
12 <!-- ********************************************************************
13 $Id: autoidx.xsl,v 1.1 2007/03/10 05:15:13 scott Exp $
14 ********************************************************************
16 This file is part of the XSL DocBook Stylesheet distribution.
17 See ../README or http://nwalsh.com/docbook/xsl/ for copyright
18 and other information.
20 ******************************************************************** -->
22 <!-- ==================================================================== -->
23 <!-- The "basic" method derived from Jeni Tennison's work. -->
24 <!-- The "kosek" method contributed by Jirka Kosek. -->
25 <!-- The "kimber" method contributed by Eliot Kimber of Innodata Isogen. -->
27 <xsl:variable name=
"kimber.imported" select=
"0"/>
28 <xsl:variable name=
"kosek.imported" select=
"0"/>
30 <xsl:key name=
"letter"
32 use=
"translate(substring(&primary;, 1, 1),&lowercase;,&uppercase;)"/>
34 <xsl:key name=
"primary"
38 <xsl:key name=
"secondary"
40 use=
"concat(&primary;, &sep;, &secondary;)"/>
42 <xsl:key name=
"tertiary"
44 use=
"concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
46 <xsl:key name=
"endofrange"
47 match=
"indexterm[@class='endofrange']"
50 <xsl:key name=
"primary-section"
51 match=
"indexterm[not(secondary) and not(see)]"
52 use=
"concat(&primary;, &sep;, §ion.id;)"/>
54 <xsl:key name=
"secondary-section"
55 match=
"indexterm[not(tertiary) and not(see)]"
56 use=
"concat(&primary;, &sep;, &secondary;, &sep;, §ion.id;)"/>
58 <xsl:key name=
"tertiary-section"
59 match=
"indexterm[not(see)]"
60 use=
"concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, §ion.id;)"/>
62 <xsl:key name=
"see-also"
63 match=
"indexterm[seealso]"
64 use=
"concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso)"/>
67 match=
"indexterm[see]"
68 use=
"concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see)"/>
70 <xsl:key name=
"sections" match=
"*[@id or @xml:id]" use=
"@id|@xml:id"/>
73 <xsl:template name=
"generate-index">
74 <xsl:param name=
"scope" select=
"(ancestor::book|/)[last()]"/>
77 <xsl:when test=
"$index.method = 'kosek'">
78 <xsl:call-template name=
"generate-kosek-index">
79 <xsl:with-param name=
"scope" select=
"$scope"/>
82 <xsl:when test=
"$index.method = 'kimber'">
83 <xsl:call-template name=
"generate-kimber-index">
84 <xsl:with-param name=
"scope" select=
"$scope"/>
89 <xsl:call-template name=
"generate-basic-index">
90 <xsl:with-param name=
"scope" select=
"$scope"/>
96 <xsl:template name=
"generate-basic-index">
97 <xsl:param name=
"scope" select=
"NOTANODE"/>
99 <xsl:variable name=
"role">
100 <xsl:if test=
"$index.on.role != 0">
101 <xsl:value-of select=
"@role"/>
105 <xsl:variable name=
"type">
106 <xsl:if test=
"$index.on.type != 0">
107 <xsl:value-of select=
"@type"/>
111 <xsl:variable name=
"terms"
113 [count(.|key('letter',
114 translate(substring(&primary;, 1, 1),
118 and not(@class = 'endofrange')]"/>
120 <xsl:variable name=
"alphabetical"
121 select=
"$terms[contains(concat(&lowercase;, &uppercase;),
122 substring(&primary;, 1, 1))]"/>
124 <xsl:variable name=
"others" select=
"$terms[not(contains(concat(&lowercase;,
126 substring(&primary;, 1, 1)))]"/>
128 <xsl:if test=
"$others">
129 <div class=
"indexdiv">
131 <xsl:call-template name=
"gentext">
132 <xsl:with-param name=
"key" select=
"'index symbols'"/>
136 <xsl:apply-templates select=
"$others[count(.|key('primary',
137 &primary;)[&scope;][1]) = 1]"
138 mode=
"index-symbol-div">
139 <xsl:with-param name=
"position" select=
"position()"/>
140 <xsl:with-param name=
"scope" select=
"$scope"/>
141 <xsl:with-param name=
"role" select=
"$role"/>
142 <xsl:with-param name=
"type" select=
"$type"/>
143 <xsl:sort select=
"translate(&primary;, &lowercase;, &uppercase;)"/>
144 </xsl:apply-templates>
149 <xsl:apply-templates select=
"$alphabetical[count(.|key('letter',
150 translate(substring(&primary;, 1, 1),
151 &lowercase;,&uppercase;))[&scope;][1]) = 1]"
152 mode=
"index-div-basic">
153 <xsl:with-param name=
"position" select=
"position()"/>
154 <xsl:with-param name=
"scope" select=
"$scope"/>
155 <xsl:with-param name=
"role" select=
"$role"/>
156 <xsl:with-param name=
"type" select=
"$type"/>
157 <xsl:sort select=
"translate(&primary;, &lowercase;, &uppercase;)"/>
158 </xsl:apply-templates>
162 <!-- This template not used if html/autoidx-kosek.xsl is imported -->
163 <xsl:template name=
"generate-kosek-index">
164 <xsl:param name=
"scope" select=
"NOTANODE"/>
166 <xsl:variable name=
"vendor" select=
"system-property('xsl:vendor')"/>
167 <xsl:if test=
"contains($vendor, 'libxslt')">
168 <xsl:message terminate=
"yes">
169 <xsl:text>ERROR: the 'kosek' index method does not
</xsl:text>
170 <xsl:text>work with the xsltproc XSLT processor.
</xsl:text>
175 <xsl:if test=
"not(function-available('exslt:node-set') or
176 function-available('exslt:nodeSet'))">
177 <xsl:message terminate=
"yes">
178 <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text>
179 <xsl:text>exslt:node-set() function. Use a processor that
</xsl:text>
180 <xsl:text>has it, or use a different index method.
</xsl:text>
184 <xsl:if test=
"$kosek.imported = 0">
185 <xsl:message terminate=
"yes">
186 <xsl:text>ERROR: the 'kosek' index method requires the

</xsl:text>
187 <xsl:text>kosek index extensions be imported:

</xsl:text>
188 <xsl:text> xsl:import
href=
"html/autoidx-kosek.xsl"</xsl:text>
194 <!-- This template not used if html/autoidx-kimber.xsl is imported -->
195 <xsl:template name=
"generate-kimber-index">
196 <xsl:param name=
"scope" select=
"NOTANODE"/>
198 <xsl:variable name=
"vendor" select=
"system-property('xsl:vendor')"/>
199 <xsl:if test=
"not(contains($vendor, 'SAXON '))">
200 <xsl:message terminate=
"yes">
201 <xsl:text>ERROR: the 'kimber' index method requires the
</xsl:text>
202 <xsl:text>Saxon version
6 or
8 XSLT processor.
</xsl:text>
206 <xsl:if test=
"$kimber.imported = 0">
207 <xsl:message terminate=
"yes">
208 <xsl:text>ERROR: the 'kimber' index method requires the

</xsl:text>
209 <xsl:text>kimber index extensions be imported:

</xsl:text>
210 <xsl:text> xsl:import
href=
"html/autoidx-kimber.xsl"</xsl:text>
216 <xsl:template match=
"indexterm" mode=
"index-div-basic">
217 <xsl:param name=
"scope" select=
"."/>
218 <xsl:param name=
"role" select=
"''"/>
219 <xsl:param name=
"type" select=
"''"/>
221 <xsl:variable name=
"key"
222 select=
"translate(substring(&primary;, 1, 1),
223 &lowercase;,&uppercase;)"/>
225 <xsl:if test=
"key('letter', $key)[&scope;]
226 [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
227 <div class=
"indexdiv">
228 <xsl:if test=
"contains(concat(&lowercase;, &uppercase;), $key)">
230 <xsl:value-of select=
"translate($key, &lowercase;, &uppercase;)"/>
234 <xsl:apply-templates select=
"key('letter', $key)[&scope;]
235 [count(.|key('primary', &primary;)
237 mode=
"index-primary">
238 <xsl:with-param name=
"position" select=
"position()"/>
239 <xsl:with-param name=
"scope" select=
"$scope"/>
240 <xsl:with-param name=
"role" select=
"$role"/>
241 <xsl:with-param name=
"type" select=
"$type"/>
242 <xsl:sort select=
"translate(&primary;, &lowercase;, &uppercase;)"/>
243 </xsl:apply-templates>
249 <xsl:template match=
"indexterm" mode=
"index-symbol-div">
250 <xsl:param name=
"scope" select=
"/"/>
251 <xsl:param name=
"role" select=
"''"/>
252 <xsl:param name=
"type" select=
"''"/>
254 <xsl:variable name=
"key" select=
"translate(substring(&primary;, 1, 1),
255 &lowercase;,&uppercase;)"/>
257 <xsl:apply-templates select=
"key('letter', $key)
258 [&scope;][count(.|key('primary', &primary;)[1]) = 1]"
259 mode=
"index-primary">
260 <xsl:with-param name=
"position" select=
"position()"/>
261 <xsl:with-param name=
"scope" select=
"$scope"/>
262 <xsl:with-param name=
"role" select=
"$role"/>
263 <xsl:with-param name=
"type" select=
"$type"/>
264 <xsl:sort select=
"translate(&primary;, &lowercase;, &uppercase;)"/>
265 </xsl:apply-templates>
268 <xsl:template match=
"indexterm" mode=
"index-primary">
269 <xsl:param name=
"scope" select=
"."/>
270 <xsl:param name=
"role" select=
"''"/>
271 <xsl:param name=
"type" select=
"''"/>
273 <xsl:variable name=
"key" select=
"&primary;"/>
274 <xsl:variable name=
"refs" select=
"key('primary', $key)[&scope;]"/>
276 <xsl:value-of select=
"primary"/>
277 <xsl:for-each select=
"$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
278 <xsl:apply-templates select=
"." mode=
"reference">
279 <xsl:with-param name=
"position" select=
"position()"/>
280 <xsl:with-param name=
"scope" select=
"$scope"/>
281 <xsl:with-param name=
"role" select=
"$role"/>
282 <xsl:with-param name=
"type" select=
"$type"/>
283 </xsl:apply-templates>
286 <xsl:if test=
"$refs[not(secondary)]/*[self::see]">
287 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
289 <xsl:with-param name=
"position" select=
"position()"/>
290 <xsl:with-param name=
"scope" select=
"$scope"/>
291 <xsl:with-param name=
"role" select=
"$role"/>
292 <xsl:with-param name=
"type" select=
"$type"/>
293 <xsl:sort select=
"translate(see, &lowercase;, &uppercase;)"/>
294 </xsl:apply-templates>
297 <xsl:if test=
"$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
300 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
301 mode=
"index-seealso">
302 <xsl:with-param name=
"position" select=
"position()"/>
303 <xsl:with-param name=
"scope" select=
"$scope"/>
304 <xsl:with-param name=
"role" select=
"$role"/>
305 <xsl:with-param name=
"type" select=
"$type"/>
306 <xsl:sort select=
"translate(seealso, &lowercase;, &uppercase;)"/>
307 </xsl:apply-templates>
308 <xsl:apply-templates select=
"$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
309 mode=
"index-secondary">
310 <xsl:with-param name=
"position" select=
"position()"/>
311 <xsl:with-param name=
"scope" select=
"$scope"/>
312 <xsl:with-param name=
"role" select=
"$role"/>
313 <xsl:with-param name=
"type" select=
"$type"/>
314 <xsl:sort select=
"translate(&secondary;, &lowercase;, &uppercase;)"/>
315 </xsl:apply-templates>
321 <xsl:template match=
"indexterm" mode=
"index-secondary">
322 <xsl:param name=
"scope" select=
"."/>
323 <xsl:param name=
"role" select=
"''"/>
324 <xsl:param name=
"type" select=
"''"/>
326 <xsl:variable name=
"key" select=
"concat(&primary;, &sep;, &secondary;)"/>
327 <xsl:variable name=
"refs" select=
"key('secondary', $key)[&scope;]"/>
329 <xsl:value-of select=
"secondary"/>
330 <xsl:for-each select=
"$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
331 <xsl:apply-templates select=
"." mode=
"reference">
332 <xsl:with-param name=
"position" select=
"position()"/>
333 <xsl:with-param name=
"scope" select=
"$scope"/>
334 <xsl:with-param name=
"role" select=
"$role"/>
335 <xsl:with-param name=
"type" select=
"$type"/>
336 </xsl:apply-templates>
339 <xsl:if test=
"$refs[not(tertiary)]/*[self::see]">
340 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
342 <xsl:with-param name=
"position" select=
"position()"/>
343 <xsl:with-param name=
"scope" select=
"$scope"/>
344 <xsl:with-param name=
"role" select=
"$role"/>
345 <xsl:with-param name=
"type" select=
"$type"/>
346 <xsl:sort select=
"translate(see, &lowercase;, &uppercase;)"/>
347 </xsl:apply-templates>
350 <xsl:if test=
"$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
353 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
354 mode=
"index-seealso">
355 <xsl:with-param name=
"position" select=
"position()"/>
356 <xsl:with-param name=
"scope" select=
"$scope"/>
357 <xsl:with-param name=
"role" select=
"$role"/>
358 <xsl:with-param name=
"type" select=
"$type"/>
359 <xsl:sort select=
"translate(seealso, &lowercase;, &uppercase;)"/>
360 </xsl:apply-templates>
361 <xsl:apply-templates select=
"$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
362 mode=
"index-tertiary">
363 <xsl:with-param name=
"position" select=
"position()"/>
364 <xsl:with-param name=
"scope" select=
"$scope"/>
365 <xsl:with-param name=
"role" select=
"$role"/>
366 <xsl:with-param name=
"type" select=
"$type"/>
367 <xsl:sort select=
"translate(&tertiary;, &lowercase;, &uppercase;)"/>
368 </xsl:apply-templates>
374 <xsl:template match=
"indexterm" mode=
"index-tertiary">
375 <xsl:param name=
"scope" select=
"."/>
376 <xsl:param name=
"role" select=
"''"/>
377 <xsl:param name=
"type" select=
"''"/>
379 <xsl:variable name=
"key" select=
"concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
380 <xsl:variable name=
"refs" select=
"key('tertiary', $key)[&scope;]"/>
382 <xsl:value-of select=
"tertiary"/>
383 <xsl:for-each select=
"$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
384 <xsl:apply-templates select=
"." mode=
"reference">
385 <xsl:with-param name=
"position" select=
"position()"/>
386 <xsl:with-param name=
"scope" select=
"$scope"/>
387 <xsl:with-param name=
"role" select=
"$role"/>
388 <xsl:with-param name=
"type" select=
"$type"/>
389 </xsl:apply-templates>
392 <xsl:if test=
"$refs/see">
393 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
395 <xsl:with-param name=
"position" select=
"position()"/>
396 <xsl:with-param name=
"scope" select=
"$scope"/>
397 <xsl:with-param name=
"role" select=
"$role"/>
398 <xsl:with-param name=
"type" select=
"$type"/>
399 <xsl:sort select=
"translate(see, &lowercase;, &uppercase;)"/>
400 </xsl:apply-templates>
403 <xsl:if test=
"$refs/seealso">
406 <xsl:apply-templates select=
"$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
407 mode=
"index-seealso">
408 <xsl:with-param name=
"position" select=
"position()"/>
409 <xsl:with-param name=
"scope" select=
"$scope"/>
410 <xsl:with-param name=
"role" select=
"$role"/>
411 <xsl:with-param name=
"type" select=
"$type"/>
412 <xsl:sort select=
"translate(seealso, &lowercase;, &uppercase;)"/>
413 </xsl:apply-templates>
419 <xsl:template match=
"indexterm" mode=
"reference">
420 <xsl:param name=
"scope" select=
"."/>
421 <xsl:param name=
"role" select=
"''"/>
422 <xsl:param name=
"type" select=
"''"/>
423 <xsl:param name=
"position"/>
425 <xsl:variable name=
"term.separator">
426 <xsl:call-template name=
"index.separator">
427 <xsl:with-param name=
"key" select=
"'index.term.separator'"/>
431 <xsl:variable name=
"number.separator">
432 <xsl:call-template name=
"index.separator">
433 <xsl:with-param name=
"key" select=
"'index.number.separator'"/>
437 <xsl:variable name=
"range.separator">
438 <xsl:call-template name=
"index.separator">
439 <xsl:with-param name=
"key" select=
"'index.range.separator'"/>
444 <xsl:when test=
"$position = 1">
445 <xsl:value-of select=
"$term.separator"/>
448 <xsl:value-of select=
"$number.separator"/>
453 <xsl:when test=
"@zone and string(@zone)">
454 <xsl:call-template name=
"reference">
455 <xsl:with-param name=
"zones" select=
"normalize-space(@zone)"/>
456 <xsl:with-param name=
"position" select=
"position()"/>
457 <xsl:with-param name=
"scope" select=
"$scope"/>
458 <xsl:with-param name=
"role" select=
"$role"/>
459 <xsl:with-param name=
"type" select=
"$type"/>
464 <xsl:apply-templates select=
"." mode=
"class.attribute"/>
465 <xsl:variable name=
"title">
467 <xsl:when test=
"§ion;/titleabbrev and $index.prefer.titleabbrev != 0">
468 <xsl:apply-templates select=
"§ion;" mode=
"titleabbrev.markup"/>
471 <xsl:apply-templates select=
"§ion;" mode=
"title.markup"/>
476 <xsl:attribute name=
"href">
477 <xsl:call-template name=
"href.target">
478 <xsl:with-param name=
"object" select=
"§ion;"/>
479 <xsl:with-param name=
"context" select=
"//index[&scope;][1]"/>
483 <xsl:value-of select=
"$title"/> <!-- text only -->
486 <xsl:variable name=
"id" select=
"(@id|@xml:id)[1]"/>
487 <xsl:if test=
"key('endofrange', $id)[&scope;]">
488 <xsl:apply-templates select=
"key('endofrange', $id)[&scope;][last()]"
490 <xsl:with-param name=
"position" select=
"position()"/>
491 <xsl:with-param name=
"scope" select=
"$scope"/>
492 <xsl:with-param name=
"role" select=
"$role"/>
493 <xsl:with-param name=
"type" select=
"$type"/>
494 <xsl:with-param name=
"separator" select=
"$range.separator"/>
495 </xsl:apply-templates>
501 <xsl:template name=
"reference">
502 <xsl:param name=
"scope" select=
"."/>
503 <xsl:param name=
"role" select=
"''"/>
504 <xsl:param name=
"type" select=
"''"/>
505 <xsl:param name=
"zones"/>
508 <xsl:when test=
"contains($zones, ' ')">
509 <xsl:variable name=
"zone" select=
"substring-before($zones, ' ')"/>
510 <xsl:variable name=
"target" select=
"key('sections', $zone)[&scope;]"/>
513 <xsl:apply-templates select=
"." mode=
"class.attribute"/>
514 <xsl:attribute name=
"href">
515 <xsl:call-template name=
"href.target">
516 <xsl:with-param name=
"object" select=
"$target[1]"/>
517 <xsl:with-param name=
"context" select=
"//index[&scope;][1]"/>
520 <xsl:apply-templates select=
"$target[1]" mode=
"index-title-content"/>
522 <xsl:text>,
</xsl:text>
523 <xsl:call-template name=
"reference">
524 <xsl:with-param name=
"zones" select=
"substring-after($zones, ' ')"/>
525 <xsl:with-param name=
"position" select=
"position()"/>
526 <xsl:with-param name=
"scope" select=
"$scope"/>
527 <xsl:with-param name=
"role" select=
"$role"/>
528 <xsl:with-param name=
"type" select=
"$type"/>
532 <xsl:variable name=
"zone" select=
"$zones"/>
533 <xsl:variable name=
"target" select=
"key('sections', $zone)[&scope;]"/>
536 <xsl:apply-templates select=
"." mode=
"class.attribute"/>
537 <xsl:attribute name=
"href">
538 <xsl:call-template name=
"href.target">
539 <xsl:with-param name=
"object" select=
"$target[1]"/>
540 <xsl:with-param name=
"context" select=
"//index[&scope;][1]"/>
543 <xsl:apply-templates select=
"$target[1]" mode=
"index-title-content"/>
549 <xsl:template match=
"indexterm" mode=
"index-see">
550 <xsl:param name=
"scope" select=
"."/>
551 <xsl:param name=
"role" select=
"''"/>
552 <xsl:param name=
"type" select=
"''"/>
554 <xsl:text> (
</xsl:text>
555 <xsl:call-template name=
"gentext">
556 <xsl:with-param name=
"key" select=
"'see'"/>
558 <xsl:text> </xsl:text>
559 <xsl:value-of select=
"see"/>
560 <xsl:text>)
</xsl:text>
563 <xsl:template match=
"indexterm" mode=
"index-seealso">
564 <xsl:param name=
"scope" select=
"."/>
565 <xsl:param name=
"role" select=
"''"/>
566 <xsl:param name=
"type" select=
"''"/>
568 <xsl:for-each select=
"seealso">
569 <xsl:sort select=
"translate(., &lowercase;, &uppercase;)"/>
571 <xsl:text>(
</xsl:text>
572 <xsl:call-template name=
"gentext">
573 <xsl:with-param name=
"key" select=
"'seealso'"/>
575 <xsl:text> </xsl:text>
576 <xsl:value-of select=
"."/>
577 <xsl:text>)
</xsl:text>
582 <xsl:template match=
"*" mode=
"index-title-content">
583 <xsl:variable name=
"title">
584 <xsl:apply-templates select=
"§ion;" mode=
"title.markup"/>
587 <xsl:value-of select=
"$title"/>
590 <xsl:template name=
"index.separator">
591 <xsl:param name=
"key" select=
"''"/>
592 <xsl:param name=
"lang">
593 <xsl:call-template name=
"l10n.language"/>
597 <xsl:when test=
"$key = 'index.term.separator'">
599 <!-- Use the override if not blank -->
600 <xsl:when test=
"$index.term.separator != ''">
601 <xsl:copy-of select=
"$index.term.separator"/>
604 <xsl:call-template name=
"gentext.template">
605 <xsl:with-param name=
"lang" select=
"$lang"/>
606 <xsl:with-param name=
"context">index
</xsl:with-param>
607 <xsl:with-param name=
"name">term-separator
</xsl:with-param>
612 <xsl:when test=
"$key = 'index.number.separator'">
614 <!-- Use the override if not blank -->
615 <xsl:when test=
"$index.number.separator != ''">
616 <xsl:copy-of select=
"$index.number.separator"/>
619 <xsl:call-template name=
"gentext.template">
620 <xsl:with-param name=
"lang" select=
"$lang"/>
621 <xsl:with-param name=
"context">index
</xsl:with-param>
622 <xsl:with-param name=
"name">number-separator
</xsl:with-param>
627 <xsl:when test=
"$key = 'index.range.separator'">
629 <!-- Use the override if not blank -->
630 <xsl:when test=
"$index.range.separator != ''">
631 <xsl:copy-of select=
"$index.range.separator"/>
634 <xsl:call-template name=
"gentext.template">
635 <xsl:with-param name=
"lang" select=
"$lang"/>
636 <xsl:with-param name=
"context">index
</xsl:with-param>
637 <xsl:with-param name=
"name">range-separator
</xsl:with-param>