quickreference.xsl revision d25f483469fdeb2ca813928eec854375b2eb65cd
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd<?xml version="1.0"?>
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd<!DOCTYPE xsl:stylesheet [
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd <!ENTITY lf SYSTEM "/xsl/util/lf.xml">
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd]>
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd<!--
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd Licensed to the Apache Software Foundation (ASF) under one or more
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd contributor license agreements. See the NOTICE file distributed with
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd this work for additional information regarding copyright ownership.
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd The ASF licenses this file to You under the Apache License, Version 2.0
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd (the "License"); you may not use this file except in compliance with
b05ab3ff5ab54aa22610b13d56eaba6ddfc3db60nd the License. You may obtain a copy of the License at
43e2c3ca329ff3ca8cb7613d455ddb3794edf7adnd
43e2c3ca329ff3ca8cb7613d455ddb3794edf7adnd http://www.apache.org/licenses/LICENSE-2.0
43e2c3ca329ff3ca8cb7613d455ddb3794edf7adnd
43e2c3ca329ff3ca8cb7613d455ddb3794edf7adnd Unless required by applicable law or agreed to in writing, software
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd distributed under the License is distributed on an "AS IS" BASIS,
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd See the License for the specific language governing permissions and
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd limitations under the License.
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd-->
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd
dc0d8d65d35787d30a275895ccad8d8e1b58a5ednd<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<!-- ==================================================================== -->
<!-- <quickreference> -->
<!-- Builds the directive quickreference page -->
<!-- ==================================================================== -->
<xsl:template match="quickreference">
<xsl:call-template name="section-title"/>
<xsl:text>\label{/mod/directives}</xsl:text>&lf;
<xsl:apply-templates select="summary"/>
<xsl:call-template name="seealso"/>
<xsl:apply-templates select="legend"/>
<xsl:variable name="directives"
select="document(document($allmodules)/modulefilelist/modulefile)
/modulesynopsis/directivesynopsis[not(@location)]" />
<xsl:text>\footnotesize</xsl:text>&lf;
<xsl:text>\begin{longtable}{p{.60\textwidth}p{.25\textwidth}ll}\hline/</xsl:text>
&lf;
<xsl:for-each
select="$directives[translate(substring(normalize-space(name), 1,1),
$lowercase,$uppercase)]">
<xsl:sort select="name" />
<xsl:text>\texttt{</xsl:text>
<xsl:apply-templates select="syntax" mode="tabular" />
<xsl:text>}</xsl:text>
<xsl:text>&amp;</xsl:text>
<!-- if the default value contains (at least) one <br />, -->
<!-- this probably means that a short explanation follows -->
<!-- the actual default value. We cut off the string -->
<!-- after the <br /> so it will not be shown here. -->
<!-- (add the + character instead) -->
<xsl:variable name="default">
<xsl:choose>
<xsl:when test="count(default[count(br) &gt; 0]) &gt; 0">
<xsl:value-of select="default/child::node()
[count(preceding-sibling::*) = 0]" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="default"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template name="ltescape">
<xsl:with-param name="string">
<xsl:value-of select="substring(substring-after(concat($default,
' '), name),1,20)" />
</xsl:with-param>
</xsl:call-template>
<xsl:if test="string-length(substring-after(concat($default, ' '),
name)) &gt; 20 or count(default[count(br) &gt; 0]) &gt; 0">
<xsl:text> +</xsl:text>
</xsl:if>
<xsl:text>&amp;</xsl:text>
<xsl:if test="contextlist/context
[normalize-space(.)='server config']">
<xsl:value-of select="$message[@id='serverconfig']/@letter"/>
</xsl:if>
<xsl:if test="contextlist/context
[normalize-space(.)='virtual host']">
<xsl:value-of select="$message[@id='virtualhost']/@letter"/>
</xsl:if>
<xsl:if test="contextlist/context
[normalize-space(.)='directory']">
<xsl:value-of select="$message[@id='directory']/@letter"/>
</xsl:if>
<xsl:if test="contextlist/context
[normalize-space(.)='.htaccess']">
<xsl:value-of select="$message[@id='htaccess']/@letter"/>
</xsl:if>
<xsl:text>&amp;</xsl:text>
<xsl:variable name="status" select="translate(
/status, $uppercase, $lowercase)"/>
<xsl:value-of select="$message[@id=$status]/@letter"/>
<xsl:text>\\*</xsl:text>&lf;
<xsl:text>\multicolumn{4}{l}{\begin{minipage}[t]{.95\textwidth}</xsl:text>
<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>
<xsl:text>\hfill p.\ \pageref{/mod/</xsl:text>
<xsl:value-of select="/name"/> <xsl:text>:</xsl:text>
<xsl:value-of select="translate(name, $uppercase, $lowercase)"/>
<xsl:text>}</xsl:text>
<xsl:text>\end{minipage}} \\ \hline</xsl:text>&lf;
</xsl:for-each> <!-- /directives -->
<xsl:text>\end{longtable}</xsl:text>&lf;
<xsl:text>\normalsize</xsl:text>
</xsl:template>
<xsl:template match="legend">
<!-- TODO: This table is no longer in source file
<xsl:apply-templates/>
-->
</xsl:template>
</xsl:stylesheet>