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
<xsl:stylesheet version="1.0"
21
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22
xmlns="http://www.w3.org/1999/xhtml">
25
<!-- ==================================================================== -->
26
<!-- <modulesynopsis> -->
27
<!-- ==================================================================== -->
29
<xsl:template match="modulesynopsis">
31
<xsl:text>\section{</xsl:text>
33
<xsl:when test="../status='Core'">
34
<xsl:value-of select="$message[@id='apachecore']" />
36
<xsl:when test=".='mpm_common'">
37
<xsl:value-of select="$message[@id='apachempmcommon']" />
39
<xsl:when test="../status='MPM'">
40
<xsl:value-of select="$message[@id='apachempm']" />
41
<xsl:text> </xsl:text>
42
<xsl:apply-templates select="name"/>
45
<xsl:value-of select="$message[@id='apachemodule']" />
46
<xsl:text> </xsl:text>
47
<xsl:apply-templates select="name"/>
50
<xsl:text>}\label{</xsl:text>
51
<xsl:value-of select="concat('/mod/',name)"/>
52
<xsl:text>}\hypertarget{</xsl:text>
53
<xsl:value-of select="concat('/mod/',name)"/>
54
<xsl:text>}{}</xsl:text>
57
\begin{tabular}{lp{.75\linewidth}}
60
<xsl:value-of select="$message[@id='description']" />
61
<xsl:text>: &</xsl:text>
62
<xsl:apply-templates select="description" />
66
<xsl:value-of select="$message[@id='status']" />
67
<xsl:text>: &</xsl:text>
68
<xsl:value-of select="status" />
72
<xsl:if test="identifier">
73
<xsl:value-of select="$message[@id='moduleidentifier']" />
74
<xsl:text>: &</xsl:text>
75
<xsl:apply-templates select="identifier" />
80
<xsl:if test="sourcefile">
81
<xsl:value-of select="$message[@id='sourcefile']" />
82
<xsl:text>: &</xsl:text>
83
<xsl:apply-templates select="sourcefile" />
88
<xsl:if test="compatibility">
89
<xsl:value-of select="$message[@id='compatibility']" />
90
<xsl:text>: &</xsl:text>
91
<xsl:apply-templates select="compatibility" />
95
<xsl:text>\hline \end{tabular}
97
<!-- Summary of module features/usage (1 to 3 paragraphs, -->
99
<xsl:if test="summary">
100
<xsl:text>\subsection*{</xsl:text>
101
<xsl:value-of select="$message[@id='summary']" />
104
<xsl:apply-templates select="summary" />
108
\smallskip\textbf{</xsl:text>
109
<xsl:value-of select="$message[@id='directives']" />
114
<xsl:when test="directivesynopsis">
115
<xsl:text>\begin{itemize}</xsl:text>
116
<xsl:for-each select="directivesynopsis">
117
<xsl:sort select="name" />
118
<xsl:text>\item </xsl:text>
119
<xsl:if test="@type='section'">
120
<xsl:text>\textless{}</xsl:text>
122
<xsl:apply-templates select="name" mode="simple"/>
123
<xsl:if test="@type='section'">
124
<xsl:text>\textgreater{}</xsl:text>
126
<xsl:if test="@location">
127
<xsl:variable name="lowerlocation"
128
select="translate(@location, $uppercase, $lowercase)" />
129
<xsl:text> (p.\ \pageref{/mod/</xsl:text>
130
<xsl:value-of select="concat(translate(@location,$uppercase,$lowercase),':',translate(name,$uppercase,$lowercase))"/>
131
<xsl:text>}) </xsl:text>
136
<xsl:text>\end{itemize}
140
<xsl:value-of select="$message[@id='nodirectives']" />
149
<xsl:call-template name="seealso"/>
151
<!-- Sections of documentation about the module as a whole -->
152
<xsl:apply-templates select="section" />
154
<!-- Directive documentation -->
155
<xsl:apply-templates select="directivesynopsis">
156
<xsl:sort select="name" />
157
</xsl:apply-templates>
160
<!-- /modulesynopsis -->
163
<!-- ==================================================================== -->
164
<!-- Directivesynopsis -->
165
<!-- ==================================================================== -->
166
<xsl:template match="directivesynopsis/name" mode="simple" name="simpledirname">
167
<xsl:if test="@type='section'"><xsl:text>\textless{}</xsl:text></xsl:if>
168
<xsl:apply-templates/>
169
<xsl:if test="@type='section'"><xsl:text>\textgreater{}</xsl:text></xsl:if>
172
<xsl:template match="directivesynopsis/name">
173
<xsl:text>\subsection*{</xsl:text>
174
<xsl:call-template name="simpledirname"/>
176
<xsl:when test="$message[@id='directive']/@replace-space-with">
177
<xsl:value-of select="$message[@id='directive']/@replace-space-with"/>
180
<xsl:text> </xsl:text>
184
<xsl:value-of select="$message[@id='directive']" />
185
<xsl:text>}\label{</xsl:text>
186
<xsl:value-of select="concat('/mod/', //modulesynopsis/name, ':', translate(., $uppercase, $lowercase))"/>
187
<xsl:text>}\hypertarget{</xsl:text>
188
<xsl:value-of select="concat('/mod/', //modulesynopsis/name, ':', translate(., $uppercase, $lowercase))"/>
189
<xsl:text>}{}</xsl:text>
193
<xsl:template match="directivesynopsis">
194
<xsl:if test="not(@location)">
195
<xsl:apply-templates select="name"/>
196
<!-- Directive header -->
198
\begin{tabular}{lp{.8\linewidth}}
201
<xsl:value-of select="$message[@id='description']" />
202
<xsl:text>: & </xsl:text>
203
<xsl:apply-templates select="description" />
207
<xsl:value-of select="$message[@id='syntax']" />
208
<xsl:text>: & {\ttfamily </xsl:text>
209
<xsl:apply-templates select="syntax" />
213
<xsl:if test="default">
214
<xsl:value-of select="$message[@id='default']" />
215
<xsl:text>: & {\ttfamily </xsl:text>
216
<xsl:apply-templates select="default" />
221
<xsl:value-of select="$message[@id='context']" />
222
<xsl:text>: &</xsl:text>
223
<xsl:apply-templates select="contextlist" />
227
<xsl:if test="override">
228
<xsl:value-of select="$message[@id='override']"/>
229
<xsl:text>: &</xsl:text>
230
<xsl:apply-templates select="override" />
235
<xsl:value-of select="$message[@id='status']" />
236
<xsl:text>: &</xsl:text>
237
<xsl:value-of select="../status" />
241
<xsl:value-of select="$message[@id='module']" />
242
<xsl:text>: &</xsl:text>
244
<xsl:when test="modulelist">
245
<xsl:apply-templates select="modulelist" />
248
<xsl:apply-templates select="../name" />
254
<xsl:if test="compatibility">
255
<xsl:value-of select="$message[@id='compatibility']" />
256
<xsl:text>: &</xsl:text>
257
<xsl:apply-templates select="compatibility" />
267
<xsl:apply-templates select="usage" />
269
<xsl:call-template name="seealso"/>
271
</xsl:if> <!-- /not(@location) -->
273
<!-- /directivesynopsis -->
276
<!-- ==================================================================== -->
277
<!-- <contextlist> -->
278
<!-- ==================================================================== -->
279
<xsl:template match="contextlist">
280
<xsl:apply-templates select="context" />
282
<!-- /contextlist -->
285
<!-- ==================================================================== -->
287
<!-- Each entry is separeted with a comma -->
288
<!-- ==================================================================== -->
289
<xsl:template match="context">
291
<xsl:when test="normalize-space(.) = 'server config'">
292
<xsl:value-of select="$message[@id='serverconfig']" />
294
<xsl:when test="normalize-space(.) = 'virtual host'">
295
<xsl:value-of select="$message[@id='virtualhost']" />
297
<xsl:when test="normalize-space(.) = 'directory'">
298
<xsl:value-of select="$message[@id='directory']" />
300
<xsl:when test="normalize-space(.) = '.htaccess'">
301
<xsl:value-of select="$message[@id='htaccess']" />
303
<xsl:otherwise> <!-- error -->
304
<xsl:message terminate="yes">
305
unknown context: <xsl:value-of select="." />
310
<xsl:if test="position() != last()">
311
<xsl:text>, </xsl:text>
317
<!-- ==================================================================== -->
318
<!-- <modulelist> -->
319
<!-- ==================================================================== -->
320
<xsl:template match="modulelist">
321
<xsl:for-each select="module">
322
<xsl:call-template name="module" />
323
<xsl:if test="position() != last()">
324
<xsl:text>, </xsl:text>
331
<!-- ==================================================================== -->
332
<!-- modulesynopsis/compatibility -->
333
<!-- ==================================================================== -->
334
<xsl:template match="modulesynopsis/compatibility">
335
<xsl:apply-templates />
339
<!-- ==================================================================== -->
340
<!-- directivesynopsis/compatibility -->
341
<!-- ==================================================================== -->
342
<xsl:template match="directivesynopsis/compatibility">
343
<xsl:apply-templates />