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">
24 <xsl:stylesheet version="1.0"
25 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
26 xmlns:exslt="http://exslt.org/common"
27 xmlns:func="http://exslt.org/functions"
28 xmlns:httpd="http://httpd.apache.org/xsl/manual"
29 xmlns:set="http://exslt.org/sets"
30 xmlns:str="http://exslt.org/strings"
31 xmlns="http://www.w3.org/1999/xhtml"
32 exclude-result-prefixes="exslt func httpd set str">
34 <!-- ======================================================================= -->
35 <!-- <overrideindex> -->
36 <!-- Builds the .htaccess overridable directive index -->
37 <!-- ======================================================================= -->
38 <xsl:template match="overrideindex">
39 <html xml:lang="{$doclang}" lang="{$doclang}">
40 <xsl:call-template name="head"/>&lf;
42 <xsl:variable name="directives"
44 document($allmodules)/modulefilelist/modulefile
45 )/modulesynopsis[status!='Obsolete']
46 /directivesynopsis[not(@location)]" />
48 <body id="override-index">&lf;
49 <xsl:call-template name="top"/>&lf;&lf;
51 <div id="page-content">
52 <xsl:call-template name="retired" />
56 <xsl:value-of select="title" />
59 <xsl:call-template name="langavail" />&lf;
61 <xsl:apply-templates select="summary" />
62 </div>&lf; <!-- /#preamble -->
64 <!-- Quickview Sidebar -->
65 <xsl:if test="not($is-chm) or seealso">
67 <xsl:if test="not($is-chm)">
68 <xsl:if test="overridesummary">
70 <xsl:value-of select="$message[@id='topics']" />
74 <xsl:apply-templates select="overridesummary"
78 </xsl:if> <!-- /!is-chm -->
80 <!-- The seealso section shows links to related documents
81 explicitly set in .xml docs or simply the comments. -->
82 <xsl:if test="seealso or not($is-chm or $is-zip)">
84 <xsl:value-of select="$message[@id='seealso']" />
87 <ul class="seealso">&lf;
88 <xsl:for-each select="seealso">
90 <xsl:apply-templates />
93 <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
94 <li><a href="#comments_section"><xsl:value-of
95 select="$message[@id='comments']" /></a>
100 </div> <!-- /#quickview -->
101 </xsl:if>&lf; <!-- have sidebar -->
103 <div id="override-list">
104 <xsl:variable name="root" select="." />
106 <xsl:for-each select="httpd:override-classes($directives)">
107 <xsl:sort select="." />
109 <xsl:call-template name="override-section">
110 <xsl:with-param name="name" select="." />
111 <xsl:with-param name="directives" select="$directives" />
112 <xsl:with-param name="root" select="$root" />
116 </div> <!-- /#override-list -->
117 </div> <!-- /#page-content -->
119 <xsl:call-template name="bottom" />&lf;
123 <!-- /overrideindex -->
125 <!-- ======================================================================= -->
126 <!-- <overridesummary> -->
127 <!-- Pass-through template for the overridesummary contents. -->
128 <!-- ======================================================================= -->
129 <xsl:template match="overridesummary">
130 <xsl:apply-templates />
133 <!-- Generates an overridesummary index, used in the quickview. -->
134 <xsl:template match="overridesummary" mode="index">
135 <xsl:if test="@class">
137 <img src="{$path}/images/down.gif" alt="" />
138 <xsl:text> </xsl:text>
139 <a href="#override-{translate(@class, $uppercase, $lowercase)}">
140 <xsl:apply-templates select="@class" mode="print" />
147 Generates a section for an Override class, including the section header,
148 the class description, and the table of directives belonging to that class.
150 <xsl:template name="override-section">
151 <xsl:param name="name" /> <!-- the name of the Override class -->
152 <xsl:param name="directives" /> <!-- the directive nodes -->
153 <xsl:param name="root" /> <!-- the root of the overrideindex element -->
155 <!-- The "up" arrow link. -->
157 <a href="#page-header">
158 <img alt="top" src="{$path}/images/up.gif" />
162 <div class="section">
163 <!-- Section header -->
165 <a name="override-{translate($name, $uppercase, $lowercase)}">
166 <xsl:value-of select="$name" />
171 Search the input document for the overridesummary element
172 corresponding to this Override class, and put its description into
173 the document here. If there isn't one, use the fallback element
174 (which should alert users/committers to a problem).
176 <xsl:apply-templates select="($root//overridesummary[@class=$name]
177 | $root//overridesummary[@fallback])[1]" />
179 <!-- Directive table -->
181 <xsl:for-each select="$directives[contains(override, $name)]">
182 <xsl:sort select="name" />
185 Partially duplicated from quickreference.xsl. Generate a row
186 containing the directive name, its description, and its parent
187 module. Zebra-stripe every second row.
190 <xsl:if test="position() mod 2 = 0">
191 <xsl:attribute name="class">odd</xsl:attribute>
195 <a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
196 <xsl:if test="@type = 'section'"><</xsl:if>
197 <xsl:value-of select="name" />
198 <xsl:if test="@type = 'section'">></xsl:if>
203 <a href="{../name}.html">
204 <xsl:value-of select="../name" />
210 <xsl:if test="position() mod 2 = 0">
211 <xsl:attribute name="class">odd</xsl:attribute>
214 <td class="descr" colspan="2">
216 <xsl:when test="string-length(normalize-space(description)) > 0">
217 <xsl:apply-templates select="description" />
220 <xsl:text>-</xsl:text>
229 <!-- /override-section -->
232 Returns the set of distinct Override classes reported by the passed set of
235 <func:function name="httpd:override-classes">
236 <xsl:param name="directives" />
238 <xsl:variable name="overrideValues">
239 <xsl:for-each select="$directives/override">
240 <xsl:for-each select="str:split(., ',')">
241 <value><xsl:value-of select="normalize-space(.)" /></value>
246 <func:result select="set:distinct(exslt:node-set($overrideValues)/*)" />