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 8516 2009-08-12 02:54:56Z abdelazer $
14 ********************************************************************
16 This file is part of the XSL DocBook Stylesheet distribution.
17 See ../README or http://docbook.sf.net/release/xsl/current/ for
18 copyright 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">
130 <xsl:when test="normalize-space($type) != '' and
131 $others[@type = $type][count(.|key('primary', &primary;)[&scope;][1]) = 1]">
132 <div class="indexdiv">
134 <xsl:call-template name="gentext">
135 <xsl:with-param name="key" select="'index symbols'"/>
139 <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]"
140 mode="index-symbol-div">
141 <xsl:with-param name="position" select="position()"/>
142 <xsl:with-param name="scope" select="$scope"/>
143 <xsl:with-param name="role" select="$role"/>
144 <xsl:with-param name="type" select="$type"/>
145 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
146 </xsl:apply-templates>
150 <xsl:when test="normalize-space($type) != ''">
151 <!-- Output nothing, as there isn't a match for $other using this $type -->
154 <div class="indexdiv">
156 <xsl:call-template name="gentext">
157 <xsl:with-param name="key" select="'index symbols'"/>
161 <xsl:apply-templates select="$others[count(.|key('primary',
162 &primary;)[&scope;][1]) = 1]"
163 mode="index-symbol-div">
164 <xsl:with-param name="position" select="position()"/>
165 <xsl:with-param name="scope" select="$scope"/>
166 <xsl:with-param name="role" select="$role"/>
167 <xsl:with-param name="type" select="$type"/>
168 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
169 </xsl:apply-templates>
176 <xsl:apply-templates select="$alphabetical[count(.|key('letter',
177 translate(substring(&primary;, 1, 1),
178 &lowercase;,&uppercase;))[&scope;][1]) = 1]"
179 mode="index-div-basic">
180 <xsl:with-param name="position" select="position()"/>
181 <xsl:with-param name="scope" select="$scope"/>
182 <xsl:with-param name="role" select="$role"/>
183 <xsl:with-param name="type" select="$type"/>
184 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
185 </xsl:apply-templates>
189 <!-- This template not used if html/autoidx-kosek.xsl is imported -->
190 <xsl:template name="generate-kosek-index">
191 <xsl:param name="scope" select="NOTANODE"/>
193 <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
194 <xsl:if test="contains($vendor, 'libxslt')">
195 <xsl:message terminate="yes">
196 <xsl:text>ERROR: the 'kosek' index method does not </xsl:text>
197 <xsl:text>work with the xsltproc XSLT processor.</xsl:text>
202 <xsl:if test="$exsl.node.set.available = 0">
203 <xsl:message terminate="yes">
204 <xsl:text>ERROR: the 'kosek' index method requires the </xsl:text>
205 <xsl:text>exslt:node-set() function. Use a processor that </xsl:text>
206 <xsl:text>has it, or use a different index method.</xsl:text>
210 <xsl:if test="$kosek.imported = 0">
211 <xsl:message terminate="yes">
212 <xsl:text>ERROR: the 'kosek' index method requires the
</xsl:text>
213 <xsl:text>kosek index extensions be imported:
</xsl:text>
214 <xsl:text> xsl:import href="html/autoidx-kosek.xsl"</xsl:text>
220 <!-- This template not used if html/autoidx-kimber.xsl is imported -->
221 <xsl:template name="generate-kimber-index">
222 <xsl:param name="scope" select="NOTANODE"/>
224 <xsl:variable name="vendor" select="system-property('xsl:vendor')"/>
225 <xsl:if test="not(contains($vendor, 'SAXON '))">
226 <xsl:message terminate="yes">
227 <xsl:text>ERROR: the 'kimber' index method requires the </xsl:text>
228 <xsl:text>Saxon version 6 or 8 XSLT processor.</xsl:text>
232 <xsl:if test="$kimber.imported = 0">
233 <xsl:message terminate="yes">
234 <xsl:text>ERROR: the 'kimber' index method requires the
</xsl:text>
235 <xsl:text>kimber index extensions be imported:
</xsl:text>
236 <xsl:text> xsl:import href="html/autoidx-kimber.xsl"</xsl:text>
242 <xsl:template match="indexterm" mode="index-div-basic">
243 <xsl:param name="scope" select="."/>
244 <xsl:param name="role" select="''"/>
245 <xsl:param name="type" select="''"/>
247 <xsl:variable name="key"
248 select="translate(substring(&primary;, 1, 1),
249 &lowercase;,&uppercase;)"/>
251 <xsl:if test="key('letter', $key)[&scope;]
252 [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
253 <div class="indexdiv">
254 <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
256 <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
260 <xsl:apply-templates select="key('letter', $key)[&scope;]
261 [count(.|key('primary', &primary;)
263 mode="index-primary">
264 <xsl:with-param name="position" select="position()"/>
265 <xsl:with-param name="scope" select="$scope"/>
266 <xsl:with-param name="role" select="$role"/>
267 <xsl:with-param name="type" select="$type"/>
268 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
269 </xsl:apply-templates>
275 <xsl:template match="indexterm" mode="index-symbol-div">
276 <xsl:param name="scope" select="/"/>
277 <xsl:param name="role" select="''"/>
278 <xsl:param name="type" select="''"/>
280 <xsl:variable name="key" select="translate(substring(&primary;, 1, 1),
281 &lowercase;,&uppercase;)"/>
283 <xsl:apply-templates select="key('letter', $key)
284 [&scope;][count(.|key('primary', &primary;)[1]) = 1]"
285 mode="index-primary">
286 <xsl:with-param name="position" select="position()"/>
287 <xsl:with-param name="scope" select="$scope"/>
288 <xsl:with-param name="role" select="$role"/>
289 <xsl:with-param name="type" select="$type"/>
290 <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
291 </xsl:apply-templates>
294 <xsl:template match="indexterm" mode="index-primary">
295 <xsl:param name="scope" select="."/>
296 <xsl:param name="role" select="''"/>
297 <xsl:param name="type" select="''"/>
299 <xsl:variable name="key" select="&primary;"/>
300 <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
302 <xsl:for-each select="$refs/primary">
303 <xsl:if test="@id or @xml:id">
304 <a name="{(@id|@xml:id)[1]}"/>
307 <xsl:value-of select="primary"/>
309 <xsl:when test="$index.links.to.section = 1">
310 <xsl:for-each select="$refs[generate-id() = generate-id(key('primary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
311 <xsl:apply-templates select="." mode="reference">
312 <xsl:with-param name="position" select="position()"/>
313 <xsl:with-param name="scope" select="$scope"/>
314 <xsl:with-param name="role" select="$role"/>
315 <xsl:with-param name="type" select="$type"/>
316 </xsl:apply-templates>
320 <xsl:for-each select="$refs[&scope;]">
321 <xsl:apply-templates select="." mode="reference">
322 <xsl:with-param name="position" select="position()"/>
323 <xsl:with-param name="scope" select="$scope"/>
324 <xsl:with-param name="role" select="$role"/>
325 <xsl:with-param name="type" select="$type"/>
326 </xsl:apply-templates>
331 <xsl:if test="$refs[not(secondary)]/*[self::see]">
332 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;][1])]"
334 <xsl:with-param name="position" select="position()"/>
335 <xsl:with-param name="scope" select="$scope"/>
336 <xsl:with-param name="role" select="$role"/>
337 <xsl:with-param name="type" select="$type"/>
338 <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
339 </xsl:apply-templates>
342 <xsl:if test="$refs/secondary or $refs[not(secondary)]/*[self::seealso]">
345 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;][1])]"
346 mode="index-seealso">
347 <xsl:with-param name="position" select="position()"/>
348 <xsl:with-param name="scope" select="$scope"/>
349 <xsl:with-param name="role" select="$role"/>
350 <xsl:with-param name="type" select="$type"/>
351 <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
352 </xsl:apply-templates>
353 <xsl:apply-templates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;][1]) = 1]"
354 mode="index-secondary">
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(&secondary;, &lowercase;, &uppercase;)"/>
360 </xsl:apply-templates>
366 <xsl:template match="indexterm" mode="index-secondary">
367 <xsl:param name="scope" select="."/>
368 <xsl:param name="role" select="''"/>
369 <xsl:param name="type" select="''"/>
371 <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;)"/>
372 <xsl:variable name="refs" select="key('secondary', $key)[&scope;]"/>
374 <xsl:for-each select="$refs/secondary">
375 <xsl:if test="@id or @xml:id">
376 <a name="{(@id|@xml:id)[1]}"/>
379 <xsl:value-of select="secondary"/>
381 <xsl:when test="$index.links.to.section = 1">
382 <xsl:for-each select="$refs[generate-id() = generate-id(key('secondary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
383 <xsl:apply-templates select="." mode="reference">
384 <xsl:with-param name="position" select="position()"/>
385 <xsl:with-param name="scope" select="$scope"/>
386 <xsl:with-param name="role" select="$role"/>
387 <xsl:with-param name="type" select="$type"/>
388 </xsl:apply-templates>
392 <xsl:for-each select="$refs[&scope;]">
393 <xsl:apply-templates select="." mode="reference">
394 <xsl:with-param name="position" select="position()"/>
395 <xsl:with-param name="scope" select="$scope"/>
396 <xsl:with-param name="role" select="$role"/>
397 <xsl:with-param name="type" select="$type"/>
398 </xsl:apply-templates>
403 <xsl:if test="$refs[not(tertiary)]/*[self::see]">
404 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, see))[&scope;][1])]"
406 <xsl:with-param name="position" select="position()"/>
407 <xsl:with-param name="scope" select="$scope"/>
408 <xsl:with-param name="role" select="$role"/>
409 <xsl:with-param name="type" select="$type"/>
410 <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
411 </xsl:apply-templates>
414 <xsl:if test="$refs/tertiary or $refs[not(tertiary)]/*[self::seealso]">
417 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &sep;, seealso))[&scope;][1])]"
418 mode="index-seealso">
419 <xsl:with-param name="position" select="position()"/>
420 <xsl:with-param name="scope" select="$scope"/>
421 <xsl:with-param name="role" select="$role"/>
422 <xsl:with-param name="type" select="$type"/>
423 <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
424 </xsl:apply-templates>
425 <xsl:apply-templates select="$refs[tertiary and count(.|key('tertiary', concat($key, &sep;, &tertiary;))[&scope;][1]) = 1]"
426 mode="index-tertiary">
427 <xsl:with-param name="position" select="position()"/>
428 <xsl:with-param name="scope" select="$scope"/>
429 <xsl:with-param name="role" select="$role"/>
430 <xsl:with-param name="type" select="$type"/>
431 <xsl:sort select="translate(&tertiary;, &lowercase;, &uppercase;)"/>
432 </xsl:apply-templates>
438 <xsl:template match="indexterm" mode="index-tertiary">
439 <xsl:param name="scope" select="."/>
440 <xsl:param name="role" select="''"/>
441 <xsl:param name="type" select="''"/>
443 <xsl:variable name="key" select="concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;)"/>
444 <xsl:variable name="refs" select="key('tertiary', $key)[&scope;]"/>
446 <xsl:for-each select="$refs/tertiary">
447 <xsl:if test="@id or @xml:id">
448 <a name="{(@id|@xml:id)[1]}"/>
451 <xsl:value-of select="tertiary"/>
453 <xsl:when test="$index.links.to.section = 1">
454 <xsl:for-each select="$refs[generate-id() = generate-id(key('tertiary-section', concat($key, &sep;, §ion.id;))[&scope;][1])]">
455 <xsl:apply-templates select="." mode="reference">
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"/>
460 </xsl:apply-templates>
464 <xsl:for-each select="$refs[&scope;]">
465 <xsl:apply-templates select="." mode="reference">
466 <xsl:with-param name="position" select="position()"/>
467 <xsl:with-param name="scope" select="$scope"/>
468 <xsl:with-param name="role" select="$role"/>
469 <xsl:with-param name="type" select="$type"/>
470 </xsl:apply-templates>
475 <xsl:if test="$refs/see">
476 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, see))[&scope;][1])]"
478 <xsl:with-param name="position" select="position()"/>
479 <xsl:with-param name="scope" select="$scope"/>
480 <xsl:with-param name="role" select="$role"/>
481 <xsl:with-param name="type" select="$type"/>
482 <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
483 </xsl:apply-templates>
486 <xsl:if test="$refs/seealso">
489 <xsl:apply-templates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &secondary;, &sep;, &tertiary;, &sep;, seealso))[&scope;][1])]"
490 mode="index-seealso">
491 <xsl:with-param name="position" select="position()"/>
492 <xsl:with-param name="scope" select="$scope"/>
493 <xsl:with-param name="role" select="$role"/>
494 <xsl:with-param name="type" select="$type"/>
495 <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
496 </xsl:apply-templates>
502 <xsl:template match="indexterm" mode="reference">
503 <xsl:param name="scope" select="."/>
504 <xsl:param name="role" select="''"/>
505 <xsl:param name="type" select="''"/>
506 <xsl:param name="position"/>
508 <xsl:variable name="term.separator">
509 <xsl:call-template name="index.separator">
510 <xsl:with-param name="key" select="'index.term.separator'"/>
514 <xsl:variable name="number.separator">
515 <xsl:call-template name="index.separator">
516 <xsl:with-param name="key" select="'index.number.separator'"/>
520 <xsl:variable name="range.separator">
521 <xsl:call-template name="index.separator">
522 <xsl:with-param name="key" select="'index.range.separator'"/>
527 <xsl:when test="$position = 1">
528 <xsl:value-of select="$term.separator"/>
531 <xsl:value-of select="$number.separator"/>
536 <xsl:when test="@zone and string(@zone)">
537 <xsl:call-template name="reference">
538 <xsl:with-param name="zones" select="normalize-space(@zone)"/>
539 <xsl:with-param name="position" select="position()"/>
540 <xsl:with-param name="scope" select="$scope"/>
541 <xsl:with-param name="role" select="$role"/>
542 <xsl:with-param name="type" select="$type"/>
547 <xsl:apply-templates select="." mode="class.attribute"/>
548 <xsl:variable name="title">
550 <xsl:when test="§ion;/titleabbrev and $index.prefer.titleabbrev != 0">
551 <xsl:apply-templates select="§ion;" mode="titleabbrev.markup"/>
554 <xsl:apply-templates select="§ion;" mode="title.markup"/>
559 <xsl:attribute name="href">
561 <xsl:when test="$index.links.to.section = 1">
562 <xsl:call-template name="href.target">
563 <xsl:with-param name="object" select="§ion;"/>
564 <xsl:with-param name="context" select="//index[&scope;][1]"/>
568 <xsl:call-template name="href.target">
569 <xsl:with-param name="object" select="."/>
570 <xsl:with-param name="context" select="//index[&scope;][1]"/>
577 <xsl:value-of select="$title"/> <!-- text only -->
580 <xsl:variable name="id" select="(@id|@xml:id)[1]"/>
581 <xsl:if test="key('endofrange', $id)[&scope;]">
582 <xsl:apply-templates select="key('endofrange', $id)[&scope;][last()]"
584 <xsl:with-param name="position" select="position()"/>
585 <xsl:with-param name="scope" select="$scope"/>
586 <xsl:with-param name="role" select="$role"/>
587 <xsl:with-param name="type" select="$type"/>
588 <xsl:with-param name="separator" select="$range.separator"/>
589 </xsl:apply-templates>
595 <xsl:template name="reference">
596 <xsl:param name="scope" select="."/>
597 <xsl:param name="role" select="''"/>
598 <xsl:param name="type" select="''"/>
599 <xsl:param name="zones"/>
602 <xsl:when test="contains($zones, ' ')">
603 <xsl:variable name="zone" select="substring-before($zones, ' ')"/>
604 <xsl:variable name="target" select="key('sections', $zone)"/>
607 <xsl:apply-templates select="." mode="class.attribute"/>
608 <xsl:attribute name="href">
609 <xsl:call-template name="href.target">
610 <xsl:with-param name="object" select="$target[1]"/>
611 <xsl:with-param name="context" select="//index[&scope;][1]"/>
614 <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
616 <xsl:text>, </xsl:text>
617 <xsl:call-template name="reference">
618 <xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
619 <xsl:with-param name="position" select="position()"/>
620 <xsl:with-param name="scope" select="$scope"/>
621 <xsl:with-param name="role" select="$role"/>
622 <xsl:with-param name="type" select="$type"/>
626 <xsl:variable name="zone" select="$zones"/>
627 <xsl:variable name="target" select="key('sections', $zone)"/>
630 <xsl:apply-templates select="." mode="class.attribute"/>
631 <xsl:attribute name="href">
632 <xsl:call-template name="href.target">
633 <xsl:with-param name="object" select="$target[1]"/>
634 <xsl:with-param name="context" select="//index[&scope;][1]"/>
637 <xsl:apply-templates select="$target[1]" mode="index-title-content"/>
643 <xsl:template match="indexterm" mode="index-see">
644 <xsl:param name="scope" select="."/>
645 <xsl:param name="role" select="''"/>
646 <xsl:param name="type" select="''"/>
648 <xsl:text> (</xsl:text>
649 <xsl:call-template name="gentext">
650 <xsl:with-param name="key" select="'see'"/>
652 <xsl:text> </xsl:text>
653 <xsl:value-of select="see"/>
654 <xsl:text>)</xsl:text>
657 <xsl:template match="indexterm" mode="index-seealso">
658 <xsl:param name="scope" select="."/>
659 <xsl:param name="role" select="''"/>
660 <xsl:param name="type" select="''"/>
662 <xsl:for-each select="seealso">
663 <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
665 <xsl:text>(</xsl:text>
666 <xsl:call-template name="gentext">
667 <xsl:with-param name="key" select="'seealso'"/>
669 <xsl:text> </xsl:text>
670 <xsl:value-of select="."/>
671 <xsl:text>)</xsl:text>
676 <xsl:template match="*" mode="index-title-content">
677 <xsl:variable name="title">
678 <xsl:apply-templates select="§ion;" mode="title.markup"/>
681 <xsl:value-of select="$title"/>
684 <xsl:template name="index.separator">
685 <xsl:param name="key" select="''"/>
686 <xsl:param name="lang">
687 <xsl:call-template name="l10n.language"/>
691 <xsl:when test="$key = 'index.term.separator'">
693 <!-- Use the override if not blank -->
694 <xsl:when test="$index.term.separator != ''">
695 <xsl:copy-of select="$index.term.separator"/>
698 <xsl:call-template name="gentext.template">
699 <xsl:with-param name="lang" select="$lang"/>
700 <xsl:with-param name="context">index</xsl:with-param>
701 <xsl:with-param name="name">term-separator</xsl:with-param>
706 <xsl:when test="$key = 'index.number.separator'">
708 <!-- Use the override if not blank -->
709 <xsl:when test="$index.number.separator != ''">
710 <xsl:copy-of select="$index.number.separator"/>
713 <xsl:call-template name="gentext.template">
714 <xsl:with-param name="lang" select="$lang"/>
715 <xsl:with-param name="context">index</xsl:with-param>
716 <xsl:with-param name="name">number-separator</xsl:with-param>
721 <xsl:when test="$key = 'index.range.separator'">
723 <!-- Use the override if not blank -->
724 <xsl:when test="$index.range.separator != ''">
725 <xsl:copy-of select="$index.range.separator"/>
728 <xsl:call-template name="gentext.template">
729 <xsl:with-param name="lang" select="$lang"/>
730 <xsl:with-param name="context">index</xsl:with-param>
731 <xsl:with-param name="name">range-separator</xsl:with-param>