4
Licensed to the Apache Software Foundation (ASF) under one or more
5
contributor license agreements. See the NOTICE file distributed with
6
this work for additional information regarding copyright ownership.
7
The ASF licenses this file to You under the Apache License, Version 2.0
8
(the "License"); you may not use this file except in compliance with
9
the License. You may obtain a copy of the License at
11
http://www.apache.org/licenses/LICENSE-2.0
13
Unless required by applicable law or agreed to in writing, software
14
distributed under the License is distributed on an "AS IS" BASIS,
15
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
See the License for the specific language governing permissions and
17
limitations under the License.
20
<!DOCTYPE xsl:stylesheet [
21
<!ENTITY lf SYSTEM "util/lf.xml">
23
<xsl:stylesheet version="1.0"
24
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25
xmlns="http://www.w3.org/1999/xhtml">
27
<!-- ==================================================================== -->
28
<!-- <moduleindex> -->
29
<!-- Builds the moduleindex page -->
30
<!-- ==================================================================== -->
31
<xsl:template match="moduleindex">
32
<html xml:lang="{$doclang}" lang="{$doclang}">
33
<xsl:call-template name="head"/>&lf;
35
<body id="module-index">
36
<xsl:call-template name="top"/>
38
<div id="page-content">
41
<xsl:value-of select="title" />
44
<xsl:call-template name="langavail" />&lf;
46
<xsl:apply-templates select="summary" />
47
</div>&lf; <!-- /#preamble -->
49
<xsl:if test="not($is-chm) or seealso">
51
<xsl:if test="not($is-chm)">
54
<img src="{$path}/images/down.gif" alt="" />
55
<xsl:text> </xsl:text>
57
<xsl:value-of select="$message
58
[@id='corefeatures']" />
62
<img src="{$path}/images/down.gif" alt="" />
63
<xsl:text> </xsl:text>
65
<xsl:value-of select="$message
66
[@id='othermodules']" />
70
</xsl:if> <!-- !$is-chm -->
72
<xsl:if test="seealso">
74
<xsl:value-of select="$message
78
<ul class="seealso">&lf;
79
<xsl:for-each select="seealso">
81
<xsl:apply-templates />
85
</xsl:if> <!-- /seealso -->
86
</div> <!-- /#quickview -->
87
</xsl:if>&lf; <!-- have sidebar -->
89
<xsl:call-template name="toplink" />&lf;
93
<a name="core" id="core">
94
<xsl:value-of select="$message
95
[@id='corefeatures']" />
102
<a href="{document(document($allmodules)/modulefilelist
103
/modulefile[starts-with(., 'core.xml')])
104
/modulesynopsis/name}.html">
106
select="document(document($allmodules)/modulefilelist
107
/modulefile[starts-with(., 'core.xml')])
108
/modulesynopsis/name" />
113
select="document(document($allmodules)/modulefilelist
114
/modulefile[starts-with(., 'core.xml')])
115
/modulesynopsis/description" />
120
<a href="{document(document($allmodules)/modulefilelist
121
/modulefile[starts-with(., 'mpm_common.xml')])
122
/modulesynopsis/name}.html">
124
select="document(document($allmodules)/modulefilelist
125
/modulefile[starts-with(., 'mpm_common.xml')])
126
/modulesynopsis/name" />
129
<dd class="separate">
131
select="document(document($allmodules)/modulefilelist
132
/modulefile[starts-with(., 'mpm_common.xml')])
133
/modulesynopsis/description" />
136
<!-- and now the remaining MPMs -->
137
<xsl:variable name="mpmmodules"
138
select="document(document($allmodules)/modulefilelist/modulefile)
140
[status='MPM' and name != 'mpm_common']" />
141
<xsl:variable name="translist">
142
<xsl:call-template name="module-translist">
143
<xsl:with-param name="modules" select="$mpmmodules" />
147
<xsl:for-each select="$mpmmodules">
148
<xsl:sort select="substring-before(substring-after($translist,
149
concat('- ', translate(normalize-space(name), $lowercase,
150
$uppercase), ' ')), ' -')" />
153
<a href="{name}.html">
154
<xsl:value-of select="name" />
158
<xsl:apply-templates select="description" />
162
</div>&lf; <!-- /core section -->
164
<xsl:call-template name="toplink" />&lf;
166
<div class="section">
168
<a name="other" id="other">
169
<xsl:value-of select="$message
170
[@id='othermodules']" />
174
<xsl:variable name="modules"
175
select="document(document($allmodules)/modulefilelist/modulefile)
176
/modulesynopsis[status!='MPM' and
179
<xsl:variable name="start-letters">
180
<xsl:call-template name="module-startletters">
181
<xsl:with-param name="modules" select="$modules" />
186
<xsl:call-template name="letter-bar">
187
<xsl:with-param name="letters" select="$start-letters"/>
188
<xsl:with-param name="first" select="true()"/>
193
<xsl:call-template name="mindex-of-letter">
194
<xsl:with-param name="letters-todo"
195
select="$start-letters" />
196
<xsl:with-param name="modules" select="$modules" />
199
</div> <!-- /modules section -->
200
</div>&lf; <!-- /#page-content -->
202
<xsl:call-template name="bottom" />&lf;
206
<!-- /moduleindex -->
209
<!-- ==================================================================== -->
210
<!-- the working horse. builds list items of all modules starting with -->
211
<!-- one letter when done, it calls itself to catch the next letter -->
212
<!-- ==================================================================== -->
213
<xsl:template name="mindex-of-letter">
214
<xsl:param name="letters-todo"/>
215
<xsl:param name="modules"/>
217
<xsl:variable name="letter" select="substring($letters-todo, 1, 1)" />
218
<xsl:variable name="translist">
219
<xsl:call-template name="module-translist">
220
<xsl:with-param name="modules" select="$modules" />
225
select="$modules[$letter=substring(substring-before(substring-after(
226
$translist, concat('- ', translate(normalize-space(name), $lowercase,
227
$uppercase), ' ')), ' -'), 1, 1)]">
229
select="substring-before(substring-after($translist, concat('- ',
230
translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')" />
233
<a href="{name}.html">
234
<xsl:if test="position() = 1">
235
<xsl:attribute name="id">
236
<xsl:value-of select="$letter" />
238
<xsl:attribute name="name">
239
<xsl:value-of select="$letter" />
243
<xsl:value-of select="name" />
247
<xsl:apply-templates select="description" />
249
</xsl:for-each> <!-- /directives -->
251
<!-- call next letter, if there is -->
252
<xsl:if test="string-length($letters-todo) > 1">
253
<xsl:call-template name="mindex-of-letter">
254
<xsl:with-param name="letters-todo"
255
select="substring($letters-todo, 2)" />
256
<xsl:with-param name="modules" select="$modules" />
260
<!-- /mindex-of-letter -->
263
<!-- ==================================================================== -->
264
<!-- collect start letters of modules -->
265
<!-- ==================================================================== -->
266
<xsl:template name="module-startletters">
267
<xsl:param name="modules" />
269
<xsl:variable name="translist">
270
<xsl:call-template name="module-translist">
271
<xsl:with-param name="modules" select="$modules" />
275
<xsl:call-template name="_squeeze-letters">
276
<xsl:with-param name="lastletter" select="''" />
277
<xsl:with-param name="letters">
278
<xsl:for-each select="$modules">
280
select="substring-before(substring-after($translist, concat('- ',
281
translate(normalize-space(name), $lowercase, $uppercase), ' ')),
284
select="substring(substring-before(substring-after($translist,
285
concat('- ', translate(normalize-space(name), $lowercase,
286
$uppercase), ' ')), ' -'), 1, 1)" />
291
<!-- /module-startletters -->
294
<!-- ==================================================================== -->
295
<!-- define module name translations for sorting -->
297
<!-- it's a kind of a hack... -->
298
<!-- we build a string that contains the following data: -->
299
<!-- "- modulename sortname - modulename sortname - ..." -->
300
<!-- (with all data in uppercase) -->
302
<!-- So, the translation from modulename to sortname can be done with the -->
303
<!-- expression below: -->
306
substring-after($translist,
307
concat('- ', translate(modulename,
308
$lowercase, $uppercase),
313
<!-- ==================================================================== -->
314
<xsl:template name="module-translist">
315
<xsl:param name="modules" />
317
<xsl:text>-</xsl:text>
318
<xsl:for-each select="$modules">
319
<xsl:variable name="sname" select="translate(normalize-space(name),
320
$lowercase, $uppercase)" />
322
<xsl:text> </xsl:text>
323
<xsl:value-of select="$sname" />
324
<xsl:text> </xsl:text>
325
<xsl:call-template name="module-translatename">
326
<xsl:with-param name="name" select="$sname" />
328
<xsl:text> -</xsl:text>
331
<!-- /module-translist -->