httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jchamp...@apache.org
Subject svn commit: r1793922 - in /httpd/httpd/branches/trunk-override-index/docs/manual: index.xml mod/core.xml mod/overrides.xml sitemap.xml style/css/manual.css style/modulesynopsis.dtd style/xsl/common.xsl style/xsl/overrideindex.xsl
Date Thu, 04 May 2017 22:53:59 GMT
Author: jchampion
Date: Thu May  4 22:53:58 2017
New Revision: 1793922

URL: http://svn.apache.org/viewvc?rev=1793922&view=rev
Log:
Add an Override Class Index

This page pulls in directives that declare an <override> element and
groups them by class. The documentation for each class comes from
overrides.xml. Any undocumented classes are flagged with a boilerplate
fallback text (this situation is only likely to occur with a misspelling
or otherwise invalid <override> somewhere else in the documentation).

Added:
    httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml   (with props)
    httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl   (with
props)
Modified:
    httpd/httpd/branches/trunk-override-index/docs/manual/index.xml
    httpd/httpd/branches/trunk-override-index/docs/manual/mod/core.xml
    httpd/httpd/branches/trunk-override-index/docs/manual/sitemap.xml
    httpd/httpd/branches/trunk-override-index/docs/manual/style/css/manual.css
    httpd/httpd/branches/trunk-override-index/docs/manual/style/modulesynopsis.dtd
    httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/common.xsl

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/index.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/index.xml?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/index.xml (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/index.xml Thu May  4 22:53:58 2017
@@ -44,6 +44,7 @@ Documentation</title>
     <page href="filter.html">Filters</page>
     <page href="handler.html">Handlers</page>
     <page href="expr.html">Expression parser</page>
+    <page href="mod/overrides.html">Override Class Index for .htaccess</page>
     <page href="programs/">Server and Supporting Programs</page>
     <page href="glossary.html">Glossary</page>
 </category>

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/mod/core.xml?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/mod/core.xml (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/mod/core.xml Thu May  4 22:53:58
2017
@@ -345,10 +345,12 @@ NoDecode option available in 2.3.12 and
     <code>.htaccess</code> files.</p>
 
     <p>The <var>directive-type</var> can be one of the following
-    groupings of directives.</p>
+    groupings of directives. (See the <a href="overrides.html">override class
+    index</a> for an up-to-date listing of which directives are enabled by each
+    <var>directive-type</var>.)</p>
 
     <dl>
-      <dt>AuthConfig</dt>
+      <dt><a href="overrides.html#override-authconfig">AuthConfig</a></dt>
 
       <dd>
 
@@ -361,7 +363,7 @@ NoDecode option available in 2.3.12 and
       module="mod_authn_file">AuthUserFile</directive>, <directive
       module="mod_authz_core">Require</directive>, <em>etc.</em>).</dd>
 
-      <dt>FileInfo</dt>
+      <dt><a href="overrides.html#override-fileinfo">FileInfo</a></dt>
 
       <dd>
       Allow use of the directives controlling document types
@@ -398,7 +400,7 @@ NoDecode option available in 2.3.12 and
       <module>mod_actions</module>.
       </dd>
 
-      <dt>Indexes</dt>
+      <dt><a href="overrides.html#override-indexes">Indexes</a></dt>
 
       <dd>
       Allow use of the directives controlling directory indexing
@@ -417,7 +419,7 @@ NoDecode option available in 2.3.12 and
       module="mod_autoindex">ReadmeName</directive>,
       <em>etc.</em>).</dd>
 
-      <dt>Limit</dt>
+      <dt><a href="overrides.html#override-limit">Limit</a></dt>
 
       <dd>
       Allow use of the directives controlling host access (<directive
@@ -453,7 +455,7 @@ NoDecode option available in 2.3.12 and
       </note>
       </dd>
 
-      <dt>Options[=<var>Option</var>,...]</dt>
+      <dt><a href="overrides.html#override-options">Options</a>[=<var>Option</var>,...]</dt>
 
       <dd>
       Allow use of the directives controlling specific directory
@@ -500,6 +502,7 @@ AllowOverride AuthConfig Indexes
 <seealso><directive module="core">AllowOverrideList</directive></seealso>
 <seealso><a href="../configuring.html">Configuration Files</a></seealso>
 <seealso><a href="../howto/htaccess.html">.htaccess Files</a></seealso>
+<seealso><a href="overrides.html">Override Class Index for .htaccess</a></seealso>
 </directivesynopsis>
 
 <directivesynopsis>

Added: httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml?rev=1793922&view=auto
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml (added)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml Thu May  4 22:53:58
2017
@@ -0,0 +1,134 @@
+<?xml version="1.0"?>
+<!DOCTYPE overrideindex SYSTEM "../style/modulesynopsis.dtd">
+<?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
+<!-- $LastChangedRevision$ -->
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<overrideindex metafile="overrides.xml.meta">
+  <title>Override Class Index for .htaccess</title>
+  <summary>
+    <p>
+      This is an index of the directives that are allowed in .htaccess files for
+      each <directive module="core">AllowOverride</directive> setting. To
+      determine the set of directives that your server configuration allows
+      .htaccess users to use:
+    </p>
+
+    <ol>
+      <li>Start with the set of directives in the <code>AllowOverrideList</code>
+      for the directory in question. (By default, this is set to
+      <code>None</code>.)</li>
+      <li>Find the <code>AllowOverride</code> setting for the directory
in
+      question. (By default, it is set to <code>None</code>.) There are two
+      special cases:
+        <ol>
+          <li>If your <code>AllowOverride</code> setting is <code>All</code>,
+          add every directive listed on this page to the list.</li>
+          <li>If your <code>AllowOverride</code> setting is <code>None</code>,
+          you're done. Only the directives in the <code>AllowOverrideList</code>
+          (if any) will be allowed.</li>
+        </ol>
+      </li>
+      <li>For each override class listed in <code>AllowOverride</code>,
look up
+      the corresponding set of directives below and add them to the list.</li>
+      <li>Finally, add the set of directives that is always allowed in
+      .htaccess (these are listed in the
+      <a href="#override-all">All section</a>, below).</li>
+    </ol>
+
+    <p>
+      Several of the override classes are quite powerful and give .htaccess
+      users a large amount of control over the server. For a stricter approach,
+      set <code>AllowOverride None</code> and use
+      <directive module="core">AllowOverrideList</directive> to specify the
+      exact list of directives that .htaccess users are allowed to use.
+    </p>
+  </summary>
+
+  <!--
+    Provide one overridesummary element for each Override type. The content will
+    be sucked into the relevant section on the override index page.
+  -->
+
+  <overridesummary class="All">
+    <p>
+      The following directives are allowed in any .htaccess file, as long as
+      overrides are enabled in the server configuration.
+    </p>
+  </overridesummary>
+
+  <overridesummary class="AuthConfig">
+    <p>
+      The following directives are allowed in .htaccess files when
+      <code>AllowOverride AuthConfig</code> is in effect. They give .htaccess
+      users control over the authentication and authorization methods that are
+      applied to their directory subtrees, including several related utility
+      directives for session handling and TLS settings.
+    </p>
+  </overridesummary>
+
+  <overridesummary class="FileInfo">
+    <p>
+      The following directives are allowed in .htaccess files when
+      <code>AllowOverride FileInfo</code> is in effect. They give .htaccess
+      users a wide range of control over the responses and metadata given by the
+      server.
+    </p>
+  </overridesummary>
+
+  <overridesummary class="Indexes">
+    <p>
+      The following directives are allowed in .htaccess files when
+      <code>AllowOverride Indexes</code> is in effect. They allow .htaccess
+      users to control aspects of the directory index pages provided by the
+      server, including autoindex generation.
+    </p>
+  </overridesummary>
+
+  <overridesummary class="Limit">
+    <p>
+      The following directives are allowed in .htaccess files when
+      <code>AllowOverride Limit</code> is in effect. This extremely narrow
+      override type mostly allows the use of the legacy authorization directives
+      provided by <module>mod_access_compat</module>.
+    </p>
+  </overridesummary>
+
+  <overridesummary class="Options">
+    <p>
+      The following directives are allowed in .htaccess files when
+      <code>AllowOverride Options</code> is in effect. They give .htaccess
+      users access to <code>Options</code> and similar directives, as well as
+      directives that control the filter chain.
+    </p>
+  </overridesummary>
+
+  <!--
+    This is the error message for when a directive shows up in a section that
+    has no explicit overridesummary above.
+  -->
+  <overridesummary fallback="yes">
+    <p><em>
+    [This section has no description. It's possible that the documentation is
+    incomplete, or that the directives here have an incorrect or misspelled
+    Override type. Please consider reporting this in the
+    <a href="#comments_section">comments section</a>.]
+    </em></p>
+  </overridesummary>
+</overrideindex>

Propchange: httpd/httpd/branches/trunk-override-index/docs/manual/mod/overrides.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/sitemap.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/sitemap.xml?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/sitemap.xml (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/sitemap.xml Thu May  4 22:53:58
2017
@@ -193,6 +193,7 @@ log_server_status</page>
 <page href="mod/">Module index</page>
 <page href="mod/directives.html">Directive index</page>
 <page href="mod/quickreference.html">Directive Quick-Reference</page>
+<page href="mod/overrides.html">Override class index for .htaccess</page>
 </category>
 
 </sitemap>

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/style/css/manual.css
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/style/css/manual.css?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/style/css/manual.css (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/style/css/manual.css Thu May  4
22:53:58 2017
@@ -611,6 +611,12 @@ div#directive-list ul {
     padding: 0;
 }
 
+/* override index */
+/* ============== */
+div#override-list td.module {
+    width: 20%;
+}
+
 /* indextable */
 /* ========== */
 table#indextable td ul {

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/style/modulesynopsis.dtd
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/style/modulesynopsis.dtd?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/style/modulesynopsis.dtd (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/style/modulesynopsis.dtd Thu May
 4 22:53:58 2017
@@ -75,3 +75,11 @@ usage?, seealso*)>
 <!ATTLIST quickreference metafile CDATA  #REQUIRED>
 
 <!ELEMENT legend (table, table)>
+
+<!-- Used in overrides.xml -->
+<!ELEMENT overrideindex (title | summary | overridesummary)+>
+<!ATTLIST overrideindex metafile CDATA #REQUIRED>
+
+<!ELEMENT overridesummary %Block;>
+<!ATTLIST overridesummary class    CDATA #IMPLIED
+                          fallback CDATA #IMPLIED>

Modified: httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/common.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/common.xsl?rev=1793922&r1=1793921&r2=1793922&view=diff
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/common.xsl (original)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/common.xsl Thu May  4
22:53:58 2017
@@ -64,6 +64,7 @@
 <xsl:include href="indexpage.xsl" />
 <xsl:include href="quickreference.xsl" />
 <xsl:include href="faq.xsl" />
+<xsl:include href="overrideindex.xsl" />
 
 <!-- load utility snippets -->
 <xsl:include href="util/modtrans.xsl" />

Added: httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl?rev=1793922&view=auto
==============================================================================
--- httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl (added)
+++ httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl Thu
May  4 22:53:58 2017
@@ -0,0 +1,249 @@
+<?xml version="1.0"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!DOCTYPE xsl:stylesheet [
+    <!ENTITY lf SYSTEM "util/lf.xml">
+]>
+
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exslt="http://exslt.org/common"
+                xmlns:func="http://exslt.org/functions"
+                xmlns:httpd="http://httpd.apache.org/xsl/manual"
+                xmlns:set="http://exslt.org/sets"
+                xmlns:str="http://exslt.org/strings"
+                xmlns="http://www.w3.org/1999/xhtml"
+                exclude-result-prefixes="exslt func httpd set str">
+
+<!-- ======================================================================= -->
+<!-- <overrideindex>                                                         -->
+<!-- Builds the .htaccess overridable directive index                        -->
+<!-- ======================================================================= -->
+<xsl:template match="overrideindex">
+<html xml:lang="{$doclang}" lang="{$doclang}">
+    <xsl:call-template name="head"/>&lf;
+
+    <xsl:variable name="directives"
+                  select="document(
+                            document($allmodules)/modulefilelist/modulefile
+                          )/modulesynopsis[status!='Obsolete']
+                           /directivesynopsis[not(@location)]" />
+
+    <body id="override-index">&lf;
+        <xsl:call-template name="top"/>&lf;&lf;
+
+        <div id="page-content">
+            <xsl:call-template name="retired" />
+
+            <div id="preamble">
+                <h1>
+                    <xsl:value-of select="title" />
+                </h1>&lf;
+
+                <xsl:call-template name="langavail" />&lf;
+
+                <xsl:apply-templates select="summary" />
+            </div>&lf; <!-- /#preamble -->
+
+            <!-- Quickview Sidebar -->
+            <xsl:if test="not($is-chm) or seealso">
+                <div id="quickview">
+                    <xsl:if test="not($is-chm)">
+                        <xsl:if test="overridesummary">
+                            <h3>
+                                <xsl:value-of select="$message[@id='topics']" />
+                            </h3>&lf;
+
+                            <ul id="topics">&lf;
+                            <xsl:apply-templates select="overridesummary"
+                                                 mode="index" />
+                            </ul>
+                        </xsl:if>
+                    </xsl:if> <!-- /!is-chm -->
+
+                    <!-- The seealso section shows links to related documents
+                         explicitly set in .xml docs or simply the comments. -->
+                    <xsl:if test="seealso or not($is-chm or $is-zip)">
+                        <h3>
+                            <xsl:value-of select="$message[@id='seealso']" />
+                        </h3>&lf;
+
+                        <ul class="seealso">&lf;
+                        <xsl:for-each select="seealso">
+                            <li>
+                                <xsl:apply-templates />
+                            </li>&lf;
+                        </xsl:for-each>
+                        <xsl:if test="not($is-chm or $is-zip or $metafile/basename = 'index')">
+                            <li><a href="#comments_section"><xsl:value-of
+                                    select="$message[@id='comments']" /></a>
+                            </li>
+                        </xsl:if>
+                        </ul>
+                    </xsl:if>
+                </div> <!-- /#quickview -->
+            </xsl:if>&lf; <!-- have sidebar -->
+
+            <div id="override-list">
+                <xsl:variable name="root" select="." />
+
+                <xsl:for-each select="httpd:override-classes($directives)">
+                    <xsl:sort select="." />
+
+                    <xsl:call-template name="override-section">
+                        <xsl:with-param name="name" select="." />
+                        <xsl:with-param name="directives" select="$directives" />
+                        <xsl:with-param name="root" select="$root" />
+                    </xsl:call-template>
+
+                </xsl:for-each>
+            </div> <!-- /#override-list -->
+        </div> <!-- /#page-content -->
+
+        <xsl:call-template name="bottom" />&lf;
+    </body>
+</html>
+</xsl:template>
+<!-- /overrideindex -->
+
+<!-- ======================================================================= -->
+<!-- <overridesummary>                                                       -->
+<!-- Pass-through template for the overridesummary contents.                 -->
+<!-- ======================================================================= -->
+<xsl:template match="overridesummary">
+    <xsl:apply-templates />
+</xsl:template>
+
+<!-- Generates an overridesummary index, used in the quickview. -->
+<xsl:template match="overridesummary" mode="index">
+<xsl:if test="@class">
+    <li>
+        <img src="{$path}/images/down.gif" alt="" />
+        <xsl:text> </xsl:text>
+        <a href="#override-{translate(@class, $uppercase, $lowercase)}">
+            <xsl:apply-templates select="@class" mode="print" />
+        </a>
+    </li>&lf;
+</xsl:if>
+</xsl:template>
+
+<!--
+    Generates a section for an Override class, including the section header,
+    the class description, and the table of directives belonging to that class.
+-->
+<xsl:template name="override-section">
+    <xsl:param name="name" />       <!-- the name of the Override class -->
+    <xsl:param name="directives" /> <!-- the directive nodes -->
+    <xsl:param name="root" />       <!-- the root of the overrideindex element -->
+
+    <!-- The "up" arrow link. -->
+    <div class="top">
+        <a href="#page-header">
+            <img alt="top" src="{$path}/images/up.gif" />
+        </a>
+    </div>
+
+    <div class="section">
+        <!-- Section header -->
+        <h2>
+            <a name="override-{translate($name, $uppercase, $lowercase)}">
+                <xsl:value-of select="$name" />
+            </a>
+        </h2>
+
+        <!--
+            Search the input document for the overridesummary element
+            corresponding to this Override class, and put its description into
+            the document here. If there isn't one, use the fallback element
+            (which should alert users/committers to a problem).
+        -->
+        <xsl:apply-templates select="($root//overridesummary[@class=$name]
+                                      | $root//overridesummary[@fallback])[1]" />
+
+        <!-- Directive table -->
+        <table class="qref">
+        <xsl:for-each select="$directives[contains(override, $name)]">
+            <xsl:sort select="name" />
+
+            <!--
+                Partially duplicated from quickreference.xsl. Generate a row
+                containing the directive name, its description, and its parent
+                module. Zebra-stripe every second row.
+            -->
+            <tr>
+                <xsl:if test="position() mod 2 = 0">
+                    <xsl:attribute name="class">odd</xsl:attribute>
+                </xsl:if>
+
+                <td>
+                <a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
+                    <xsl:if test="@type = 'section'">&lt;</xsl:if>
+                    <xsl:value-of select="name" />
+                    <xsl:if test="@type = 'section'">&gt;</xsl:if>
+                </a>
+                </td>
+
+                <td class="module">
+                <a href="{../name}.html">
+                    <xsl:value-of select="../name" />
+                </a>
+                </td>
+            </tr>&lf;
+
+            <tr>
+                <xsl:if test="position() mod 2 = 0">
+                    <xsl:attribute name="class">odd</xsl:attribute>
+                </xsl:if>
+
+                <td class="descr" colspan="2">
+                    <xsl:choose>
+                    <xsl:when test="string-length(normalize-space(description)) > 0">
+                        <xsl:apply-templates select="description" />
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:text>-</xsl:text>
+                    </xsl:otherwise>
+                    </xsl:choose>
+                </td>
+            </tr>&lf;
+        </xsl:for-each>
+        </table>
+    </div>
+</xsl:template>
+<!-- /override-section -->
+
+<!--
+    Returns the set of distinct Override classes reported by the passed set of
+    directives.
+-->
+<func:function name="httpd:override-classes">
+    <xsl:param name="directives" />
+
+    <xsl:variable name="overrideValues">
+        <xsl:for-each select="$directives/override">
+            <xsl:for-each select="str:split(., ',')">
+                <value><xsl:value-of select="normalize-space(.)" /></value>
+            </xsl:for-each>
+        </xsl:for-each>
+    </xsl:variable>
+
+    <func:result select="set:distinct(exslt:node-set($overrideValues)/*)" />
+</func:function>
+
+</xsl:stylesheet>

Propchange: httpd/httpd/branches/trunk-override-index/docs/manual/style/xsl/overrideindex.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message