httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbo...@apache.org
Subject svn commit: r1089716 - in /httpd/httpd/trunk/docs/manual/mod: mod_negotiation.html.en mod_negotiation.xml mod_negotiation.xml.ja
Date Thu, 07 Apr 2011 03:14:16 GMT
Author: rbowen
Date: Thu Apr  7 03:14:15 2011
New Revision: 1089716

URL: http://svn.apache.org/viewvc?rev=1089716&view=rev
Log:
Adds an example of constructing a type-map file.

Modified:
    httpd/httpd/trunk/docs/manual/mod/mod_negotiation.html.en
    httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml
    httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml.ja

Modified: httpd/httpd/trunk/docs/manual/mod/mod_negotiation.html.en
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_negotiation.html.en?rev=1089716&r1=1089715&r2=1089716&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_negotiation.html.en (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_negotiation.html.en Thu Apr  7 03:14:15 2011
@@ -158,6 +158,45 @@ Negotiation</a></li>
       </code></p></div>
       </dd>
     </dl>
+
+    <p>Consider, for example, a resource called
+    <code>document.html</code> which is available in English, French,
+    and German. The files for each of these are called
+    <code>document.html.en</code>, <code>document.html.fr</code>,
and
+    <code>document.html.de</code>, respectively. The type map file will
+    be called <code>index.html.var</code>, and will contain the
+    following:</p>
+    
+    <div class="example"><h3>index.html.var</h3><p><code>
+
+    Content-language: en<br />
+    Content-type: text/html<br />
+    URI: document.html.en<br />
+    <br />
+    Content-language: fr<br />
+    Content-type: text/html<br />
+    URI: document.html.fr<br />
+    <br />
+    Content-language: de<br />
+    Content-type: text/html<br />
+    URI: document.html.de<br />
+    <br />
+
+    </code></p></div>
+
+    <p>All four of these files should be placed in the same directory,
+    and the <code>.var</code> file should be associated with the
+    <code>type-map</code> handler with an <code class="directive"><a
href="../mod/mod_mime.html#addhandler">AddHandler</a></code> directive:</p>
+
+    <div class="example"><p><code>
+    AddHandler type-map .var
+    </code></p></div>
+
+    <p>A request for <code>document.html</code> in this directory will
+    result in <code>document.html.var</code> being consulted, and the
+    variant chosen which most closely matches the language preference
+    specified in the user's <code>Accept-Language</code> request
+    header.</p>
 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif"
/></a></div>
 <div class="section">
 <h2><a name="multiviews" id="multiviews">Multiviews</a></h2>

Modified: httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml?rev=1089716&r1=1089715&r2=1089716&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml Thu Apr  7 03:14:15 2011
@@ -178,7 +178,7 @@ Negotiation</a></seealso>
 
     <example>
     AddHandler type-map .var
-    <example>
+    </example>
 
     <p>A request for <code>document.html</code> in this directory will
     result in <code>document.html.var</code> being consulted, and the

Modified: httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml.ja
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml.ja?rev=1089716&r1=1089715&r2=1089716&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml.ja [utf-8] (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_negotiation.xml.ja [utf-8] Thu Apr  7 03:14:15 2011
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
-<!-- English Revision: 420990:1066440 (outdated) -->
+<!-- English Revision: 420990:1089714 (outdated) -->
 
 <!--
  Licensed to the Apache Software Foundation (ASF) under one or more



Mime
View raw message