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">
22 <!ENTITY para SYSTEM "util/para.xml">
24 <xsl:stylesheet version="1.0"
25 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
26 xmlns="http://www.w3.org/1999/xhtml">
28 <!-- ==================================================================== -->
29 <!-- <modulesynopsis> -->
30 <!-- Process an entire document into an HTML page -->
31 <!-- ==================================================================== -->
32 <xsl:template match="modulesynopsis">
33 <html xml:lang="{$doclang}" lang="{$doclang}">
34 <xsl:call-template name="head" />&lf;
37 <xsl:call-template name="top" />&lf;
39 <div id="page-content">&lf;
40 <xsl:call-template name="retired" />
45 <xsl:when test="status='Core'">
46 <xsl:value-of select="$message
47 [@id='apachecore']" />
49 <xsl:when test="name='mpm_common'">
50 <xsl:value-of select="$message
51 [@id='apachempmcommon']" />
53 <xsl:when test="status='MPM'">
54 <xsl:value-of select="$message
56 <xsl:text> </xsl:text>
57 <xsl:call-template name="module-translatename">
58 <xsl:with-param name="name" select="name" />
62 <xsl:value-of select="$message
63 [@id='apachemodule']" />
64 <xsl:text> </xsl:text>
65 <xsl:value-of select="name" />
70 <xsl:call-template name="langavail" />&lf;
72 <!-- Description and module-headers -->
73 <table class="module">
76 <a href="module-dict.html#Description">
77 <xsl:value-of select="$message
78 [@id='description']" />
79 <xsl:text>:</xsl:text>
83 <xsl:apply-templates select="description" />
88 <a href="module-dict.html#Status">
89 <xsl:value-of select="$message
91 <xsl:text>:</xsl:text>
95 <xsl:variable name="status" select="translate(
96 status, $uppercase, $lowercase)"/>
98 <xsl:when test="status = 'External' and status/@href">
99 <a href="{status/@href}">
100 <xsl:value-of select="$message[@id=$status]"/>
105 select="$message[@id=$status]"/>
111 <xsl:if test="identifier">&lf;
114 <a href="module-dict.html#ModuleIdentifier">
115 <xsl:value-of select="$message
116 [@id='moduleidentifier']" />
117 <xsl:text>:</xsl:text>
121 <xsl:value-of select="identifier" />
126 <xsl:if test="sourcefile">&lf;
129 <a href="module-dict.html#SourceFile">
130 <xsl:value-of select="$message
131 [@id='sourcefile']" />
132 <xsl:text>:</xsl:text>
136 <xsl:value-of select="sourcefile" />
141 <xsl:if test="compatibility">&lf;
144 <a href="module-dict.html#Compatibility">
145 <xsl:value-of select="$message
146 [@id='compatibility']" />
147 <xsl:text>:</xsl:text>
151 <xsl:apply-templates select="compatibility" />
157 <!-- Summary of module features/usage (1 to 3 paragraphs, -->
159 <xsl:if test="summary">
161 <xsl:value-of select="$message
165 <xsl:apply-templates select="summary" />
167 </div>&lf; <!-- /#preamble -->
169 <xsl:if test="not($is-chm) or seealso">
171 <xsl:if test="not($is-chm)">
172 <xsl:if test="section">
174 <xsl:value-of select="$message
180 select="section" mode="index" />
184 <h3 class="directives">
185 <xsl:value-of select="$message
186 [@id='directives']" />
190 <xsl:when test="document($metafile/@reference)
191 /modulesynopsis/directivesynopsis">
194 select="document($metafile/@reference)
195 /modulesynopsis/directivesynopsis">
196 <xsl:sort select="name" />
197 <xsl:variable name="lowername"
198 select="concat(translate(name, $uppercase,
199 $lowercase),@idtype)" />
202 <xsl:when test="not(@location)">
204 <img src="{$path}/images/down.gif"
206 <xsl:text> </xsl:text>
207 <a href="#{$lowername}">
208 <xsl:if test="@type='section'"
210 <xsl:value-of select="name" />
211 <xsl:if test="@type='section'"
217 <xsl:variable name="lowerlocation"
218 select="translate(@location, $uppercase,
221 <img src="{$path}/images/right.gif"
223 <xsl:text> </xsl:text>
224 <a href="{$lowerlocation}.html#{
226 <xsl:if test="@type='section'"
228 <xsl:value-of select="name" />
229 <xsl:if test="@type='section'"
236 </ul>&lf; <!-- /toc -->
237 </xsl:when> <!-- have directives -->
241 <xsl:value-of select="$message
242 [@id='nodirectives']" />
246 </xsl:if> <!-- /!is-chm -->
249 <xsl:value-of select="$message[@id='foundabug']" />
252 <!-- Bugzilla mpm components are prefixed with
253 'mpm_', meanwhile the page name in the docs do
254 not contain it. For example, Bugzilla has
255 the 'mpm_event' component and the doc has the
256 'event' page. This creates an inconsistency
257 in the URL generation, fixed by the following
259 <xsl:variable name="bugzilla_prefix">
261 <xsl:when test="name='worker' or name='event'
263 <xsl:value-of select="string('mpm_')"/>
268 <!-- The link below is not dynamic and points only
269 to the 2.4 release since it makes sense to keep
270 it as reference even for trunk. -->
271 <a href="https://www.apache.org/dist/httpd/CHANGES_2.4">
273 select="$message[@id='httpdchangelog']" />
277 <!-- The line below is not splitted in multiple
278 lines to avoid rendering a broken URL. -->
279 <a href="https://bz.apache.org/bugzilla/buglist.cgi?bug_status=__open__&list_id=144532&product=Apache%20httpd-2&query_format=specific&order=changeddate%20DESC%2Cpriority%2Cbug_severity&component={$bugzilla_prefix}{name}">
281 select="$message[@id='httpdknownissues']" />
285 <!-- The line below is not splitted in multiple
286 lines to avoid rendering a broken URL. -->
287 <a href="https://bz.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2&component={$bugzilla_prefix}{name}">
289 select="$message[@id='httpdreportabug']" />
293 <!-- The seealso section shows links to related documents
294 explicitly set in .xml docs or simply the comments. -->
295 <xsl:if test="seealso or not($is-chm or $is-zip or
296 $metafile/basename = 'index')">
298 <xsl:value-of select="$message
302 <ul class="seealso">&lf;
303 <xsl:for-each select="seealso">
305 <xsl:apply-templates />
308 <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
309 <li><a href="#comments_section"><xsl:value-of
310 select="$message[@id='comments']" /></a>
315 </div> <!-- /#quickview -->
316 </xsl:if>&lf; <!-- have sidebar -->
318 <!-- Sections of documentation about the module as a whole -->
319 <xsl:apply-templates select="section" />&lf;
321 <xsl:variable name="this" select="directivesynopsis" />
323 <!-- Directive documentation -->
324 <xsl:for-each select="document($metafile/@reference)
325 /modulesynopsis/directivesynopsis">
326 <xsl:sort select="name" />
328 <xsl:when test="$this[name=current()/name]">
329 <!-- A directive name is allowed to be repeated if its type
330 is different. There is currently only one allowed type
331 to set, namely 'section', that represents
332 directive/containers like <DirectiveName>.
333 The following check is needed to avoid rendering
334 multiple times the same content when a directive name
338 <xsl:when test="@type='section'">
339 <xsl:apply-templates select="$this[name=current()/name and @type='section']" />
342 <xsl:apply-templates select="$this[name=current()/name and not(@type='section')]" />
347 <xsl:apply-templates select=".">
348 <xsl:with-param name="translated" select="'no'" />
349 </xsl:apply-templates>
353 </div>&lf; <!-- /#page-content -->
355 <xsl:call-template name="bottom" />&lf;
359 <!-- /modulesynopsis -->
362 <!-- ==================================================================== -->
363 <!-- Directivesynopsis -->
364 <!-- ==================================================================== -->
365 <xsl:template match="directivesynopsis">
366 <xsl:param name="translated" select="'yes'" />
368 <xsl:if test="not(@location)">
369 <xsl:call-template name="toplink" />&lf;
371 <div class="directive-section">
372 <!-- Concatenate the Directive name with its type to allow
373 a directive to be referenced multiple times
374 with different types -->
375 <xsl:variable name="lowername"
376 select="concat(translate(name, $uppercase, $lowercase),@idtype)" />
377 <xsl:variable name="directivename" select="concat(name,@idtype)" />
378 <!-- Directive heading gets both mixed case and lowercase -->
379 <!-- anchors, and includes lt/gt only for "section" directives -->
382 <xsl:when test="$message
383 [@id='directive']/@before-name = 'yes'">
384 <a id="{$lowername}" name="{$lowername}">
385 <xsl:value-of select="$message[@id='directive']" />
389 <xsl:when test="$message
390 [@id='directive']/@replace-space-with">
391 <xsl:value-of select="$message
392 [@id='directive']/@replace-space-with"/>
395 <xsl:text> </xsl:text>
399 <a id="{$directivename}" name="{$directivename}">
400 <xsl:if test="@type='section'"><</xsl:if>
401 <xsl:value-of select="name" />
402 <xsl:if test="@type='section'">></xsl:if>
407 <a id="{$directivename}" name="{$directivename}">
408 <xsl:if test="@type='section'"><</xsl:if>
409 <xsl:value-of select="name" />
410 <xsl:if test="@type='section'">></xsl:if>
414 <xsl:when test="$message
415 [@id='directive']/@replace-space-with">
416 <xsl:value-of select="$message
417 [@id='directive']/@replace-space-with"/>
420 <xsl:text> </xsl:text>
424 <a id="{$lowername}" name="{$lowername}">
425 <xsl:value-of select="$message[@id='directive']" />
429 <xsl:text> </xsl:text>
430 <a class="permalink" href="#{$lowername}" title="{$message[@id='permalink']}">¶</a>
433 <!-- Directive header -->
434 <table class="directive">&lf;
437 <a href="directive-dict.html#Description">
438 <xsl:value-of select="$message
439 [@id='description']" />
440 <xsl:text>:</xsl:text>
444 <xsl:apply-templates select="description" />
450 <a href="directive-dict.html#Syntax">
451 <xsl:value-of select="$message[@id='syntax']" />
452 <xsl:text>:</xsl:text>
457 <xsl:apply-templates select="syntax" />
462 <xsl:if test="default">&lf;
465 <a href="directive-dict.html#Default">
466 <xsl:value-of select="$message[@id='default']" />
467 <xsl:text>:</xsl:text>
472 <xsl:apply-templates select="default" />
480 <a href="directive-dict.html#Context">
481 <xsl:value-of select="$message[@id='context']" />
482 <xsl:text>:</xsl:text>
486 <xsl:apply-templates select="contextlist" />
490 <xsl:if test="override">&lf;
493 <a href="directive-dict.html#Override">
494 <xsl:value-of select="$message[@id='override']"/>
495 <xsl:text>:</xsl:text>
499 <xsl:value-of select="override" />
506 <a href="directive-dict.html#Status">
507 <xsl:value-of select="$message[@id='status']" />
508 <xsl:text>:</xsl:text>
512 <xsl:variable name="status" select="translate(
513 ../status, $uppercase, $lowercase)"/>
514 <xsl:value-of select="$message[@id=$status]"/>
520 <a href="directive-dict.html#Module">
521 <xsl:value-of select="$message[@id='module']" />
522 <xsl:text>:</xsl:text>
527 <xsl:when test="modulelist">
528 <xsl:apply-templates select="modulelist" />
531 <xsl:value-of select="../name" />
537 <xsl:if test="compatibility">&lf;
540 <a href="directive-dict.html#Compatibility">
541 <xsl:value-of select="$message
542 [@id='compatibility']" />
543 <xsl:text>:</xsl:text>
547 <xsl:apply-templates select="compatibility" />
554 <xsl:when test="$translated = 'yes'">
555 <xsl:apply-templates select="usage" />&lf;
558 <p><xsl:value-of select="$message[@id='nottranslated']" /></p>
562 <xsl:if test="seealso">
564 <xsl:value-of select="$message[@id='seealso']" />
568 <xsl:for-each select="seealso">
570 <xsl:apply-templates />
575 </div>&lf; <!-- /.directive-section -->
578 <!-- /directivesynopsis -->
581 <!-- ==================================================================== -->
582 <!-- <contextlist> -->
583 <!-- ==================================================================== -->
584 <xsl:template match="contextlist">
585 <xsl:apply-templates select="context" />
587 <!-- /contextlist -->
590 <!-- ==================================================================== -->
592 <!-- Each entry is separeted with a comma -->
593 <!-- ==================================================================== -->
594 <xsl:template match="context">
596 <xsl:when test="normalize-space(.) = 'server config'">
597 <xsl:value-of select="$message[@id='serverconfig']" />
599 <xsl:when test="normalize-space(.) = 'virtual host'">
600 <xsl:value-of select="$message[@id='virtualhost']" />
602 <xsl:when test="normalize-space(.) = 'directory'">
603 <xsl:value-of select="$message[@id='directory']" />
605 <xsl:when test="normalize-space(.) = '.htaccess'">
606 <xsl:value-of select="$message[@id='htaccess']" />
608 <xsl:when test="normalize-space(.) = 'proxy section'">
609 <xsl:value-of select="$message[@id='proxy']" />
611 <xsl:otherwise> <!-- error -->
612 <xsl:message terminate="yes">
613 unknown context: <xsl:value-of select="." />
618 <xsl:if test="position() != last()">
619 <xsl:text>, </xsl:text>
625 <!-- ==================================================================== -->
626 <!-- <modulelist> -->
627 <!-- ==================================================================== -->
628 <xsl:template match="modulelist">
629 <xsl:for-each select="module">
630 <xsl:call-template name="module" />
631 <xsl:if test="position() != last()">
632 <xsl:text>, </xsl:text>
639 <!-- ==================================================================== -->
640 <!-- modulesynopsis/compatibility -->
641 <!-- ==================================================================== -->
642 <xsl:template match="modulesynopsis/compatibility">
643 <xsl:apply-templates />
647 <!-- ==================================================================== -->
648 <!-- directivesynopsis/compatibility -->
649 <!-- ==================================================================== -->
650 <xsl:template match="directivesynopsis/compatibility">
651 <xsl:apply-templates />