home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _FC913B24DD7BEC2C19805F3E239F5CCF < prev    next >
Extensible Markup Language  |  2006-07-11  |  20KB  |  509 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.  Licensed to the Apache Software Foundation (ASF) under one or more
  5.  contributor license agreements.  See the NOTICE file distributed with
  6.  this work for additional information regarding copyright ownership.
  7.  The ASF licenses this file to You under the Apache License, Version 2.0
  8.  (the "License"); you may not use this file except in compliance with
  9.  the License.  You may obtain a copy of the License at
  10.  
  11.      http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13.  Unless required by applicable law or agreed to in writing, software
  14.  distributed under the License is distributed on an "AS IS" BASIS,
  15.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16.  See the License for the specific language governing permissions and
  17.  limitations under the License.
  18. -->
  19.  
  20. <!DOCTYPE xsl:stylesheet [
  21.     <!ENTITY lf SYSTEM "util/lf.xml">
  22. ]>
  23. <xsl:stylesheet version="1.0"
  24.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  25.                   xmlns="http://www.w3.org/1999/xhtml">
  26.  
  27. <!-- ==================================================================== -->
  28. <!-- <modulesynopsis>                                                     -->
  29. <!-- Process an entire document into an HTML page                         -->
  30. <!-- ==================================================================== -->
  31. <xsl:template match="modulesynopsis">
  32. <html xml:lang="{$doclang}" lang="{$doclang}">
  33.     <xsl:call-template name="head" />&lf;
  34.  
  35.     <body>&lf;
  36.         <xsl:call-template name="top" />&lf;
  37.  
  38.         <div id="page-content">&lf;
  39.             <div id="preamble">
  40.                 <h1>
  41.                     <xsl:choose>
  42.                     <xsl:when test="status='Core'">
  43.                         <xsl:value-of select="$message
  44.                                               [@id='apachecore']" />
  45.                     </xsl:when>
  46.                     <xsl:when test="name='mpm_common'">
  47.                         <xsl:value-of select="$message
  48.                                               [@id='apachempmcommon']" />
  49.                     </xsl:when>
  50.                     <xsl:when test="status='MPM'">
  51.                         <xsl:value-of select="$message
  52.                                               [@id='apachempm']" />
  53.                         <xsl:text> </xsl:text>
  54.                         <xsl:call-template name="module-translatename">
  55.                             <xsl:with-param name="name" select="name" />
  56.                         </xsl:call-template>
  57.                     </xsl:when>
  58.                     <xsl:otherwise>
  59.                         <xsl:value-of select="$message
  60.                                               [@id='apachemodule']" />
  61.                         <xsl:text> </xsl:text>
  62.                         <xsl:value-of select="name" />
  63.                     </xsl:otherwise>
  64.                     </xsl:choose>
  65.                 </h1>&lf;
  66.  
  67.                 <xsl:call-template name="langavail" />&lf;
  68.  
  69.                 <!-- Description and module-headers -->
  70.                 <table class="module">
  71.                 <tr>
  72.                     <th>
  73.                         <a href="module-dict.html#Description">
  74.                             <xsl:value-of select="$message
  75.                                                   [@id='description']" />
  76.                             <xsl:text>:</xsl:text>
  77.                         </a>
  78.                     </th>
  79.                     <td>
  80.                         <xsl:apply-templates select="description" />
  81.                     </td>
  82.                 </tr>&lf;
  83.                 <tr>
  84.                     <th>
  85.                         <a href="module-dict.html#Status">
  86.                             <xsl:value-of select="$message
  87.                                                   [@id='status']" />
  88.                             <xsl:text>:</xsl:text>
  89.                         </a>
  90.                     </th>
  91.                     <td>
  92.                         <xsl:value-of select="status" />
  93.                     </td>
  94.                 </tr>
  95.  
  96.                 <xsl:if test="identifier">&lf;
  97.                 <tr>
  98.                     <th>
  99.                         <a href="module-dict.html#ModuleIdentifier">
  100.                             <xsl:value-of select="$message
  101.                                                   [@id='moduleidentifier']" />
  102.                             <xsl:text>:</xsl:text>
  103.                         </a>
  104.                     </th>
  105.                     <td>
  106.                         <xsl:value-of select="identifier" />
  107.                     </td>
  108.                 </tr>
  109.                 </xsl:if>
  110.  
  111.                 <xsl:if test="sourcefile">&lf;
  112.                 <tr>
  113.                     <th>
  114.                         <a href="module-dict.html#SourceFile">
  115.                             <xsl:value-of select="$message
  116.                                                   [@id='sourcefile']" />
  117.                             <xsl:text>:</xsl:text>
  118.                         </a>
  119.                     </th>
  120.                     <td>
  121.                         <xsl:value-of select="sourcefile" />
  122.                     </td>
  123.                 </tr>
  124.                 </xsl:if>
  125.  
  126.                 <xsl:if test="compatibility">&lf;
  127.                 <tr>
  128.                     <th>
  129.                         <a href="module-dict.html#Compatibility">
  130.                             <xsl:value-of select="$message
  131.                                                   [@id='compatibility']" />
  132.                             <xsl:text>:</xsl:text>
  133.                         </a>
  134.                     </th>
  135.                     <td>
  136.                         <xsl:apply-templates select="compatibility" />
  137.                     </td>
  138.                 </tr>
  139.                 </xsl:if>
  140.                 </table>&lf;
  141.  
  142.                 <!-- Summary of module features/usage (1 to 3 paragraphs, -->
  143.                 <!-- optional)                                            -->
  144.                 <xsl:if test="summary">
  145.                     <h3>
  146.                         <xsl:value-of select="$message
  147.                                               [@id='summary']" />
  148.                     </h3>&lf;
  149.  
  150.                     <xsl:apply-templates select="summary" />
  151.                 </xsl:if>
  152.             </div>&lf; <!-- /#preamble -->
  153.  
  154.             <xsl:if test="not($is-chm) or seealso">
  155.                 <div id="quickview">
  156.                     <xsl:if test="not($is-chm)">
  157.                         <h3 class="directives">
  158.                             <xsl:value-of select="$message
  159.                                                   [@id='directives']" />
  160.                         </h3>&lf;
  161.  
  162.                         <xsl:choose>
  163.                         <xsl:when test="directivesynopsis">
  164.                             <ul id="toc">&lf;
  165.                             <xsl:for-each select="directivesynopsis">
  166.                             <xsl:sort select="name" />
  167.                                 <xsl:variable name="lowername"
  168.                                     select="translate(name, $uppercase,
  169.                                                       $lowercase)" />
  170.  
  171.                                 <xsl:choose>
  172.                                 <xsl:when test="not(@location)">
  173.                                     <li>
  174.                                         <img src="{$path}/images/down.gif"
  175.                                             alt="" />
  176.                                         <xsl:text> </xsl:text>
  177.                                         <a href="#{$lowername}">
  178.                                             <xsl:if test="@type='section'"
  179.                                                 ><</xsl:if>
  180.                                             <xsl:value-of select="name" />
  181.                                             <xsl:if test="@type='section'"
  182.                                                 >></xsl:if>
  183.                                         </a>
  184.                                     </li>&lf;
  185.                                 </xsl:when>
  186.                                 <xsl:otherwise>
  187.                                     <xsl:variable name="lowerlocation"
  188.                                         select="translate(@location, $uppercase,
  189.                                                           $lowercase)" />
  190.                                     <li>
  191.                                         <img src="{$path}/images/right.gif"
  192.                                             alt="" />
  193.                                         <xsl:text> </xsl:text>
  194.                                         <a href="{$lowerlocation}.html#{
  195.                                                                    $lowername}">
  196.                                             <xsl:if test="@type='section'"
  197.                                                 ><</xsl:if>
  198.                                             <xsl:value-of select="name" />
  199.                                             <xsl:if test="@type='section'"
  200.                                                 >></xsl:if>
  201.                                         </a>
  202.                                     </li>&lf;
  203.                                 </xsl:otherwise>
  204.                                 </xsl:choose>
  205.                             </xsl:for-each>
  206.                             </ul>&lf; <!-- /toc -->
  207.                         </xsl:when> <!-- have directives -->
  208.  
  209.                         <xsl:otherwise>
  210.                             <p>
  211.                                 <xsl:value-of select="$message
  212.                                                       [@id='nodirectives']" />
  213.                             </p>&lf;
  214.                         </xsl:otherwise>
  215.                         </xsl:choose>
  216.  
  217.                         <xsl:if test="section">
  218.                             <h3>
  219.                                 <xsl:value-of select="$message
  220.                                                       [@id='topics']" />
  221.                             </h3>&lf;
  222.  
  223.                             <ul id="topics">&lf;
  224.                             <xsl:apply-templates
  225.                                 select="section" mode="index" />
  226.                             </ul>
  227.                         </xsl:if>
  228.                     </xsl:if> <!-- /!is-chm -->
  229.  
  230.                     <xsl:if test="seealso">
  231.                         <h3>
  232.                             <xsl:value-of select="$message
  233.                                                   [@id='seealso']" />
  234.                         </h3>&lf;
  235.  
  236.                         <ul class="seealso">&lf;
  237.                         <xsl:for-each select="seealso">
  238.                             <li>
  239.                                 <xsl:apply-templates />
  240.                             </li>&lf;
  241.                         </xsl:for-each>
  242.                         </ul>
  243.                     </xsl:if>
  244.                 </div> <!-- /#quickview -->
  245.             </xsl:if>&lf; <!-- have sidebar -->
  246.  
  247.             <!-- Sections of documentation about the module as a whole -->
  248.             <xsl:apply-templates select="section" />&lf;
  249.  
  250.             <!-- Directive documentation -->
  251.             <xsl:apply-templates select="directivesynopsis">
  252.                 <xsl:sort select="name" />
  253.             </xsl:apply-templates>
  254.         </div>&lf; <!-- /#page-content -->
  255.  
  256.         <xsl:call-template name="bottom" />&lf;
  257.     </body>
  258. </html>
  259. </xsl:template>
  260. <!-- /modulesynopsis -->
  261.  
  262.  
  263. <!-- ==================================================================== -->
  264. <!-- Directivesynopsis                                                    -->
  265. <!-- ==================================================================== -->
  266. <xsl:template match="directivesynopsis">
  267. <xsl:if test="not(@location)">
  268.     <xsl:call-template name="toplink" />&lf;
  269.  
  270.     <div class="directive-section">
  271.         <xsl:variable name="lowername"
  272.             select="translate(name, $uppercase, $lowercase)" />
  273.  
  274.         <!-- Directive heading gets both mixed case and lowercase      -->
  275.         <!-- anchors, and includes lt/gt only for "section" directives -->
  276.         <h2>
  277.             <a id="{name}" name="{name}">
  278.                 <xsl:if test="@type='section'"><</xsl:if>
  279.                 <xsl:value-of select="name" />
  280.                 <xsl:if test="@type='section'">></xsl:if>
  281.             </a>
  282.  
  283.             <xsl:choose>
  284.             <xsl:when test="$message
  285.                             [@id='directive']/@replace-space-with">
  286.                 <xsl:value-of select="$message
  287.                                       [@id='directive']/@replace-space-with"/>
  288.             </xsl:when>
  289.             <xsl:otherwise>
  290.                 <xsl:text> </xsl:text>
  291.             </xsl:otherwise>
  292.             </xsl:choose>
  293.  
  294.             <a id="{$lowername}" name="{$lowername}">
  295.                 <xsl:value-of select="$message[@id='directive']" />
  296.             </a>
  297.         </h2>&lf;
  298.  
  299.         <!-- Directive header -->
  300.         <table class="directive">&lf;
  301.         <tr>
  302.             <th>
  303.                 <a href="directive-dict.html#Description">
  304.                     <xsl:value-of select="$message
  305.                                           [@id='description']" />
  306.                     <xsl:text>:</xsl:text>
  307.                 </a>
  308.             </th>
  309.             <td>
  310.                 <xsl:apply-templates select="description" />
  311.             </td>
  312.         </tr>&lf;
  313.  
  314.         <tr>
  315.             <th>
  316.                 <a href="directive-dict.html#Syntax">
  317.                     <xsl:value-of select="$message[@id='syntax']" />
  318.                     <xsl:text>:</xsl:text>
  319.                 </a>
  320.             </th>
  321.             <td>
  322.                 <code>
  323.                     <xsl:apply-templates select="syntax" />
  324.                 </code>
  325.             </td>
  326.         </tr>
  327.  
  328.         <xsl:if test="default">&lf;
  329.         <tr>
  330.             <th>
  331.                 <a href="directive-dict.html#Default">
  332.                     <xsl:value-of select="$message[@id='default']" />
  333.                     <xsl:text>:</xsl:text>
  334.                 </a>
  335.             </th>
  336.             <td>
  337.                 <code>
  338.                     <xsl:apply-templates select="default" />
  339.                 </code>
  340.             </td>
  341.         </tr>
  342.         </xsl:if>&lf;
  343.  
  344.         <tr>
  345.             <th>
  346.                 <a href="directive-dict.html#Context">
  347.                     <xsl:value-of select="$message[@id='context']" />
  348.                     <xsl:text>:</xsl:text>
  349.                 </a>
  350.             </th>
  351.             <td>
  352.                 <xsl:apply-templates select="contextlist" />
  353.             </td>
  354.         </tr>
  355.  
  356.         <xsl:if test="override">&lf;
  357.         <tr>
  358.             <th>
  359.                 <a href="directive-dict.html#Override">
  360.                     <xsl:value-of select="$message[@id='override']"/>
  361.                     <xsl:text>:</xsl:text>
  362.                 </a>
  363.             </th>
  364.             <td>
  365.                 <xsl:value-of select="override" />
  366.             </td>
  367.         </tr>
  368.         </xsl:if>&lf;
  369.  
  370.         <tr>
  371.             <th>
  372.                 <a href="directive-dict.html#Status">
  373.                     <xsl:value-of select="$message[@id='status']" />
  374.                     <xsl:text>:</xsl:text>
  375.                 </a>
  376.             </th>
  377.             <td>
  378.                 <xsl:value-of select="../status" />
  379.             </td>
  380.         </tr>&lf;
  381.  
  382.         <tr>
  383.             <th>
  384.                 <a href="directive-dict.html#Module">
  385.                     <xsl:value-of select="$message[@id='module']" />
  386.                     <xsl:text>:</xsl:text>
  387.                 </a>
  388.             </th>
  389.             <td>
  390.                 <xsl:choose>
  391.                 <xsl:when test="modulelist">
  392.                     <xsl:apply-templates select="modulelist" />
  393.                 </xsl:when>
  394.                 <xsl:otherwise>
  395.                     <xsl:value-of select="../name" />
  396.                 </xsl:otherwise>
  397.                 </xsl:choose>
  398.             </td>
  399.         </tr>
  400.  
  401.         <xsl:if test="compatibility">&lf;
  402.         <tr>
  403.             <th>
  404.                 <a href="directive-dict.html#Compatibility">
  405.                     <xsl:value-of select="$message
  406.                                           [@id='compatibility']" />
  407.                     <xsl:text>:</xsl:text>
  408.                 </a>
  409.             </th>
  410.             <td>
  411.                 <xsl:apply-templates select="compatibility" />
  412.             </td>
  413.         </tr>
  414.         </xsl:if>&lf;
  415.         </table>
  416.  
  417.         <xsl:apply-templates select="usage" />&lf;
  418.  
  419.         <xsl:if test="seealso">
  420.             <h3>
  421.                 <xsl:value-of select="$message[@id='seealso']" />
  422.             </h3>&lf;
  423.  
  424.             <ul>&lf;
  425.             <xsl:for-each select="seealso">
  426.                 <li>
  427.                     <xsl:apply-templates />
  428.                 </li>&lf;
  429.             </xsl:for-each>
  430.             </ul>&lf;
  431.         </xsl:if>
  432.     </div>&lf; <!-- /.directive-section -->
  433. </xsl:if>
  434. </xsl:template>
  435. <!-- /directivesynopsis -->
  436.  
  437.  
  438. <!-- ==================================================================== -->
  439. <!-- <contextlist>                                                        -->
  440. <!-- ==================================================================== -->
  441. <xsl:template match="contextlist">
  442. <xsl:apply-templates select="context" />
  443. </xsl:template>
  444. <!-- /contextlist -->
  445.  
  446.  
  447. <!-- ==================================================================== -->
  448. <!-- <context>                                                            -->
  449. <!-- Each entry is separeted with a comma                                 -->
  450. <!-- ==================================================================== -->
  451. <xsl:template match="context">
  452. <xsl:choose>
  453. <xsl:when test="normalize-space(.) = 'server config'">
  454.     <xsl:value-of select="$message[@id='serverconfig']" />
  455. </xsl:when>
  456. <xsl:when test="normalize-space(.) = 'virtual host'">
  457.     <xsl:value-of select="$message[@id='virtualhost']" />
  458. </xsl:when>
  459. <xsl:when test="normalize-space(.) = 'directory'">
  460.     <xsl:value-of select="$message[@id='directory']" />
  461. </xsl:when>
  462. <xsl:when test="normalize-space(.) = '.htaccess'">
  463.     <xsl:value-of select="$message[@id='htaccess']" />
  464. </xsl:when>
  465. <xsl:otherwise> <!-- error -->
  466.     <xsl:message terminate="yes">
  467.         unknown context: <xsl:value-of select="." />
  468.     </xsl:message>
  469. </xsl:otherwise>
  470. </xsl:choose>
  471.  
  472. <xsl:if test="position() != last()">
  473.     <xsl:text>, </xsl:text>
  474. </xsl:if>
  475. </xsl:template>
  476. <!-- /context -->
  477.  
  478.  
  479. <!-- ==================================================================== -->
  480. <!-- <modulelist>                                                         -->
  481. <!-- ==================================================================== -->
  482. <xsl:template match="modulelist">
  483. <xsl:for-each select="module">
  484.     <xsl:call-template name="module" />
  485.     <xsl:if test="position() != last()">
  486.         <xsl:text>, </xsl:text>
  487.     </xsl:if>
  488. </xsl:for-each>
  489. </xsl:template>
  490. <!-- /modulelist -->
  491.  
  492.  
  493. <!-- ==================================================================== -->
  494. <!-- modulesynopsis/compatibility                                         -->
  495. <!-- ==================================================================== -->
  496. <xsl:template match="modulesynopsis/compatibility">
  497. <xsl:apply-templates />
  498. </xsl:template>
  499.  
  500.  
  501. <!-- ==================================================================== -->
  502. <!-- directivesynopsis/compatibility                                      -->
  503. <!-- ==================================================================== -->
  504. <xsl:template match="directivesynopsis/compatibility">
  505. <xsl:apply-templates />
  506. </xsl:template>
  507.  
  508. </xsl:stylesheet>
  509.