home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 November / PCWorld_2003-11_cd.bin / Komunik / apache / apache_2.0.47-win32-x86-no_ssl.msi / Data.Cab / F251399_synopsis.xsl < prev    next >
Extensible Markup Language  |  2003-05-29  |  22KB  |  544 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. <!DOCTYPE xsl:stylesheet [
  56.     <!ENTITY lf SYSTEM "util/lf.xml">
  57. ]>
  58. <xsl:stylesheet version="1.0"
  59.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  60.                   xmlns="http://www.w3.org/1999/xhtml">
  61.  
  62. <!-- ==================================================================== -->
  63. <!-- <modulesynopsis>                                                     -->
  64. <!-- Process an entire document into an HTML page                         -->
  65. <!-- ==================================================================== -->
  66. <xsl:template match="modulesynopsis">
  67. <html xml:lang="{$messages/@lang}" lang="{$messages/@lang}">
  68.     <xsl:call-template name="head" />&lf;
  69.  
  70.     <body>&lf;
  71.         <xsl:call-template name="top" />&lf;
  72.  
  73.         <div id="page-content">&lf;
  74.             <div id="preamble">
  75.                 <h1>
  76.                     <xsl:choose>
  77.                     <xsl:when test="status='Core'">
  78.                         <xsl:value-of select="$messages/message
  79.                                               [@name='apachecore']" />
  80.                     </xsl:when>
  81.                     <xsl:when test="name='mpm_common'">
  82.                         <xsl:value-of select="$messages/message
  83.                                               [@name='apachempmcommon']" />
  84.                     </xsl:when>
  85.                     <xsl:when test="status='MPM'">
  86.                         <xsl:value-of select="$messages/message
  87.                                               [@name='apachempm']" />
  88.                         <xsl:text> </xsl:text>
  89.                         <xsl:call-template name="module-translatename">
  90.                             <xsl:with-param name="name" select="name" />
  91.                         </xsl:call-template>
  92.                     </xsl:when>
  93.                     <xsl:otherwise>
  94.                         <xsl:value-of select="$messages/message
  95.                                               [@name='apachemodule']" />
  96.                         <xsl:text> </xsl:text>
  97.                         <xsl:value-of select="name" />
  98.                     </xsl:otherwise>
  99.                     </xsl:choose>
  100.                 </h1>&lf;
  101.  
  102.                 <xsl:call-template name="langavail" />&lf;
  103.  
  104.                 <!-- Description and module-headers -->
  105.                 <table class="module">
  106.                 <tr>
  107.                     <th>
  108.                         <a href="module-dict.html#Description">
  109.                             <xsl:value-of select="$messages/message
  110.                                                   [@name='description']" />
  111.                             <xsl:text>:</xsl:text>
  112.                         </a>
  113.                     </th>
  114.                     <td>
  115.                         <xsl:apply-templates select="description" />
  116.                     </td>
  117.                 </tr>&lf;
  118.                 <tr>
  119.                     <th>
  120.                         <a href="module-dict.html#Status">
  121.                             <xsl:value-of select="$messages/message
  122.                                                   [@name='status']" />
  123.                             <xsl:text>:</xsl:text>
  124.                         </a>
  125.                     </th>
  126.                     <td>
  127.                         <xsl:value-of select="status" />
  128.                     </td>
  129.                 </tr>
  130.  
  131.                 <xsl:if test="identifier">&lf;
  132.                 <tr>
  133.                     <th>
  134.                         <a href="module-dict.html#ModuleIdentifier">
  135.                             <xsl:value-of select="$messages/message
  136.                                                   [@name='moduleidentifier']" />
  137.                             <xsl:text>:</xsl:text>
  138.                         </a>
  139.                     </th>
  140.                     <td>
  141.                         <xsl:value-of select="identifier" />
  142.                     </td>
  143.                 </tr>
  144.                 </xsl:if>
  145.  
  146.                 <xsl:if test="sourcefile">&lf;
  147.                 <tr>
  148.                     <th>
  149.                         <a href="module-dict.html#SourceFile">
  150.                             <xsl:value-of select="$messages/message
  151.                                                   [@name='sourcefile']" />
  152.                             <xsl:text>:</xsl:text>
  153.                         </a>
  154.                     </th>
  155.                     <td>
  156.                         <xsl:value-of select="sourcefile" />
  157.                     </td>
  158.                 </tr>
  159.                 </xsl:if>
  160.  
  161.                 <xsl:if test="compatibility">&lf;
  162.                 <tr>
  163.                     <th>
  164.                         <a href="module-dict.html#Compatibility">
  165.                             <xsl:value-of select="$messages/message
  166.                                                   [@name='compatibility']" />
  167.                             <xsl:text>:</xsl:text>
  168.                         </a>
  169.                     </th>
  170.                     <td>
  171.                         <xsl:apply-templates select="compatibility" />
  172.                     </td>
  173.                 </tr>
  174.                 </xsl:if>
  175.                 </table>&lf;
  176.  
  177.                 <!-- Summary of module features/usage (1 to 3 paragraphs, -->
  178.                 <!-- optional)                                            -->
  179.                 <xsl:if test="summary">
  180.                     <h3>
  181.                         <xsl:value-of select="$messages/message
  182.                                               [@name='summary']" />
  183.                     </h3>&lf;
  184.  
  185.                     <xsl:apply-templates select="summary" />
  186.                 </xsl:if>
  187.             </div>&lf; <!-- /#preamble -->
  188.  
  189.             <xsl:if test="not($is-chm) or seealso">
  190.                 <div id="quickview">
  191.                     <xsl:if test="not($is-chm)">
  192.                         <h3 class="directives">
  193.                             <xsl:value-of select="$messages/message
  194.                                                   [@name='directives']" />
  195.                         </h3>&lf;
  196.  
  197.                         <xsl:choose>
  198.                         <xsl:when test="directivesynopsis">
  199.                             <ul id="toc">&lf;
  200.                             <xsl:for-each select="directivesynopsis">
  201.                             <xsl:sort select="name" />
  202.                                 <xsl:variable name="lowername"
  203.                                     select="translate(name, $uppercase,
  204.                                                       $lowercase)" />
  205.  
  206.                                 <xsl:choose>
  207.                                 <xsl:when test="not(@location)">
  208.                                     <li>
  209.                                         <img src="{$path}/images/down.gif"
  210.                                             alt="" />
  211.                                         <xsl:text> </xsl:text>
  212.                                         <a href="#{$lowername}">
  213.                                             <xsl:if test="@type='section'"
  214.                                                 ><</xsl:if>
  215.                                             <xsl:value-of select="name" />
  216.                                             <xsl:if test="@type='section'"
  217.                                                 >></xsl:if>
  218.                                         </a>
  219.                                     </li>&lf;
  220.                                 </xsl:when>
  221.                                 <xsl:otherwise>
  222.                                     <xsl:variable name="lowerlocation"
  223.                                         select="translate(@location, $uppercase,
  224.                                                           $lowercase)" />
  225.                                     <li>
  226.                                         <img src="{$path}/images/right.gif"
  227.                                             alt="" />
  228.                                         <xsl:text> </xsl:text>
  229.                                         <a href="{$lowerlocation}.html#{
  230.                                                                    $lowername}">
  231.                                             <xsl:if test="@type='section'"
  232.                                                 ><</xsl:if>
  233.                                             <xsl:value-of select="name" />
  234.                                             <xsl:if test="@type='section'"
  235.                                                 >></xsl:if>
  236.                                         </a>
  237.                                     </li>&lf;
  238.                                 </xsl:otherwise>
  239.                                 </xsl:choose>
  240.                             </xsl:for-each>
  241.                             </ul>&lf; <!-- /toc -->
  242.                         </xsl:when> <!-- have directives -->
  243.  
  244.                         <xsl:otherwise>
  245.                             <p>
  246.                                 <xsl:value-of select="$messages/message
  247.                                                       [@name='nodirectives']" />
  248.                             </p>&lf;
  249.                         </xsl:otherwise>
  250.                         </xsl:choose>
  251.  
  252.                         <xsl:if test="section">
  253.                             <h3>
  254.                                 <xsl:value-of select="$messages/message
  255.                                                       [@name='topics']" />
  256.                             </h3>&lf;
  257.  
  258.                             <ul id="topics">&lf;
  259.                             <xsl:apply-templates
  260.                                 select="section" mode="index" />
  261.                             </ul>
  262.                         </xsl:if>
  263.                     </xsl:if> <!-- /!is-chm -->
  264.  
  265.                     <xsl:if test="seealso">
  266.                         <h3>
  267.                             <xsl:value-of select="$messages/message
  268.                                                   [@name='seealso']" />
  269.                         </h3>&lf;
  270.  
  271.                         <ul class="seealso">&lf;
  272.                         <xsl:for-each select="seealso">
  273.                             <li>
  274.                                 <xsl:apply-templates />
  275.                             </li>&lf;
  276.                         </xsl:for-each>
  277.                         </ul>
  278.                     </xsl:if>
  279.                 </div> <!-- /#quickview -->
  280.             </xsl:if>&lf; <!-- have sidebar -->
  281.  
  282.             <!-- Sections of documentation about the module as a whole -->
  283.             <xsl:apply-templates select="section" />&lf;
  284.  
  285.             <!-- Directive documentation -->
  286.             <xsl:apply-templates select="directivesynopsis">
  287.                 <xsl:sort select="name" />
  288.             </xsl:apply-templates>
  289.         </div>&lf; <!-- /#page-content -->
  290.  
  291.         <xsl:call-template name="bottom" />&lf;
  292.     </body>
  293. </html>
  294. </xsl:template>
  295. <!-- /modulesynopsis -->
  296.  
  297.  
  298. <!-- ==================================================================== -->
  299. <!-- Directivesynopsis                                                    -->
  300. <!-- ==================================================================== -->
  301. <xsl:template match="directivesynopsis">
  302. <xsl:if test="not(@location)">
  303.     <xsl:call-template name="toplink" />&lf;
  304.  
  305.     <div class="directive-section">
  306.         <xsl:variable name="lowername"
  307.             select="translate(name, $uppercase, $lowercase)" />
  308.  
  309.         <!-- Directive heading gets both mixed case and lowercase      -->
  310.         <!-- anchors, and includes lt/gt only for "section" directives -->
  311.         <h2>
  312.             <a id="{name}" name="{name}">
  313.                 <xsl:if test="@type='section'"><</xsl:if>
  314.                 <xsl:value-of select="name" />
  315.                 <xsl:if test="@type='section'">></xsl:if>
  316.             </a>
  317.  
  318.             <xsl:choose>
  319.             <xsl:when test="$messages/message
  320.                             [@name='directive']/@replace-space-with">
  321.                 <xsl:value-of select="$messages/message
  322.                                       [@name='directive']/@replace-space-with"/>
  323.             </xsl:when>
  324.             <xsl:otherwise>
  325.                 <xsl:text> </xsl:text>
  326.             </xsl:otherwise>
  327.             </xsl:choose>
  328.  
  329.             <a id="{$lowername}" name="{$lowername}">
  330.                 <xsl:value-of select="$messages/message[@name='directive']" />
  331.             </a>
  332.         </h2>&lf;
  333.  
  334.         <!-- Directive header -->
  335.         <table class="directive">&lf;
  336.         <tr>
  337.             <th>
  338.                 <a href="directive-dict.html#Description">
  339.                     <xsl:value-of select="$messages/message
  340.                                           [@name='description']" />
  341.                     <xsl:text>:</xsl:text>
  342.                 </a>
  343.             </th>
  344.             <td>
  345.                 <xsl:value-of select="description" />
  346.             </td>
  347.         </tr>&lf;
  348.  
  349.         <tr>
  350.             <th>
  351.                 <a href="directive-dict.html#Syntax">
  352.                     <xsl:value-of select="$messages/message[@name='syntax']" />
  353.                     <xsl:text>:</xsl:text>
  354.                 </a>
  355.             </th>
  356.             <td>
  357.                 <code>
  358.                     <xsl:apply-templates select="syntax" />
  359.                 </code>
  360.             </td>
  361.         </tr>
  362.  
  363.         <xsl:if test="default">&lf;
  364.         <tr>
  365.             <th>
  366.                 <a href="directive-dict.html#Default">
  367.                     <xsl:value-of select="$messages/message[@name='default']" />
  368.                     <xsl:text>:</xsl:text>
  369.                 </a>
  370.             </th>
  371.             <td>
  372.                 <code>
  373.                     <xsl:apply-templates select="default" />
  374.                 </code>
  375.             </td>
  376.         </tr>
  377.         </xsl:if>&lf;
  378.  
  379.         <tr>
  380.             <th>
  381.                 <a href="directive-dict.html#Context">
  382.                     <xsl:value-of select="$messages/message[@name='context']" />
  383.                     <xsl:text>:</xsl:text>
  384.                 </a>
  385.             </th>
  386.             <td>
  387.                 <xsl:apply-templates select="contextlist" />
  388.             </td>
  389.         </tr>
  390.  
  391.         <xsl:if test="override">&lf;
  392.         <tr>
  393.             <th>
  394.                 <a href="directive-dict.html#Override">
  395.                     <xsl:value-of select="$messages/message[@name='override']"/>
  396.                     <xsl:text>:</xsl:text>
  397.                 </a>
  398.             </th>
  399.             <td>
  400.                 <xsl:value-of select="override" />
  401.             </td>
  402.         </tr>
  403.         </xsl:if>&lf;
  404.  
  405.         <tr>
  406.             <th>
  407.                 <a href="directive-dict.html#Status">
  408.                     <xsl:value-of select="$messages/message[@name='status']" />
  409.                     <xsl:text>:</xsl:text>
  410.                 </a>
  411.             </th>
  412.             <td>
  413.                 <xsl:value-of select="../status" />
  414.             </td>
  415.         </tr>&lf;
  416.  
  417.         <tr>
  418.             <th>
  419.                 <a href="directive-dict.html#Module">
  420.                     <xsl:value-of select="$messages/message[@name='module']" />
  421.                     <xsl:text>:</xsl:text>
  422.                 </a>
  423.             </th>
  424.             <td>
  425.                 <xsl:choose>
  426.                 <xsl:when test="modulelist">
  427.                     <xsl:apply-templates select="modulelist" />
  428.                 </xsl:when>
  429.                 <xsl:otherwise>
  430.                     <xsl:value-of select="../name" />
  431.                 </xsl:otherwise>
  432.                 </xsl:choose>
  433.             </td>
  434.         </tr>
  435.  
  436.         <xsl:if test="compatibility">&lf;
  437.         <tr>
  438.             <th>
  439.                 <a href="directive-dict.html#Compatibility">
  440.                     <xsl:value-of select="$messages/message
  441.                                           [@name='compatibility']" />
  442.                     <xsl:text>:</xsl:text>
  443.                 </a>
  444.             </th>
  445.             <td>
  446.                 <xsl:apply-templates select="compatibility" />
  447.             </td>
  448.         </tr>
  449.         </xsl:if>&lf;
  450.         </table>
  451.  
  452.         <xsl:apply-templates select="usage" />&lf;
  453.  
  454.         <xsl:if test="seealso">
  455.             <h3>
  456.                 <xsl:value-of select="$messages/message[@name='seealso']" />
  457.             </h3>&lf;
  458.  
  459.             <ul>&lf;
  460.             <xsl:for-each select="seealso">
  461.                 <li>
  462.                     <xsl:apply-templates />
  463.                 </li>&lf;
  464.             </xsl:for-each>
  465.             </ul>&lf;
  466.         </xsl:if>
  467.     </div>&lf; <!-- /.directive-section -->
  468. </xsl:if>
  469. </xsl:template>
  470. <!-- /directivesynopsis -->
  471.  
  472.  
  473. <!-- ==================================================================== -->
  474. <!-- <contextlist>                                                        -->
  475. <!-- ==================================================================== -->
  476. <xsl:template match="contextlist">
  477. <xsl:apply-templates select="context" />
  478. </xsl:template>
  479. <!-- /contextlist -->
  480.  
  481.  
  482. <!-- ==================================================================== -->
  483. <!-- <context>                                                            -->
  484. <!-- Each entry is separeted with a comma                                 -->
  485. <!-- ==================================================================== -->
  486. <xsl:template match="context">
  487. <xsl:choose>
  488. <xsl:when test="normalize-space(.) = 'server config'">
  489.     <xsl:value-of select="$messages/message[@name='serverconfig']" />
  490. </xsl:when>
  491. <xsl:when test="normalize-space(.) = 'virtual host'">
  492.     <xsl:value-of select="$messages/message[@name='virtualhost']" />
  493. </xsl:when>
  494. <xsl:when test="normalize-space(.) = 'directory'">
  495.     <xsl:value-of select="$messages/message[@name='directory']" />
  496. </xsl:when>
  497. <xsl:when test="normalize-space(.) = '.htaccess'">
  498.     <xsl:value-of select="$messages/message[@name='htaccess']" />
  499. </xsl:when>
  500. <xsl:otherwise> <!-- error -->
  501.     <xsl:message terminate="yes">
  502.         unknown context: <xsl:value-of select="." />
  503.     </xsl:message>
  504. </xsl:otherwise>
  505. </xsl:choose>
  506.  
  507. <xsl:if test="position() != last()">
  508.     <xsl:text>, </xsl:text>
  509. </xsl:if>
  510. </xsl:template>
  511. <!-- /context -->
  512.  
  513.  
  514. <!-- ==================================================================== -->
  515. <!-- <modulelist>                                                         -->
  516. <!-- ==================================================================== -->
  517. <xsl:template match="modulelist">
  518. <xsl:for-each select="module">
  519.     <xsl:call-template name="module" />
  520.     <xsl:if test="position() != last()">
  521.         <xsl:text>, </xsl:text>
  522.     </xsl:if>
  523. </xsl:for-each>
  524. </xsl:template>
  525. <!-- /modulelist -->
  526.  
  527.  
  528. <!-- ==================================================================== -->
  529. <!-- modulesynopsis/compatibility                                         -->
  530. <!-- ==================================================================== -->
  531. <xsl:template match="modulesynopsis/compatibility">
  532. <xsl:apply-templates />
  533. </xsl:template>
  534.  
  535.  
  536. <!-- ==================================================================== -->
  537. <!-- directivesynopsis/compatibility                                      -->
  538. <!-- ==================================================================== -->
  539. <xsl:template match="directivesynopsis/compatibility">
  540. <xsl:apply-templates />
  541. </xsl:template>
  542.  
  543. </xsl:stylesheet>
  544.