blob: 5a33c49f44b605e3e5250a0dde6eb6e9d273d4aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<?xml version='1.0'?>
<!--#############################################################################
| $Id: index.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
|- #############################################################################
| $Author: jelmer $
|
| PURPOSE:
+ ############################################################################## -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://nwalsh.com/xsl/documentation/1.0"
exclude-result-prefixes="doc" version='1.0'>
<!--############################################################################# -->
<!-- DOCUMENTATION -->
<doc:reference id="index" xmlns="">
<referenceinfo>
<releaseinfo role="meta">
$Id: index.mod.xsl,v 1.1.2.3 2003/08/12 18:22:39 jelmer Exp $
</releaseinfo>
<authorgroup>
<author> <firstname>Ramon</firstname> <surname>Casellas</surname> </author>
<author> <firstname>James</firstname> <surname>Devenish</surname> </author>
</authorgroup>
<copyright>
<year>2000</year> <year>2001</year> <year>2002</year> <year>2003</year>
<holder>Ramon Casellas</holder>
</copyright>
</referenceinfo>
<title>Index <filename>index.mod.xsl</filename></title>
<partintro>
<section><title>Introduction</title>
<para></para>
</section>
</partintro>
</doc:reference>
<xsl:template match="index|setindex">
<xsl:call-template name="label.id"/>
<xsl:text>\printindex </xsl:text>
</xsl:template>
<xsl:template match="index/title"></xsl:template>
<xsl:template match="index/subtitle"></xsl:template>
<xsl:template match="index/titleabbrev"></xsl:template>
<xsl:template match="index/title" mode="component.title.mode">
<xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template>
</xsl:template>
<xsl:template match="index/subtitle" mode="component.title.mode"/>
<xsl:template match="indexdiv">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="indexdiv/title">
<xsl:call-template name="label.id"> <xsl:with-param name="object" select=".."/> </xsl:call-template>
</xsl:template>
<!-- INDEX TERM CONTENT MODEL
IndexTerm ::=
(Primary,
((Secondary,
((Tertiary,
(See|SeeAlso+)?)|
See|SeeAlso+)?)|
See|SeeAlso+)?)
-->
<xsl:template match="indexterm">
<xsl:text>\index{</xsl:text>
<!-- output primary -->
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="normalize-space(./primary)"/>
</xsl:call-template>
<!-- output secondary if it exists -->
<xsl:if test="./secondary">
<xsl:text>!</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="normalize-space(./secondary)"/>
</xsl:call-template>
</xsl:if>
<!-- output tertiary if it exists -->
<xsl:if test="./tertiary">
<xsl:text>!</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="normalize-space(./tertiary)"/>
</xsl:call-template>
</xsl:if>
<!-- idem with see/seealso -->
<xsl:if test="./see">
<xsl:text>|see{</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="normalize-space(./see)"/>
</xsl:call-template>
<xsl:text>}</xsl:text>
</xsl:if>
<xsl:if test="./seealso">
<xsl:text>|see{</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="normalize-space(./seealso)"/>
</xsl:call-template>
<xsl:text>}</xsl:text>
</xsl:if>
<xsl:text>}</xsl:text>
</xsl:template>
<xsl:template match="primary|secondary|tertiary|see|seealso"/>
<xsl:template match="indexentry"/>
<xsl:template match="primaryie|secondaryie|tertiaryie|seeie|seealsoie"/>
</xsl:stylesheet>
|