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 / _7FB46B8C20CD4AB873FC16F431A11D91 (.txt) < prev    next >
LaTeX Document  |  2006-07-11  |  8KB  |  172 lines

  1. <?xml version="1.0"?>
  2.  Licensed to the Apache Software Foundation (ASF) under one or more
  3.  contributor license agreements.  See the NOTICE file distributed with
  4.  this work for additional information regarding copyright ownership.
  5.  The ASF licenses this file to You under the Apache License, Version 2.0
  6.  (the "License"); you may not use this file except in compliance with
  7.  the License.  You may obtain a copy of the License at
  8.      http://www.apache.org/licenses/LICENSE-2.0
  9.  Unless required by applicable law or agreed to in writing, software
  10.  distributed under the License is distributed on an "AS IS" BASIS,
  11.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12.  See the License for the specific language governing permissions and
  13.  limitations under the License.
  14. <xsl:stylesheet version="1.0"
  15.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  16.                   xmlns="http://www.w3.org/1999/xhtml">
  17. <!-- ==================================================================== -->
  18. <!-- <moduleindex>                                                        -->
  19. <!-- Builds the moduleindex page                                          -->
  20. <!-- ==================================================================== -->
  21. <xsl:template match="moduleindex">
  22.   <xsl:variable name="metafile" select="document(/*/@metafile)/metafile" /> 
  23.   <xsl:call-template name="section-title"/>
  24.   <xsl:apply-templates select="summary"/>
  25.   <xsl:call-template name="seealso"/>
  26.    <xsl:text>\subsection*{</xsl:text>
  27.    <xsl:value-of select="$message[@id='corefeatures']" />
  28.    <xsl:text>}
  29. \begin{description}
  30. \item[</xsl:text>
  31.     <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
  32.                               [starts-with(., 'core.xml')])
  33.                               /modulesynopsis/name"/>
  34.     <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
  35.     <xsl:value-of select="document(document($allmodules)/modulefilelist/modulefile
  36.                               [starts-with(., 'core.xml')])
  37.                               /modulesynopsis/name"/>
  38.     <xsl:text>}) </xsl:text>
  39.     <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
  40.                                  [starts-with(., 'core.xml')])
  41.                                  /modulesynopsis/description" />
  42.     <xsl:text>
  43. \item[</xsl:text>
  44.     <xsl:apply-templates  select="document(document($allmodules)/modulefilelist/modulefile
  45.                                   [starts-with(., 'mpm_common.xml')])
  46.                                   /modulesynopsis/name" />
  47.     <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
  48.     <xsl:value-of select="document(document($allmodules)/modulefilelist/modulefile
  49.                                    [starts-with(., 'mpm_common.xml')])
  50.                                    /modulesynopsis/name"/>
  51.     <xsl:text>}) </xsl:text>
  52.     <xsl:apply-templates select="document(document($allmodules)/modulefilelist/modulefile
  53.                                          [starts-with(., 'mpm_common.xml')])
  54.                                          /modulesynopsis/description" />
  55.     <!-- and now the remaining MPMs -->
  56.     <xsl:variable name="mpmmodules"
  57.          select="document(document($allmodules)/modulefilelist/modulefile)
  58.                  /modulesynopsis[status='MPM' and name != 'mpm_common']" />
  59.     <xsl:variable name="translist">
  60.       <xsl:call-template name="module-translist">
  61.          <xsl:with-param name="modules" select="$mpmmodules" />
  62.       </xsl:call-template>
  63.     </xsl:variable>
  64.     <xsl:for-each select="$mpmmodules">
  65.       <xsl:sort select="substring-before(substring-after($translist,
  66.                   concat('- ', translate(normalize-space(name), $lowercase,
  67.                   $uppercase), ' ')), ' -')" />
  68.       <xsl:text>
  69. \item[</xsl:text>
  70.       <xsl:apply-templates select="name"/>
  71.       <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
  72.       <xsl:value-of select="name"/>
  73.       <xsl:text>}) </xsl:text>
  74.       <xsl:apply-templates select="description" />
  75.     </xsl:for-each>
  76.     <xsl:text>\end{description}
  77. </xsl:text>
  78.     <!-- /core section -->
  79.     <xsl:text>\section*{</xsl:text>
  80.     <xsl:value-of select="$message[@id='othermodules']" />
  81.     <xsl:text>}
  82. \begin{description}
  83. </xsl:text>
  84.             
  85.     <xsl:variable name="modules"
  86.          select="document(document($allmodules)/modulefilelist/modulefile)
  87.                  /modulesynopsis[status!='MPM' and status!='Core']" />
  88.     <xsl:call-template name="mindex-of-letter">
  89.        <xsl:with-param name="modules" select="$modules" />
  90.     </xsl:call-template>
  91.     <xsl:text>\end{description}
  92. </xsl:text>
  93. </xsl:template> 
  94. <!-- /moduleindex -->
  95. <!-- ==================================================================== -->
  96. <!-- the working horse. builds list items of all modules starting with    -->
  97. <!-- one letter when done, it calls itself to catch the next letter       -->
  98. <!-- ==================================================================== -->
  99. <xsl:template name="mindex-of-letter">
  100. <xsl:param name="modules"/>
  101. <xsl:variable name="translist">
  102.     <xsl:call-template name="module-translist">
  103.         <xsl:with-param name="modules" select="$modules" />
  104.     </xsl:call-template>
  105. </xsl:variable>
  106. <xsl:for-each select="$modules">
  107. <xsl:sort
  108.     select="substring-before(substring-after($translist, concat('- ',
  109.         translate(normalize-space(name),$lowercase,$uppercase), ' ')), ' -')" />
  110. <xsl:text>
  111. \item[</xsl:text>
  112. <xsl:apply-templates select="name"/>
  113. <xsl:text>] (p.\ \pageref{/mod/</xsl:text>
  114. <xsl:value-of select="name"/>
  115. <xsl:text>}) </xsl:text>
  116.         <xsl:apply-templates select="description" />
  117. </xsl:for-each> <!-- /directives -->
  118. </xsl:template>
  119. <!-- /mindex-of-letter -->
  120. <!-- ==================================================================== -->
  121. <!-- define module name translations for sorting                          -->
  122. <!--                                                                      -->
  123. <!-- it's a kind of a hack...                                             -->
  124. <!-- we build a string that contains the following data:                  -->
  125. <!-- "- modulename sortname - modulename sortname - ..."                  -->
  126. <!-- (with all data in uppercase)                                         -->
  127. <!--                                                                      -->
  128. <!-- So, the translation from modulename to sortname can be done with the -->
  129. <!-- expression below:                                                    -->
  130.        substring-before(
  131.            substring-after($translist, 
  132.                            concat('- ', translate(modulename,
  133.                                                   $lowercase, $uppercase),
  134.                                   ' ')
  135.                            ),
  136.            ' -')
  137.                                                                           -->
  138. <!-- ==================================================================== -->
  139. <xsl:template name="module-translist">
  140. <xsl:param name="modules" />
  141. <xsl:text>-</xsl:text>
  142. <xsl:for-each select="$modules">
  143.     <xsl:variable name="sname" select="translate(normalize-space(name),
  144.                                        $lowercase, $uppercase)" />
  145.     <xsl:text> </xsl:text>
  146.     <xsl:value-of select="$sname" />
  147.     <xsl:text> </xsl:text>
  148.     <xsl:call-template name="module-translatename">
  149.         <xsl:with-param name="name" select="$sname" />
  150.     </xsl:call-template>
  151.     <xsl:text> -</xsl:text>
  152. </xsl:for-each>
  153. </xsl:template>
  154. <!-- /module-translist -->
  155. <xsl:template name="module-translatename">
  156. <xsl:param name="name" />
  157. <xsl:variable name="sname" select="translate($name, $lowercase, $uppercase)" />
  158. <xsl:choose>
  159. <xsl:when test="starts-with($sname, 'MOD_') or starts-with($sname, 'MPM_')">
  160.     <xsl:value-of select="substring($name, 5)" />
  161. </xsl:when>
  162. <xsl:when test="starts-with($sname, 'MPMT_')">
  163.     <xsl:value-of select="substring($name, 6)" />
  164. </xsl:when>
  165. <xsl:otherwise>
  166.     <xsl:value-of select="$name" />
  167. </xsl:otherwise>
  168. </xsl:choose>
  169. </xsl:template>
  170. <!-- /module-translatename -->
  171. </xsl:stylesheet>
  172.