1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00

rebuild of directive quickreference

this mostly modifies the layout and adds a letter bar

Reviewed by: Joshua Slive, Astrid Ke�ler


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96947 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
André Malo
2002-09-22 00:14:40 +00:00
parent 09ce7e3904
commit c8627c8651
8 changed files with 692 additions and 1144 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -7,34 +7,37 @@
<quickreference>
<title>Directive Quick Reference</title>
<summary>
<p>The directive quick reference shows the usage, default, status, and context
of each Apache configuration directive. For more information about each of these,
see the <a href="directive-dict.html">Directive Dictionary</a>.
</p>
<p>The directive quick reference shows the usage, default, status,
and context of each Apache configuration directive. For more
information about each of these, see the <a
href="directive-dict.html">Directive Dictionary</a>.</p>
<p>The first column gives the directive name and usage. The second columns shows the
default value of the directive, if a default exists. If the default is too large to
display, the first characters will be followed by "+".</p>
<p>The first column gives the directive name and usage. The second
columns shows the default value of the directive, if a default exists.
If the default is too large to display, the first characters will be
followed by "+".</p>
<p>The third and fourth columns lists the status of the directive and the
contexts where the directive is allowed according
to the following tables:</p>
<table><tr><td>
<table><tr><td>C</td><td>Core</td></tr>
<tr><td>M</td><td>MPM</td></tr>
<tr><td>B</td><td>Base</td></tr>
<tr><td>E</td><td>Extension</td></tr>
<tr><td>X</td><td>Experimental</td></tr>
</table>
</td><td>
<table><tr><td>s</td><td>server config</td></tr>
<tr><td>v</td><td>virtual host</td></tr>
<tr><td>d</td><td>directory</td></tr>
<tr><td>h</td><td>.htaccess</td></tr>
</table>
</td></tr></table>
<p>The third and fourth columns list the contexts where the directive
is allowed and the status of the directive according to the legend
tables below.</p>
</summary>
<legend>
<table>
<tr><th>s</th><td>server&#160;config</td></tr>
<tr><th>v</th><td>virtual&#160;host</td></tr>
<tr><th>d</th><td>directory</td></tr>
<tr><th>h</th><td>.htaccess</td></tr>
</table>
<table>
<tr><th>C</th><td>Core</td></tr>
<tr><th>M</th><td>MPM</td></tr>
<tr><th>B</th><td>Base</td></tr>
<tr><th>E</th><td>Extension</td></tr>
<tr><th>X</th><td>Experimental</td></tr>
</table>
</legend>
&allmodules;
</quickreference>

View File

@@ -120,6 +120,10 @@ div.warning pre {
font-size: 0.9em;
}
table.qref td.descr {
font-size: 0.9em;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* -> The End <-
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

View File

@@ -242,13 +242,62 @@ table table.bordered th {
border: 1px solid #000;
}
/* mod/dir. overview table */
/* ======================== */
/* mod/dir. overview table and quick reference */
/* ============================================ */
table.module th,
table.directive th {
white-space: nowrap;
}
table.qref {
border-collapse: collapse;
width: auto;
}
table.qref td {
border-style: none solid;
border-color: #000;
border-width: 1px;
}
table.qref td.descr {
padding-left: 1em;
font-size: 11pt;
}
table#legend {
width: 100%;
border-style: none;
border-width: 0;
vertical-align: bottom;
padding: 0;
margin: 0;
}
table#legend td {
vertical-align: bottom;
margin: 0;
padding: 0;
}
table#legend table {
vertical-align: bottom;
margin: 0 0 0 0.4em;
padding: 0;
height: 7.5em;
}
table#legend td.letters span {
display: none;
}
table#legend table td,
table#legend table th {
vertical-align: middle;
padding: 0.1ex 0.2em;
line-height: 1em;
}
/* related modules & dir. */
/* ====================== */
@@ -454,13 +503,19 @@ div.directive-section {
}
/* look for this on directive
* list page...
* list pages
*/
div#directive-list {
margin-left: 0;
padding: 0 0 1em 1em;
}
div#directive-ref {
margin: -1em 0 0 1px;
padding: 0 0 1em 0;
width: auto;
}
/* no sidebar */
div#quickview {
position: static;

View File

@@ -57,6 +57,8 @@ a:active {
}
/* hover on non-white backgrounds */
tr.odd a:hover,
tr.odd a:active,
div.note a:hover,
div.note a:active,
div.example a:hover,
@@ -89,6 +91,8 @@ code.module a:active {
}
/* hover on non-white backgrounds */
tr.odd code.module a:hover,
tr.odd code.module a:active,
div.note code.module a:hover,
div.note code.module a:active,
div.example code.module a:hover,
@@ -121,6 +125,8 @@ code.directive a:active {
}
/* hover on non-white backgrounds */
tr.odd code.directive a:hover,
tr.odd code.directive a:active,
div.note code.directive a:hover,
div.note code.directive a:active,
div.example code.directive a:hover,
@@ -301,11 +307,6 @@ tr.odd { /* for large tables alternating colors */
background-color: #f2f2f2;
}
tr.odd a:hover,
tr.odd a:active {
background-color: #fff;
}
/* bordered table cells */
/* ====================== */
@@ -331,13 +332,54 @@ table.directive th {
white-space: nowrap;
}
.qref {
border-collapse: collapse;
width: 100%;
table.qref {
border-collapse: collapse;
width: 100%;
}
.qref th {
background-color: #eee;
table.qref td {
border-style: none solid;
border-color: #aaa;
border-width: 1px;
}
table.qref td.descr {
padding-left: 1em;
font-size: 13px;
}
table#legend {
width: 100%;
border-style: none;
border-width: 0;
vertical-align: bottom;
padding: 0;
margin: 0;
}
table#legend td {
vertical-align: bottom;
margin: 0;
padding: 0;
}
table#legend td.letters {
width: 100%;
padding-bottom: 0.5em;
}
table#legend table {
vertical-align: bottom;
margin: 0 0 0 0.4em;
padding: 0;
height: 7.5em;
}
table#legend table td,
table#legend table th {
vertical-align: middle;
padding: 0.1ex 0.2em;
line-height: 1em;
}
/* related modules & dir. */
@@ -555,13 +597,23 @@ div.directive-section {
}
/* look for this on directive
* list page...
* list pages
*/
div#directive-list {
margin-left: 30px;
padding: 0 0 1em 1em;
}
div#directive-ref {
margin: -1em 0 0 0;
padding: 0 0 1em 30px;
width: 100%; /* IE is BAD (broken as designed) */
}
div[id]#directive-ref { /* a big sorry to ICab, Amaya (and old Konquerors?) */
width: auto; /* other browsers are fine ;-) */
}
/* sidebar position: right */
div#quickview {
position: absolute;
@@ -691,19 +743,23 @@ table div.warning {
* quotations, indented paragraphs and figures
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
p.letters {
margin: 1em 0 0 0;
}
.letters {
text-align: center;
background-color: inherit;
color: #ccc;
}
p.letters a:link,
p.letters a:visited {
.letters a:link,
.letters a:visited {
text-decoration: none;
font-weight: bold;
}
p.letters a:hover,
p.letters a:active {
.letters a:hover,
.letters a:active {
font-weight: bold;
}

View File

@@ -49,4 +49,5 @@ usage?, seealso*)>
<!ELEMENT directiveindex (title | summary | modulefilelist)+>
<!-- Used in quickreference.xml -->
<!ELEMENT quickreference (title | summary | modulefilelist)+>
<!ELEMENT quickreference (title | summary | legend | modulefilelist)+>
<!ELEMENT legend (table, table)>

View File

@@ -134,7 +134,7 @@
<a href="{$path}/">
<xsl:value-of select="$messages/message[@name='version']"/>
</a>
<xsl:if test="../modulesynopsis or ../directiveindex">
<xsl:if test="../modulesynopsis or ../directiveindex or ../quickreference">
<xsl:text> &gt; </xsl:text>
<a href="./">
<xsl:value-of select="$messages/message[@name='modules']"/>

View File

@@ -21,70 +21,51 @@
</h1>
<xsl:apply-templates select="summary" />
</div> <!-- /preamble -->
<xsl:text>
</xsl:text> <!-- insert a line break -->
</div>
<div id="directive-ref">
<div id="directive-list">
<table class="qref">
<xsl:for-each select="document(/*/modulefilelist/modulefile)/modulesynopsis/directivesynopsis[not(@location)]">
<xsl:sort select="name"/>
<!-- first collect the start letters -->
<xsl:variable name="start-letters">
<xsl:call-template name="directive-startletters"/>
</xsl:variable>
<table id="legend">
<tr>
<td class="letters"><span>
<xsl:call-template name="letter-bar">
<xsl:with-param name="letters" select="$start-letters"/>
<xsl:with-param name="first" select="true()"/>
</xsl:call-template>
</span></td>
<xsl:variable name="rowpos">
<xsl:choose>
<xsl:when test="position() mod 2 = 0">even</xsl:when>
<xsl:otherwise>odd</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$rowpos}">
<td>
<a style="text-decoration: none"
href="{../name}.html#{translate(name,$uppercase,$lowercase)}">
<xsl:apply-templates select="syntax"/>
</a>
</td>
<td>
<xsl:value-of select="substring(substring-after(concat(default,' '),name),1,20)"/>
<xsl:if test="string-length(substring-after(concat(default,' '),name)) &gt; 20">
+
</xsl:if>
</td>
<td>
<xsl:choose>
<xsl:when test="../status='Base'">B</xsl:when>
<xsl:when test="../status='MPM'">M</xsl:when>
<xsl:when test="../status='Core'">C</xsl:when>
<xsl:when test="../status='Extension'">E</xsl:when>
<xsl:when test="../status='Experimental'">X</xsl:when>
</xsl:choose>
</td>
<xsl:text>
</xsl:text> <!-- insert a line break -->
<td>
<xsl:if test="contextlist/* = 'server config'">s</xsl:if>
<xsl:if test="contextlist/* = 'virtual host'">v</xsl:if>
<xsl:if test="contextlist/* = 'directory'">d</xsl:if>
<xsl:if test="contextlist/* = '.htaccess'">h</xsl:if>
<xsl:apply-templates select="legend/table[position()=1]"/>
</td>
</tr>
<td>
<xsl:apply-templates select="legend/table[position()=2]"/>
</td>
</tr>
</table>
<tr class="{$rowpos}">
<td colspan="4">
&nbsp;&nbsp;
<xsl:apply-templates select="description"/>
</td>
</tr>
<xsl:text>
</xsl:text><!-- insert a line break -->
</xsl:for-each>
</table>
</div>
<xsl:text>
</xsl:text> <!-- insert a line break -->
<table class="qref">
<xsl:call-template name="reference-of-letter">
<xsl:with-param name="letters-todo" select="$start-letters"/>
<xsl:with-param name="offset" select="number(0)"/>
</xsl:call-template>
</table>
</div> <!-- /directive-ref -->
<xsl:call-template name="bottom"/>
</body>
@@ -92,5 +73,98 @@
</xsl:template>
<!-- -->
<!-- the working horse. builds rows of all directives -->
<!-- starting with one letter -->
<!-- when done, it calls itself to catch the next letter -->
<!-- -->
<xsl:template name="reference-of-letter">
<xsl:param name="letters-todo"/>
<xsl:param name="offset"/>
<xsl:variable name="letter" select="substring($letters-todo,1,1)"/>
<xsl:for-each select="document(/*/modulefilelist/modulefile)/modulesynopsis/directivesynopsis[not(@location)][$letter=translate(substring(normalize-space(name),1,1),$lowercase,$uppercase)]">
<xsl:sort select="name"/>
<!-- create the content -->
<xsl:variable name="current-row">
<td><xsl:choose>
<xsl:when test="position()=1">
<a name="{$letter}" id="{$letter}" href="{../name}.html#{translate(name,$uppercase,$lowercase)}">
<xsl:apply-templates select="syntax"/>
</a>
</xsl:when>
<xsl:otherwise>
<a href="{../name}.html#{translate(name,$uppercase,$lowercase)}">
<xsl:apply-templates select="syntax"/>
</a>
</xsl:otherwise></xsl:choose>
</td>
<td>
<xsl:value-of select="substring(substring-after(concat(default,' '),name),1,20)"/>
<xsl:if test="string-length(substring-after(concat(default,' '),name)) &gt; 20">
<xsl:text> +</xsl:text>
</xsl:if>
</td>
<td>
<xsl:if test="contextlist/* = 'server config'">s</xsl:if>
<xsl:if test="contextlist/* = 'virtual host'">v</xsl:if>
<xsl:if test="contextlist/* = 'directory'">d</xsl:if>
<xsl:if test="contextlist/* = '.htaccess'">h</xsl:if>
</td>
<td>
<xsl:choose>
<xsl:when test="../status='Base'">B</xsl:when>
<xsl:when test="../status='MPM'">M</xsl:when>
<xsl:when test="../status='Core'">C</xsl:when>
<xsl:when test="../status='Extension'">E</xsl:when>
<xsl:when test="../status='Experimental'">X</xsl:when>
</xsl:choose>
</td>
</xsl:variable>
<xsl:variable name="descr">
<td colspan="4" class="descr"><xsl:choose>
<xsl:when test="string-length(normalize-space(description)) &gt; 0">
<xsl:apply-templates select="description"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>-</xsl:text>
</xsl:otherwise></xsl:choose>
</td>
</xsl:variable>
<!-- and now choose between odd n even --><xsl:choose>
<xsl:when test="position() mod 2 = $offset">
<tr class="odd"><xsl:copy-of select="$current-row"/></tr>
<tr class="odd"><xsl:copy-of select="$descr"/></tr>
</xsl:when>
<xsl:otherwise>
<tr><xsl:copy-of select="$current-row"/></tr>
<tr><xsl:copy-of select="$descr"/></tr>
</xsl:otherwise></xsl:choose>
<xsl:text>
</xsl:text> <!-- insert a line break -->
</xsl:for-each> <!-- /directives -->
<!-- call next letter, if there is -->
<xsl:if test="string-length($letters-todo) &gt; 1">
<xsl:call-template name="reference-of-letter">
<xsl:with-param name="letters-todo" select="substring($letters-todo,2)"/>
<xsl:with-param name="offset" select="(count(document(/*/modulefilelist/modulefile)/modulesynopsis/directivesynopsis[not(@location)][$letter=translate(substring(normalize-space(name),1,1),$lowercase,$uppercase)]) + $offset) mod 2"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- /reference-of-letter -->
</xsl:stylesheet>