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
<!-- <quickreference> -->
29
<!-- Builds the directive quickreference page -->
30
<!-- ==================================================================== -->
31
<xsl:template match="quickreference">
32
<html xml:lang="{$doclang}" lang="{$doclang}">
33
<xsl:call-template name="head"/>&lf;
35
<body id="directive-index">&lf;
36
<xsl:call-template name="top"/>&lf;
40
<xsl:value-of select="title" />
43
<xsl:call-template name="langavail" />&lf;
45
<xsl:apply-templates select="summary" />
46
</div>&lf; <!-- /#preamble -->
48
<div id="directive-ref">
49
<xsl:variable name="directives"
50
select="document(document($allmodules)/modulefilelist/modulefile)
51
/modulesynopsis/directivesynopsis[not(@location)]" />
53
<xsl:variable name="start-letters">
54
<xsl:call-template name="directive-startletters">
55
<xsl:with-param name="directives" select="$directives" />
59
<table id="legend">&lf;
63
<xsl:call-template name="letter-bar">
64
<xsl:with-param name="letters"
65
select="$start-letters" />
66
<xsl:with-param name="first" select="true()" />
71
<xsl:apply-templates select="legend/table[position()=1]" />
74
<xsl:apply-templates select="legend/table[position()=2]" />
79
<table class="qref">&lf;
80
<xsl:call-template name="reference-of-letter">
81
<xsl:with-param name="letters-todo" select="$start-letters" />
82
<xsl:with-param name="offset" select="number(0)" />
83
<xsl:with-param name="directives" select="$directives" />
86
</div>&lf; <!-- /#directive-ref -->
88
<xsl:call-template name="bottom"/>&lf;
92
<!-- /quickreference -->
95
<!-- ==================================================================== -->
96
<!-- the working horse. builds rows of all directives starting with one -->
97
<!-- letter when done, it calls itself to catch the next letter -->
98
<!-- ==================================================================== -->
99
<xsl:template name="reference-of-letter">
100
<xsl:param name="letters-todo" />
101
<xsl:param name="offset" />
102
<xsl:param name="directives" />
104
<xsl:variable name="letter" select="substring($letters-todo, 1, 1)" />
107
select="$directives[$letter=translate(substring(normalize-space(name), 1,1),
108
$lowercase,$uppercase)]">
109
<xsl:sort select="name" />
112
<xsl:if test="position() mod 2 = $offset">
113
<xsl:attribute name="class">odd</xsl:attribute>
117
<a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
118
<xsl:if test="position()=1">
119
<xsl:attribute name="id">
120
<xsl:value-of select="$letter" />
122
<xsl:attribute name="name">
123
<xsl:value-of select="$letter" />
127
<xsl:apply-templates select="syntax" />
131
<!-- if the default value contains (at least) one <br />, -->
132
<!-- this probably means that a short explanation follows -->
133
<!-- the actual default value. We cut off the string -->
134
<!-- after the <br /> so it will not be shown here. -->
135
<!-- (add the + character instead) -->
136
<xsl:variable name="default">
138
<xsl:when test="count(default[count(br) > 0]) > 0">
140
select="default/child::node()
141
[count(preceding-sibling::*) = 0]" />
144
<xsl:value-of select="default"/>
149
<xsl:value-of select="substring(substring-after(concat($default,
150
' '), name),1,20)" />
151
<xsl:if test="string-length(substring-after(concat($default, ' '),
153
or count(default[count(br) > 0]) > 0">
154
<xsl:text> +</xsl:text>
158
<xsl:if test="contextlist/context
159
[normalize-space(.)='server config']">s</xsl:if>
160
<xsl:if test="contextlist/context
161
[normalize-space(.)='virtual host']">v</xsl:if>
162
<xsl:if test="contextlist/context
163
[normalize-space(.)='directory']">d</xsl:if>
164
<xsl:if test="contextlist/context
165
[normalize-space(.)='.htaccess']">h</xsl:if>
169
<xsl:when test="../status='Base'">B</xsl:when>
170
<xsl:when test="../status='MPM'">M</xsl:when>
171
<xsl:when test="../status='Core'">C</xsl:when>
172
<xsl:when test="../status='Extension'">E</xsl:when>
173
<xsl:when test="../status='Experimental'">X</xsl:when>
178
<xsl:if test="position() mod 2 = $offset">
179
<xsl:attribute name="class">odd</xsl:attribute>
182
<td colspan="4" class="descr">
184
<xsl:when test="string-length(normalize-space(description)) > 0">
185
<xsl:apply-templates select="description"/>
188
<xsl:text>-</xsl:text>
193
</xsl:for-each> <!-- /directives -->
195
<!-- call next letter, if there is -->
196
<xsl:if test="string-length($letters-todo) > 1">
197
<xsl:call-template name="reference-of-letter">
198
<xsl:with-param name="letters-todo"
199
select="substring($letters-todo, 2)" />
200
<xsl:with-param name="offset"
201
select="(count($directives[$letter=translate(substring(
202
normalize-space(name), 1, 1), $lowercase, $uppercase)])
204
<xsl:with-param name="directives" select="$directives" />
208
<!-- /reference-of-letter -->