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 <!-- <modulesynopsis> -->
29 <!-- Process an entire document into an HTML page -->
30 <!-- ==================================================================== -->
31 <xsl:template match="modulesynopsis">
32 <html xml:lang="{$doclang}" lang="{$doclang}">
33 <xsl:call-template name="head" />&lf;
36 <xsl:call-template name="top" />&lf;
38 <div id="page-content">&lf;
42 <xsl:when test="status='Core'">
43 <xsl:value-of select="$message
44 [@id='apachecore']" />
46 <xsl:when test="name='mpm_common'">
47 <xsl:value-of select="$message
48 [@id='apachempmcommon']" />
50 <xsl:when test="status='MPM'">
51 <xsl:value-of select="$message
53 <xsl:text> </xsl:text>
54 <xsl:call-template name="module-translatename">
55 <xsl:with-param name="name" select="name" />
59 <xsl:value-of select="$message
60 [@id='apachemodule']" />
61 <xsl:text> </xsl:text>
62 <xsl:value-of select="name" />
67 <xsl:call-template name="langavail" />&lf;
69 <!-- Description and module-headers -->
70 <table class="module">
73 <a href="module-dict.html#Description">
74 <xsl:value-of select="$message
75 [@id='description']" />
76 <xsl:text>:</xsl:text>
80 <xsl:apply-templates select="description" />
85 <a href="module-dict.html#Status">
86 <xsl:value-of select="$message
88 <xsl:text>:</xsl:text>
92 <xsl:variable name="status" select="translate(
93 status, $uppercase, $lowercase)"/>
95 <xsl:when test="status = 'External' and status/@href">
96 <a href="{status/@href}">
97 <xsl:value-of select="$message[@id=$status]"/>
102 select="$message[@id=$status]"/>
108 <xsl:if test="identifier">&lf;
111 <a href="module-dict.html#ModuleIdentifier">
112 <xsl:value-of select="$message
113 [@id='moduleidentifier']" />
114 <xsl:text>:</xsl:text>
118 <xsl:value-of select="identifier" />
123 <xsl:if test="sourcefile">&lf;
126 <a href="module-dict.html#SourceFile">
127 <xsl:value-of select="$message
128 [@id='sourcefile']" />
129 <xsl:text>:</xsl:text>
133 <xsl:value-of select="sourcefile" />
138 <xsl:if test="compatibility">&lf;
141 <a href="module-dict.html#Compatibility">
142 <xsl:value-of select="$message
143 [@id='compatibility']" />
144 <xsl:text>:</xsl:text>
148 <xsl:apply-templates select="compatibility" />
154 <!-- Summary of module features/usage (1 to 3 paragraphs, -->
156 <xsl:if test="summary">
158 <xsl:value-of select="$message
162 <xsl:apply-templates select="summary" />
164 </div>&lf; <!-- /#preamble -->
166 <xsl:if test="not($is-chm) or seealso">
168 <xsl:if test="not($is-chm)">
169 <h3 class="directives">
170 <xsl:value-of select="$message
171 [@id='directives']" />
175 <xsl:when test="document($metafile/@reference)
176 /modulesynopsis/directivesynopsis">
179 select="document($metafile/@reference)
180 /modulesynopsis/directivesynopsis">
181 <xsl:sort select="name" />
182 <xsl:variable name="lowername"
183 select="translate(name, $uppercase,
187 <xsl:when test="not(@location)">
189 <img src="{$path}/images/down.gif"
191 <xsl:text> </xsl:text>
192 <a href="#{$lowername}">
193 <xsl:if test="@type='section'"
195 <xsl:value-of select="name" />
196 <xsl:if test="@type='section'"
202 <xsl:variable name="lowerlocation"
203 select="translate(@location, $uppercase,
206 <img src="{$path}/images/right.gif"
208 <xsl:text> </xsl:text>
209 <a href="{$lowerlocation}.html#{
211 <xsl:if test="@type='section'"
213 <xsl:value-of select="name" />
214 <xsl:if test="@type='section'"
221 </ul>&lf; <!-- /toc -->
222 </xsl:when> <!-- have directives -->
226 <xsl:value-of select="$message
227 [@id='nodirectives']" />
232 <xsl:if test="section">
234 <xsl:value-of select="$message
240 select="section" mode="index" />
243 </xsl:if> <!-- /!is-chm -->
245 <xsl:if test="seealso">
247 <xsl:value-of select="$message
251 <ul class="seealso">&lf;
252 <xsl:for-each select="seealso">
254 <xsl:apply-templates />
259 </div> <!-- /#quickview -->
260 </xsl:if>&lf; <!-- have sidebar -->
262 <!-- Sections of documentation about the module as a whole -->
263 <xsl:apply-templates select="section" />&lf;
265 <xsl:variable name="this" select="directivesynopsis" />
267 <!-- Directive documentation -->
268 <xsl:for-each select="document($metafile/@reference)
269 /modulesynopsis/directivesynopsis">
270 <xsl:sort select="name" />
272 <xsl:when test="$this[name=current()/name]">
273 <xsl:apply-templates select="$this[name=current()/name]" />
276 <xsl:apply-templates select=".">
277 <xsl:with-param name="translated" select="'no'" />
278 </xsl:apply-templates>
282 </div>&lf; <!-- /#page-content -->
284 <xsl:call-template name="bottom" />&lf;
288 <!-- /modulesynopsis -->
291 <!-- ==================================================================== -->
292 <!-- Directivesynopsis -->
293 <!-- ==================================================================== -->
294 <xsl:template match="directivesynopsis">
295 <xsl:param name="translated" select="'yes'" />
297 <xsl:if test="not(@location)">
298 <xsl:call-template name="toplink" />&lf;
300 <div class="directive-section">
301 <xsl:variable name="lowername"
302 select="translate(name, $uppercase, $lowercase)" />
304 <!-- Directive heading gets both mixed case and lowercase -->
305 <!-- anchors, and includes lt/gt only for "section" directives -->
307 <a id="{name}" name="{name}">
308 <xsl:if test="@type='section'"><</xsl:if>
309 <xsl:value-of select="name" />
310 <xsl:if test="@type='section'">></xsl:if>
314 <xsl:when test="$message
315 [@id='directive']/@replace-space-with">
316 <xsl:value-of select="$message
317 [@id='directive']/@replace-space-with"/>
320 <xsl:text> </xsl:text>
324 <a id="{$lowername}" name="{$lowername}">
325 <xsl:value-of select="$message[@id='directive']" />
329 <!-- Directive header -->
330 <table class="directive">&lf;
333 <a href="directive-dict.html#Description">
334 <xsl:value-of select="$message
335 [@id='description']" />
336 <xsl:text>:</xsl:text>
340 <xsl:apply-templates select="description" />
346 <a href="directive-dict.html#Syntax">
347 <xsl:value-of select="$message[@id='syntax']" />
348 <xsl:text>:</xsl:text>
353 <xsl:apply-templates select="syntax" />
358 <xsl:if test="default">&lf;
361 <a href="directive-dict.html#Default">
362 <xsl:value-of select="$message[@id='default']" />
363 <xsl:text>:</xsl:text>
368 <xsl:apply-templates select="default" />
376 <a href="directive-dict.html#Context">
377 <xsl:value-of select="$message[@id='context']" />
378 <xsl:text>:</xsl:text>
382 <xsl:apply-templates select="contextlist" />
386 <xsl:if test="override">&lf;
389 <a href="directive-dict.html#Override">
390 <xsl:value-of select="$message[@id='override']"/>
391 <xsl:text>:</xsl:text>
395 <xsl:value-of select="override" />
402 <a href="directive-dict.html#Status">
403 <xsl:value-of select="$message[@id='status']" />
404 <xsl:text>:</xsl:text>
408 <xsl:variable name="status" select="translate(
409 ../status, $uppercase, $lowercase)"/>
410 <xsl:value-of select="$message[@id=$status]"/>
416 <a href="directive-dict.html#Module">
417 <xsl:value-of select="$message[@id='module']" />
418 <xsl:text>:</xsl:text>
423 <xsl:when test="modulelist">
424 <xsl:apply-templates select="modulelist" />
427 <xsl:value-of select="../name" />
433 <xsl:if test="compatibility">&lf;
436 <a href="directive-dict.html#Compatibility">
437 <xsl:value-of select="$message
438 [@id='compatibility']" />
439 <xsl:text>:</xsl:text>
443 <xsl:apply-templates select="compatibility" />
450 <xsl:when test="$translated = 'yes'">
451 <xsl:apply-templates select="usage" />&lf;
454 <p>The documentation of this directive was not translated yet.
455 Please refer to the English version.</p>
459 <xsl:if test="seealso">
461 <xsl:value-of select="$message[@id='seealso']" />
465 <xsl:for-each select="seealso">
467 <xsl:apply-templates />
472 </div>&lf; <!-- /.directive-section -->
475 <!-- /directivesynopsis -->
478 <!-- ==================================================================== -->
479 <!-- <contextlist> -->
480 <!-- ==================================================================== -->
481 <xsl:template match="contextlist">
482 <xsl:apply-templates select="context" />
484 <!-- /contextlist -->
487 <!-- ==================================================================== -->
489 <!-- Each entry is separeted with a comma -->
490 <!-- ==================================================================== -->
491 <xsl:template match="context">
493 <xsl:when test="normalize-space(.) = 'server config'">
494 <xsl:value-of select="$message[@id='serverconfig']" />
496 <xsl:when test="normalize-space(.) = 'virtual host'">
497 <xsl:value-of select="$message[@id='virtualhost']" />
499 <xsl:when test="normalize-space(.) = 'directory'">
500 <xsl:value-of select="$message[@id='directory']" />
502 <xsl:when test="normalize-space(.) = '.htaccess'">
503 <xsl:value-of select="$message[@id='htaccess']" />
505 <xsl:otherwise> <!-- error -->
506 <xsl:message terminate="yes">
507 unknown context: <xsl:value-of select="." />
512 <xsl:if test="position() != last()">
513 <xsl:text>, </xsl:text>
519 <!-- ==================================================================== -->
520 <!-- <modulelist> -->
521 <!-- ==================================================================== -->
522 <xsl:template match="modulelist">
523 <xsl:for-each select="module">
524 <xsl:call-template name="module" />
525 <xsl:if test="position() != last()">
526 <xsl:text>, </xsl:text>
533 <!-- ==================================================================== -->
534 <!-- modulesynopsis/compatibility -->
535 <!-- ==================================================================== -->
536 <xsl:template match="modulesynopsis/compatibility">
537 <xsl:apply-templates />
541 <!-- ==================================================================== -->
542 <!-- directivesynopsis/compatibility -->
543 <!-- ==================================================================== -->
544 <xsl:template match="directivesynopsis/compatibility">
545 <xsl:apply-templates />