convmap.xsl revision aa16af7d996d4a81cd982d0bcb217db69f5c853c
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<?xml version="1.0"?>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!--
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd Copyright 2005 The Apache Software Foundation or its licensors, as
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd applicable.
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd Licensed under the Apache License, Version 2.0 (the "License");
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd you may not use this file except in compliance with the License.
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd You may obtain a copy of the License at
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd http://www.apache.org/licenses/LICENSE-2.0
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd Unless required by applicable law or agreed to in writing, software
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd distributed under the License is distributed on an "AS IS" BASIS,
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd See the License for the specific language governing permissions and
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd limitations under the License.
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd-->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!DOCTYPE xsl:stylesheet [
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <!ENTITY lf SYSTEM "util/lf.xml">
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd]>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:stylesheet version="1.0"
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd xmlns="http://www.w3.org/1999/xhtml">
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:output method="text" encoding="ISO-8859-1" indent="no" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- Constants used for case translation -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- ==================================================================== -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- <modulefilelist> -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- Builds the rewrite map -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- ==================================================================== -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:template match="modulefilelist">
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># Mapping from directive names to URLs</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># GENERATED FROM XML -- DO NOT EDIT</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># You may use it as follows:</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># RewriteEngine On</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># RewriteMap dir2url </xsl:text>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text>txt:/path/to/convenience.map</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># RewriteCond ${dir2url:$1} (.+)</xsl:text>&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:text># RewriteRule ^/+([^/]+) /manual/%1 [R=301,NE,L]</xsl:text>&lf;&lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:apply-templates
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd select="document(modulefile)/modulesynopsis[status!='Obsolete']
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd /directivesynopsis[not(@location)]">
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:sort select="name" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd</xsl:apply-templates>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd</xsl:template>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- /modulefilelist -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- ==================================================================== -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- <directivesynopsis> -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- ==================================================================== -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<xsl:template match="directivesynopsis">
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:value-of select="translate(name, $uppercase, $lowercase)" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:text>&#9;mod/</xsl:text>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:value-of select="/name" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:text>.html#</xsl:text>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd <xsl:value-of select="translate(name, $uppercase, $lowercase)" />
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd &lf;
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd</xsl:template>
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd<!-- /directivesynopsis -->
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd
aa16af7d996d4a81cd982d0bcb217db69f5c853cnd</xsl:stylesheet>