As already suggested by Joshua, I've created a small xslt that transforms the metafiles to typemaps, which should improve the performance a bit (doesn't have to read the whole directory all the time for mutltiviews). The typemaps get the extension ".html".
Attached is a file that diffs against the configs and additionally contains the typemap.xsl file. As usual, suggestions, comments etc are welcome. If we don't want it anymore, please speak up (now!). TIA, nd -- die (eval q-qq:Just Another Perl Hacker :-) # André Malo, <http://www.perlig.de/> #
Index: conf/httpd-std.conf.in =================================================================== RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-std.conf.in,v retrieving revision 1.41 diff -u -r1.41 httpd-std.conf.in --- conf/httpd-std.conf.in 28 May 2003 20:40:07 -0000 1.41 +++ conf/httpd-std.conf.in 2 Jun 2003 23:43:42 -0000 @@ -574,10 +574,15 @@ AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "@[EMAIL PROTECTED]" <Directory "@exp_manualdir@"> - Options Indexes FollowSymLinks MultiViews + Options Indexes AllowOverride None Order allow,deny Allow from all + + AddHandler type-map .html + <Files *.html.*> + RemoveHandler .html + </Files> SetEnvIf Request_URI ^/manual/(de|en|fr|ja|ko|ru)/ prefer-language=$1 RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2 Index: conf/httpd-win.conf =================================================================== RCS file: /home/cvs/httpd-2.0/docs/conf/httpd-win.conf,v retrieving revision 1.88 diff -u -r1.88 httpd-win.conf --- conf/httpd-win.conf 1 Jun 2003 21:11:06 -0000 1.88 +++ conf/httpd-win.conf 2 Jun 2003 23:43:44 -0000 @@ -497,10 +497,15 @@ AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "@@ServerRoot@@/manual$1" <Directory "@@ServerRoot@@/manual"> - Options Indexes FollowSymLinks MultiViews + Options Indexes AllowOverride None Order allow,deny Allow from all + + AddHandler type-map .html + <Files *.html.*> + RemoveHandler .html + </Files> SetEnvIf Request_URI ^/manual/(de|en|fr|ja|ko|ru)/ prefer-language=$1 RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2 New file: manual/style/xsl/typemap.xsl =================================================================== <?xml version="1.0"?><!-- /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" must * not be used to endorse or promote products derived from this * software without prior written permission. For written * permission, please contact [EMAIL PROTECTED] * * 5. Products derived from this software may not be called "Apache", * nor may "Apache" appear in their name, without prior written * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ --> <!DOCTYPE xsl:stylesheet [ <!ENTITY lf SYSTEM "util/lf.xml"> ]> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns=""> <xsl:output method="text" encoding="utf-8" indent="no" /> <!-- create nodeset for referencing later --> <xsl:variable name="design" select="document('')/xsl:stylesheet /xsl:[EMAIL PROTECTED]'designations']/item" /> <!-- Constants used for case translation --> <xsl:variable name="lowercase" select="'abcdefghijklmnopqrstuvwxyz'" /> <xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" /> <!-- ==================================================================== --> <!-- <metafile> --> <!-- build typemap --> <!-- ==================================================================== --> <xsl:template match="/metafile"> <xsl:apply-templates select="variants/variant" /> </xsl:template> <!-- /metafile --> <!-- ==================================================================== --> <!-- <variant> --> <!-- ==================================================================== --> <xsl:template match="variant"> <xsl:variable name="lang" select="translate(., $uppercase, $lowercase)" /> <xsl:if test="not($design[translate(@lang, $uppercase, $lowercase) = $lang])"> <xsl:message terminate="yes"> FATAL: missing designation data for language <xsl:value-of select="." />. The XSLT-Stylesheet won't work without modification. </xsl:message> </xsl:if> <xsl:text>URI: </xsl:text> <xsl:value-of select="/metafile/basename" /> <xsl:text>.html</xsl:text> <xsl:value-of select="$design[translate(@lang, $uppercase, $lowercase) = $lang]" />&lf; <xsl:text>Content-Language: </xsl:text> <xsl:value-of select="$design[translate(@lang, $uppercase, $lowercase) = $lang]/@lang" />&lf; <xsl:text>Content-type: text/html; charset=</xsl:text> <xsl:value-of select="$design[translate(@lang, $uppercase, $lowercase) = $lang]/@charset" />&lf; <xsl:if test="position() != last()">&lf;</xsl:if> </xsl:template> <!-- /variant --> <!-- ==================================================================== --> <!-- do NOT call this template, it's referenced automagically via --> <!-- document() function and acts as simple data container. --> <!-- ==================================================================== --> <xsl:template name="designations"> <item lang="de" charset="ISO-8859-1" >.de</item> <item lang="en" charset="ISO-8859-1" >.en</item> <item lang="fr" charset="ISO-8859-1" >.fr</item> <item lang="ja" charset="ISO-2022-JP">.ja.jis</item> <item lang="ko" charset="EUC-KR" >.ko.euc-kr</item> <item lang="ru" charset="KOI8-r" >.ru.koi8-r</item> <item lang="zh-CN" charset="GB2312" >.zh-cn.gb2312</item> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]