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 < prev    next >
Encoding:
Extensible Markup Language  |  2003-06-30  |  6.9 KB  |  176 lines

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