home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 May / PCWorld_2004-05_cd.bin / komunikace / apache / apache_2.0.48-win32-x86-no_ssl.msi / Data.Cab / F252972_quickreference.xsl (.txt) < prev    next >
LaTeX Document  |  2003-06-30  |  7KB  |  141 lines

  1. <?xml version="1.0"?><!--
  2. /* ====================================================================
  3.  * The Apache Software License, Version 1.1
  4.  * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
  5.  * reserved.
  6.  * Redistribution and use in source and binary forms, with or without
  7.  * modification, are permitted provided that the following conditions
  8.  * are met:
  9.  * 1. Redistributions of source code must retain the above copyright
  10.  *    notice, this list of conditions and the following disclaimer.
  11.  * 2. Redistributions in binary form must reproduce the above copyright
  12.  *    notice, this list of conditions and the following disclaimer in
  13.  *    the documentation and/or other materials provided with the
  14.  *    distribution.
  15.  * 3. The end-user documentation included with the redistribution,
  16.  *    if any, must include the following acknowledgment:
  17.  *       "This product includes software developed by the
  18.  *        Apache Software Foundation (http://www.apache.org/)."
  19.  *    Alternately, this acknowledgment may appear in the software itself,
  20.  *    if and wherever such third-party acknowledgments normally appear.
  21.  * 4. The names "Apache" and "Apache Software Foundation" must
  22.  *    not be used to endorse or promote products derived from this
  23.  *    software without prior written permission. For written
  24.  *    permission, please contact apache@apache.org.
  25.  * 5. Products derived from this software may not be called "Apache",
  26.  *    nor may "Apache" appear in their name, without prior written
  27.  *    permission of the Apache Software Foundation.
  28.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  29.  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  30.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  31.  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  32.  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  33.  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  34.  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  35.  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  36.  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  37.  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  38.  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  39.  * SUCH DAMAGE.
  40.  * ====================================================================
  41.  * This software consists of voluntary contributions made by many
  42.  * individuals on behalf of the Apache Software Foundation.  For more
  43.  * information on the Apache Software Foundation, please see
  44.  * <http://www.apache.org/>.
  45.  */ -->
  46. <xsl:stylesheet version="1.0"
  47.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  48.                   xmlns="http://www.w3.org/1999/xhtml">
  49. <!-- ==================================================================== -->
  50. <!-- <quickreference>                                                     -->
  51. <!-- Builds the directive quickreference page                             -->
  52. <!-- ==================================================================== -->
  53. <xsl:template match="quickreference">
  54.   <xsl:call-template name="section-title"/>
  55.   <xsl:apply-templates select="summary"/>
  56.   <xsl:call-template name="seealso"/>
  57.   <xsl:apply-templates select="legend"/>
  58.   <xsl:variable name="directives"
  59.        select="document(modulefilelist/modulefile)
  60.          /modulesynopsis/directivesynopsis[not(@location)]" />
  61.   <xsl:text>\footnotesize
  62. </xsl:text>
  63.   <xsl:text>\begin{longtable}{p{.60\textwidth}p{.25\textwidth}ll}\hline
  64. </xsl:text>
  65. <xsl:for-each
  66.    select="$directives[translate(substring(normalize-space(name), 1,1),
  67.                                           $lowercase,$uppercase)]">
  68. <xsl:sort select="name" />
  69.    <xsl:text>\texttt{</xsl:text>
  70.    <xsl:apply-templates select="syntax" />
  71.    <xsl:text>}</xsl:text>
  72.    <xsl:text>&</xsl:text>
  73.    <!-- if the default value contains (at least) one <br />, -->
  74.    <!-- this probably means that a short explanation follows -->
  75.    <!-- the actual default value. We cut off the string      -->
  76.    <!-- after the <br /> so it will not be shown here.       -->
  77.    <!-- (add the + character instead)                        -->
  78.    <xsl:variable name="default">
  79.        <xsl:choose>
  80.        <xsl:when test="count(default[count(br) > 0]) > 0">
  81.           <xsl:value-of select="default/child::node()
  82.                        [count(preceding-sibling::*) = 0]" />
  83.        </xsl:when>
  84.        <xsl:otherwise>
  85.             <xsl:value-of select="default"/>
  86.        </xsl:otherwise>
  87.        </xsl:choose>
  88.     </xsl:variable>
  89.      <xsl:call-template name="ltescape">
  90.         <xsl:with-param name="string">
  91.             <xsl:value-of select="substring(substring-after(concat($default,
  92.                                   ' '), name),1,20)" />
  93.         </xsl:with-param>
  94.       </xsl:call-template>
  95.       <xsl:if test="string-length(substring-after(concat($default, ' '),
  96.                 name)) > 20 or count(default[count(br) > 0]) > 0">
  97.          <xsl:text> +</xsl:text>
  98.       </xsl:if>
  99.       <xsl:text>&</xsl:text>
  100.             <xsl:if test="contextlist/context
  101.                           [normalize-space(.)='server config']">s</xsl:if>
  102.             <xsl:if test="contextlist/context
  103.                           [normalize-space(.)='virtual host']">v</xsl:if>
  104.             <xsl:if test="contextlist/context
  105.                           [normalize-space(.)='directory']">d</xsl:if>
  106.             <xsl:if test="contextlist/context
  107.                           [normalize-space(.)='.htaccess']">h</xsl:if>
  108.       <xsl:text>&</xsl:text>
  109.             <xsl:choose>
  110.             <xsl:when test="../status='Base'">B</xsl:when>
  111.             <xsl:when test="../status='MPM'">M</xsl:when>
  112.             <xsl:when test="../status='Core'">C</xsl:when>
  113.             <xsl:when test="../status='Extension'">E</xsl:when>
  114.             <xsl:when test="../status='Experimental'">X</xsl:when>
  115.             </xsl:choose>
  116.      <xsl:text>\\*
  117. </xsl:text>
  118.       <xsl:text>\multicolumn{4}{l}{\begin{minipage}[t]{.95\textwidth}</xsl:text>
  119.          <xsl:choose>
  120.          <xsl:when test="string-length(normalize-space(description)) > 0">
  121.              <xsl:apply-templates select="description"/>
  122.          </xsl:when>
  123.          <xsl:otherwise>
  124.              <xsl:text>-</xsl:text>
  125.          </xsl:otherwise>
  126.          </xsl:choose>
  127.       <xsl:text>\hfill p.\ \pageref{/mod/</xsl:text>
  128.         <xsl:value-of select="../name"/> <xsl:text>:</xsl:text>
  129.         <xsl:value-of select="translate(name, $uppercase, $lowercase)"/>
  130.       <xsl:text>}</xsl:text>
  131.     <xsl:text>\end{minipage}} \\ \hline
  132. </xsl:text>
  133.   </xsl:for-each> <!-- /directives -->
  134.   <xsl:text>\end{longtable}
  135. \normalsize</xsl:text>
  136. </xsl:template>
  137. <xsl:template match="legend">
  138. <xsl:apply-templates/>
  139. </xsl:template>
  140. </xsl:stylesheet>
  141.