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 / _8BA249B5A025EDA4AB1CAF27BEE98F6F < prev    next >
Extensible Markup Language  |  2006-07-11  |  5KB  |  131 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. <!-- <directiveindex>                                                     -->
  29. <!-- Builds the directive index page                                      -->
  30. <!-- ==================================================================== -->
  31. <xsl:template match="directiveindex">
  32. <html xml:lang="{$doclang}" lang="{$doclang}">
  33.     <xsl:call-template name="head"/>&lf;
  34.  
  35.     <body id="directive-index">
  36.         <xsl:call-template name="top"/>
  37.  
  38.         <xsl:variable name="directives"
  39.             select="document(document($allmodules)/modulefilelist/modulefile)
  40.                         /modulesynopsis[status!='Obsolete']
  41.                         /directivesynopsis[not(@location)]" />
  42.  
  43.         <!-- collect the start letters -->
  44.         <xsl:variable name="start-letters">
  45.             <xsl:call-template name="directive-startletters">
  46.                 <xsl:with-param name="directives" select="$directives" />
  47.             </xsl:call-template>
  48.         </xsl:variable>
  49.  
  50.         <div id="preamble">
  51.             <h1>
  52.                 <xsl:value-of select="title" />
  53.             </h1>&lf;
  54.  
  55.             <xsl:call-template name="langavail" />&lf;
  56.  
  57.             <xsl:apply-templates select="summary" />&lf;
  58.  
  59.             <!-- letter bar -->
  60.             <p class="letters">
  61.                 <xsl:call-template name="letter-bar">
  62.                     <xsl:with-param name="letters" select="$start-letters" />
  63.                     <xsl:with-param name="first" select="true()" />
  64.                 </xsl:call-template>
  65.             </p>&lf; <!-- /.letters -->
  66.         </div>&lf; <!-- /preamble -->
  67.  
  68.         <div id="directive-list">
  69.             <ul>&lf;
  70.                 <xsl:call-template name="dindex-of-letter">
  71.                     <xsl:with-param name="letters-todo"
  72.                         select="$start-letters" />
  73.                     <xsl:with-param name="directives" select="$directives" />
  74.                 </xsl:call-template>
  75.             </ul>
  76.         </div>&lf; <!-- /#directive-list -->
  77.  
  78.         <xsl:call-template name="bottom" />&lf;
  79.     </body>
  80. </html>
  81. </xsl:template>
  82. <!-- /directiveindex -->
  83.  
  84.  
  85. <!-- ==================================================================== -->
  86. <!-- the working horse. builds list items of all directives starting with -->
  87. <!-- one letter when done, it calls itself to catch the next letter       -->
  88. <!-- ==================================================================== -->
  89. <xsl:template name="dindex-of-letter">
  90. <xsl:param name="letters-todo" />
  91. <xsl:param name="directives" />
  92.  
  93. <xsl:variable name="letter" select="substring($letters-todo, 1, 1)"/>
  94.  
  95. <xsl:for-each
  96.     select="$directives
  97.                 [$letter = translate(substring(normalize-space(name), 1, 1),
  98.                                      $lowercase, $uppercase)]">
  99. <xsl:sort select="name" />
  100.     <li>
  101.         <a href="{../name}.html#{translate(name, $uppercase, $lowercase)}">
  102.             <xsl:if test="position() = 1">
  103.                 <xsl:attribute name="id">
  104.                     <xsl:value-of select="$letter" />
  105.                 </xsl:attribute>
  106.                 <xsl:attribute name="name">
  107.                     <xsl:value-of select="$letter" />
  108.                 </xsl:attribute>
  109.             </xsl:if>
  110.  
  111.             <xsl:if test="@type = 'section'"><</xsl:if>
  112.             <xsl:value-of select="name" />
  113.             <xsl:if test="@type = 'section'">></xsl:if>
  114.         </a>
  115.     </li>&lf;
  116. </xsl:for-each>
  117.  
  118. <!-- call next letter, if there is -->
  119. <xsl:if test="string-length($letters-todo) > 1">
  120.     <xsl:call-template name="dindex-of-letter">
  121.         <xsl:with-param name="letters-todo"
  122.             select="substring($letters-todo, 2)" />
  123.         <xsl:with-param name="directives" select="$directives" />
  124.     </xsl:call-template>
  125. </xsl:if>
  126.  
  127. </xsl:template>
  128. <!-- /dindex-of-letter -->
  129.  
  130. </xsl:stylesheet>
  131.