~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to docs/manual/style/latex/moduleindex.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
 
 
3
<!--
 
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
 
10
 
 
11
     http://www.apache.org/licenses/LICENSE-2.0
 
12
 
 
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.
 
18
-->
 
19
 
 
20
<xsl:stylesheet version="1.0"
 
21
              xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 
22
                  xmlns="http://www.w3.org/1999/xhtml">
 
23
 
 
24
<!-- ==================================================================== -->
 
25
<!-- <moduleindex>                                                        -->
 
26
<!-- Builds the moduleindex page                                          -->
 
27
<!-- ==================================================================== -->
 
28
<xsl:template match="moduleindex">
 
29
 
 
30
  <xsl:variable name="metafile" select="document(/*/@metafile)/metafile" /> 
 
31
 
 
32
  <xsl:call-template name="section-title"/>
 
33
 
 
34
  <xsl:apply-templates select="summary"/>
 
35
 
 
36
  <xsl:call-template name="seealso"/>
 
37
 
 
38
   <xsl:text>\subsection*{</xsl:text>
 
39
   <xsl:value-of select="$message[@id='corefeatures']" />
 
40
   <xsl:text>}
 
41
 
 
42
\begin{description}
 
43
\item[</xsl:text>
 
44
    <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
 
45
                              [starts-with(., 'core.xml')])
 
46
                              /modulesynopsis/name"/>
 
47
    <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
 
48
    <xsl:value-of select="document(document($allmodules)/modulefilelist/modulefile
 
49
                              [starts-with(., 'core.xml')])
 
50
                              /modulesynopsis/name"/>
 
51
    <xsl:text>}) </xsl:text>
 
52
 
 
53
    <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
 
54
                                 [starts-with(., 'core.xml')])
 
55
                                 /modulesynopsis/description" />
 
56
 
 
57
    <xsl:text>
 
58
\item[</xsl:text>
 
59
 
 
60
    <xsl:apply-templates  select="document(document($allmodules)/modulefilelist/modulefile
 
61
                                  [starts-with(., 'mpm_common.xml')])
 
62
                                  /modulesynopsis/name" />
 
63
    <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
 
64
    <xsl:value-of select="document(document($allmodules)/modulefilelist/modulefile
 
65
                                   [starts-with(., 'mpm_common.xml')])
 
66
                                   /modulesynopsis/name"/>
 
67
    <xsl:text>}) </xsl:text>
 
68
    <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
 
69
                                         [starts-with(., 'mpm_common.xml')])
 
70
                                         /modulesynopsis/description" />
 
71
 
 
72
 
 
73
 
 
74
    <!-- and now the remaining MPMs -->
 
75
    <xsl:variable name="mpmmodules"
 
76
         select="document(document($allmodules)/modulefilelist/modulefile)
 
77
                 /modulesynopsis[status='MPM' and name != 'mpm_common']" />
 
78
    <xsl:variable name="translist">
 
79
      <xsl:call-template name="module-translist">
 
80
         <xsl:with-param name="modules" select="$mpmmodules" />
 
81
      </xsl:call-template>
 
82
    </xsl:variable>
 
83
 
 
84
    <xsl:for-each select="$mpmmodules">
 
85
      <xsl:sort select="substring-before(substring-after($translist,
 
86
                  concat('- ', translate(normalize-space(name), $lowercase,
 
87
                  $uppercase), ' ')), ' -')" />
 
88
 
 
89
      <xsl:text>
 
90
\item[</xsl:text>
 
91
      <xsl:apply-templates select="name"/>
 
92
      <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
 
93
      <xsl:value-of select="name"/>
 
94
      <xsl:text>}) </xsl:text>
 
95
 
 
96
      <xsl:apply-templates select="description" />
 
97
 
 
98
    </xsl:for-each>
 
99
 
 
100
    <xsl:text>\end{description}
 
101
 
 
102
</xsl:text>
 
103
 
 
104
    <!-- /core section -->
 
105
 
 
106
    <xsl:text>\section*{</xsl:text>
 
107
    <xsl:value-of select="$message[@id='othermodules']" />
 
108
    <xsl:text>}
 
109
\begin{description}
 
110
</xsl:text>
 
111
            
 
112
    <xsl:variable name="modules"
 
113
         select="document(document($allmodules)/modulefilelist/modulefile)
 
114
                 /modulesynopsis[status!='MPM' and status!='Core']" />
 
115
 
 
116
    <xsl:call-template name="mindex-of-letter">
 
117
       <xsl:with-param name="modules" select="$modules" />
 
118
    </xsl:call-template>
 
119
 
 
120
    <xsl:text>\end{description}
 
121
</xsl:text>
 
122
</xsl:template> 
 
123
<!-- /moduleindex -->
 
124
 
 
125
 
 
126
<!-- ==================================================================== -->
 
127
<!-- the working horse. builds list items of all modules starting with    -->
 
128
<!-- one letter when done, it calls itself to catch the next letter       -->
 
129
<!-- ==================================================================== -->
 
130
<xsl:template name="mindex-of-letter">
 
131
<xsl:param name="modules"/>
 
132
 
 
133
<xsl:variable name="translist">
 
134
    <xsl:call-template name="module-translist">
 
135
        <xsl:with-param name="modules" select="$modules" />
 
136
    </xsl:call-template>
 
137
</xsl:variable>
 
138
 
 
139
<xsl:for-each select="$modules">
 
140
<xsl:sort
 
141
    select="substring-before(substring-after($translist, concat('- ',
 
142
        translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')" />
 
143
 
 
144
<xsl:text>
 
145
\item[</xsl:text>
 
146
<xsl:apply-templates select="name"/>
 
147
<xsl:text>] (p.\ \pageref{/mod/</xsl:text>
 
148
<xsl:value-of select="name"/>
 
149
<xsl:text>}) </xsl:text>
 
150
 
 
151
        <xsl:apply-templates select="description" />
 
152
 
 
153
</xsl:for-each> <!-- /directives -->
 
154
 
 
155
</xsl:template>
 
156
<!-- /mindex-of-letter -->
 
157
 
 
158
<!-- ==================================================================== -->
 
159
<!-- define module name translations for sorting                          -->
 
160
<!--                                                                      -->
 
161
<!-- it's a kind of a hack...                                             -->
 
162
<!-- we build a string that contains the following data:                  -->
 
163
<!-- "- modulename sortname - modulename sortname - ..."                  -->
 
164
<!-- (with all data in uppercase)                                         -->
 
165
<!--                                                                      -->
 
166
<!-- So, the translation from modulename to sortname can be done with the -->
 
167
<!-- expression below:                                                    -->
 
168
<!--
 
169
       substring-before(
 
170
           substring-after($translist, 
 
171
                           concat('- ', translate(modulename,
 
172
                                                  $lowercase, $uppercase),
 
173
                                  ' ')
 
174
                           ),
 
175
           ' -')
 
176
                                                                          -->
 
177
<!-- ==================================================================== -->
 
178
<xsl:template name="module-translist">
 
179
<xsl:param name="modules" />
 
180
 
 
181
<xsl:text>-</xsl:text>
 
182
<xsl:for-each select="$modules">
 
183
    <xsl:variable name="sname" select="translate(normalize-space(name),
 
184
                                       $lowercase, $uppercase)" />
 
185
 
 
186
    <xsl:text> </xsl:text>
 
187
    <xsl:value-of select="$sname" />
 
188
    <xsl:text> </xsl:text>
 
189
    <xsl:call-template name="module-translatename">
 
190
        <xsl:with-param name="name" select="$sname" />
 
191
    </xsl:call-template>
 
192
    <xsl:text> -</xsl:text>
 
193
</xsl:for-each>
 
194
</xsl:template>
 
195
<!-- /module-translist -->
 
196
 
 
197
<xsl:template name="module-translatename">
 
198
<xsl:param name="name" />
 
199
 
 
200
<xsl:variable name="sname" select="translate($name, $lowercase, $uppercase)" />
 
201
 
 
202
<xsl:choose>
 
203
<xsl:when test="starts-with($sname, 'MOD_') or starts-with($sname, 'MPM_')">
 
204
    <xsl:value-of select="substring($name, 5)" />
 
205
</xsl:when>
 
206
 
 
207
<xsl:when test="starts-with($sname, 'MPMT_')">
 
208
    <xsl:value-of select="substring($name, 6)" />
 
209
</xsl:when>
 
210
 
 
211
<xsl:otherwise>
 
212
    <xsl:value-of select="$name" />
 
213
</xsl:otherwise>
 
214
</xsl:choose>
 
215
</xsl:template>
 
216
<!-- /module-translatename -->
 
217
 
 
218
</xsl:stylesheet>