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 / _AFC8967774A3B6497C10A82C88B55E89 < prev    next >
Extensible Markup Language  |  2006-07-11  |  3KB  |  72 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. <xsl:output method="text" encoding="ISO-8859-1" indent="no" />
  28.  
  29. <!-- Constants used for case translation -->
  30. <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
  31. <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
  32.  
  33. <!-- ==================================================================== -->
  34. <!-- <modulefilelist>                                                     -->
  35. <!-- Builds the rewrite map                                               -->
  36. <!-- ==================================================================== -->
  37. <xsl:template match="modulefilelist">
  38. <xsl:text># Mapping from directive names to URLs</xsl:text>&lf;
  39. <xsl:text># GENERATED FROM XML -- DO NOT EDIT</xsl:text>&lf;
  40. <xsl:text># You may use it as follows:</xsl:text>&lf;
  41. <xsl:text># RewriteEngine On</xsl:text>&lf;
  42. <xsl:text># RewriteMap dir2url </xsl:text>
  43. <xsl:text>txt:/path/to/convenience.map</xsl:text>&lf;
  44. <xsl:text># RewriteCond ${dir2url:$1} (.+)</xsl:text>&lf;
  45. <xsl:text># RewriteRule ^/+([^/]+)$ /manual/%1 [R=301,NE,L]</xsl:text>&lf;&lf;
  46.  
  47. <xsl:apply-templates
  48.     select="document(modulefile)/modulesynopsis[status!='Obsolete']
  49.                 /directivesynopsis[not(@location)]">
  50.     <xsl:sort select="name" />
  51. </xsl:apply-templates>
  52.  
  53. </xsl:template>
  54. <!-- /modulefilelist -->
  55.  
  56. <!-- ==================================================================== -->
  57. <!-- <directivesynopsis>                                                  -->
  58. <!-- ==================================================================== -->
  59. <xsl:template match="directivesynopsis">
  60.  
  61.     <xsl:value-of select="translate(name, $uppercase, $lowercase)" />
  62.     <xsl:text> mod/</xsl:text>
  63.     <xsl:value-of select="../name" />
  64.     <xsl:text>.html#</xsl:text>
  65.     <xsl:value-of select="translate(name, $uppercase, $lowercase)" />
  66.     &lf;
  67.  
  68. </xsl:template>
  69. <!-- /directivesynopsis -->
  70.  
  71. </xsl:stylesheet>
  72.