1 <?xml version="1.0"?><!--
2 /* ====================================================================
3 * The Apache Software License, Version 1.1
5 * Copyright (c) 2002-2004 The Apache Software Foundation. All rights
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
20 * 3. The end-user documentation included with the redistribution,
21 * if any, must include the following acknowledgment:
22 * "This product includes software developed by the
23 * Apache Software Foundation (http://www.apache.org/)."
24 * Alternately, this acknowledgment may appear in the software itself,
25 * if and wherever such third-party acknowledgments normally appear.
27 * 4. The names "Apache" and "Apache Software Foundation" must
28 * not be used to endorse or promote products derived from this
29 * software without prior written permission. For written
30 * permission, please contact apache@apache.org.
32 * 5. Products derived from this software may not be called "Apache",
33 * nor may "Apache" appear in their name, without prior written
34 * permission of the Apache Software Foundation.
36 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39 * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48 * ====================================================================
50 * This software consists of voluntary contributions made by many
51 * individuals on behalf of the Apache Software Foundation. For more
52 * information on the Apache Software Foundation, please see
53 * <http://www.apache.org/>.
55 <!DOCTYPE xsl:stylesheet [
56 <!ENTITY lf SYSTEM "util/lf.xml">
58 <xsl:stylesheet version="1.0"
59 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
60 xmlns="http://www.w3.org/1999/xhtml">
62 <!-- ==================================================================== -->
63 <!-- <quickreference> -->
64 <!-- Builds the directive quickreference page -->
65 <!-- ==================================================================== -->
66 <xsl:template match="quickreference">
67 <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
68 <xsl:call-template name="head"/>&lf;
70 <body id="directive-index">&lf;
71 <xsl:call-template name="top"/>&lf;
75 <xsl:value-of select="title" />
78 <xsl:call-template name="langavail" />&lf;
80 <xsl:apply-templates select="summary" />
81 </div>&lf; <!-- /#preamble -->
83 <div id="directive-ref">
84 <xsl:variable name="directives"
85 select="document(modulefilelist/modulefile)
86 /modulesynopsis/directivesynopsis[not(@location)]" />
88 <xsl:variable name="start-letters">
89 <xsl:call-template name="directive-startletters">
90 <xsl:with-param name="directives" select="$directives" />
94 <table id="legend">&lf;
98 <xsl:call-template name="letter-bar">
99 <xsl:with-param name="letters"
100 select="$start-letters" />
101 <xsl:with-param name="first" select="true()" />
106 <xsl:apply-templates select="legend/table[position()=1]" />
109 <xsl:apply-templates select="legend/table[position()=2]" />
114 <table class="qref">&lf;
115 <xsl:call-template name="reference-of-letter">
116 <xsl:with-param name="letters-todo" select="$start-letters" />
117 <xsl:with-param name="offset" select="number(0)" />
118 <xsl:with-param name="directives" select="$directives" />
121 </div>&lf; <!-- /#directive-ref -->
123 <xsl:call-template name="bottom"/>&lf;
127 <!-- /quickreference -->
130 <!-- ==================================================================== -->
131 <!-- the working horse. builds rows of all directives starting with one -->
132 <!-- letter when done, it calls itself to catch the next letter -->
133 <!-- ==================================================================== -->
134 <xsl:template name="reference-of-letter">
135 <xsl:param name="letters-todo" />
136 <xsl:param name="offset" />
137 <xsl:param name="directives" />
139 <xsl:variable name="letter" select="substring($letters-todo, 1, 1)" />
142 select="$directives[$letter=translate(substring(normalize-space(name), 1,1),
143 $lowercase,$uppercase)]">
144 <xsl:sort select="name" />
147 <xsl:if test="position() mod 2 = $offset">
148 <xsl:attribute name="class">odd</xsl:attribute>
152 <a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
153 <xsl:if test="position()=1">
154 <xsl:attribute name="id">
155 <xsl:value-of select="$letter" />
157 <xsl:attribute name="name">
158 <xsl:value-of select="$letter" />
162 <xsl:apply-templates select="syntax" />
166 <!-- if the default value contains (at least) one <br />, -->
167 <!-- this probably means that a short explanation follows -->
168 <!-- the actual default value. We cut off the string -->
169 <!-- after the <br /> so it will not be shown here. -->
170 <!-- (add the + character instead) -->
171 <xsl:variable name="default">
173 <xsl:when test="count(default[count(br) > 0]) > 0">
175 select="default/child::node()
176 [count(preceding-sibling::*) = 0]" />
179 <xsl:value-of select="default"/>
184 <xsl:value-of select="substring(substring-after(concat($default,
185 ' '), name),1,20)" />
186 <xsl:if test="string-length(substring-after(concat($default, ' '),
188 or count(default[count(br) > 0]) > 0">
189 <xsl:text> +</xsl:text>
193 <xsl:if test="contextlist/context
194 [normalize-space(.)='server config']">s</xsl:if>
195 <xsl:if test="contextlist/context
196 [normalize-space(.)='virtual host']">v</xsl:if>
197 <xsl:if test="contextlist/context
198 [normalize-space(.)='directory']">d</xsl:if>
199 <xsl:if test="contextlist/context
200 [normalize-space(.)='.htaccess']">h</xsl:if>
204 <xsl:when test="../status='Base'">B</xsl:when>
205 <xsl:when test="../status='MPM'">M</xsl:when>
206 <xsl:when test="../status='Core'">C</xsl:when>
207 <xsl:when test="../status='Extension'">E</xsl:when>
208 <xsl:when test="../status='Experimental'">X</xsl:when>
213 <xsl:if test="position() mod 2 = $offset">
214 <xsl:attribute name="class">odd</xsl:attribute>
217 <td colspan="4" class="descr">
219 <xsl:when test="string-length(normalize-space(description)) > 0">
220 <xsl:apply-templates select="description"/>
223 <xsl:text>-</xsl:text>
228 </xsl:for-each> <!-- /directives -->
230 <!-- call next letter, if there is -->
231 <xsl:if test="string-length($letters-todo) > 1">
232 <xsl:call-template name="reference-of-letter">
233 <xsl:with-param name="letters-todo"
234 select="substring($letters-todo, 2)" />
235 <xsl:with-param name="offset"
236 select="(count($directives[$letter=translate(substring(
237 normalize-space(name), 1, 1), $lowercase, $uppercase)])
239 <xsl:with-param name="directives" select="$directives" />
243 <!-- /reference-of-letter -->