1.1 --- a/docs/resource-map.html Sat Sep 08 16:01:41 2007 +0000
1.2 +++ b/docs/resource-map.html Sat Sep 08 16:02:18 2007 +0000
1.3 @@ -1,29 +1,30 @@
1.4 +<?xml version="1.0" encoding="iso-8859-1"?>
1.5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.6 -<html xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
1.7 -
1.8 - <title>ResourceMap - Simple Mappings from Names to Resources</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.9 +<html xmlns="http://www.w3.org/1999/xhtml"><head>
1.10 + <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type" />
1.11 + <title>ResourceMap - Simple Mappings from Names to Resources</title>
1.12 <link href="styles.css" rel="stylesheet" type="text/css" /></head>
1.13 <body>
1.14 <h1>ResourceMap - Simple Mappings from Names to Resources</h1>
1.15 -<p>The <code>ResourceMap</code> module provides classes (although
1.16 +<p>The <code>ResourceMap</code> module provides classes (although
1.17 currently only one class is supplied) which act as standard WebStack
1.18 resources, but which examine the path or URL from incoming requests and
1.19 direct such requests to other resources based on the contents of the
1.20 path or URL. In other words, such classes map names or patterns to
1.21 -WebStack resources and dispatch requests accordingly.</p><h2>Introducing MapResource</h2><p>The <a href="paths-filesystem.html">"Treating the Path Like a Filesystem"</a> document contains an example involving the <code>MapResource</code> class; this class is initialised with a dictionary mapping names to resources as described below.</p><div class="WebStack">
1.22 -<h3>WebStack API - The MapResource Class</h3>
1.23 +WebStack resources and dispatch requests accordingly.</p><h2>Introducing MapResource</h2><p>The <a href="paths-filesystem.html">"Treating the Path Like a Filesystem"</a> document contains an example involving the <code>MapResource</code> class; this class is initialised with a dictionary mapping names to resources as described below.</p><div class="WebStack">
1.24 +<h3>WebStack API - The MapResource Class</h3>
1.25
1.26 -<p>The <code>MapResource</code>
1.27 +<p>The <code>MapResource</code>
1.28 class (found in the
1.29 <code>WebStack.Resources.ResourceMap</code> module) maps names to
1.30 resource objects, where to select a resource the
1.31 -corresponding name must match the first component discovered
1.32 +corresponding name must match the first component discovered
1.33 in the <a href="path-info.html">virtual "path info"</a>. For example,
1.34 consider the following virtual "path info" (where there may have been
1.35 -more information in the path, but this has already been processed):</p><pre>/documents/news/2005/article.html</pre><p>Here, the name <code>documents</code>
1.36 +more information in the path, but this has already been processed):</p><pre>/documents/news/2005/article.html</pre><p>Here, the name <code>documents</code>
1.37 would match the above virtual "path info". Meanwhile, after processing
1.38 more of the information, we might have the following remains of the
1.39 -path:</p><pre>/2005/article.html</pre><p>Here, the name <code>2005</code> would match, leaving the following information unprocessed:</p><pre>/article.html</pre><p>Here, the name <code>article.html</code> would match. However, let us consider the following original virtual "path info" instead:</p><pre>/documents/news/2005/</pre><p>After processing the leading components, we may instead end up with this:</p><pre>/</pre><p>Here, only an empty string as the name will specifically match the above.</p><h4>Further Reading</h4><p>The <a href="../apidocs/public/WebStack.Resources.ResourceMap.MapResource-class.html">API documentation</a> for the <code>MapResource</code>
1.40 +path:</p><pre>/2005/article.html</pre><p>Here, the name <code>2005</code> would match, leaving the following information unprocessed:</p><pre>/article.html</pre><p>Here, the name <code>article.html</code> would match. However, let us consider the following original virtual "path info" instead:</p><pre>/documents/news/2005/</pre><p>After processing the leading components, we may instead end up with this:</p><pre>/</pre><p>Here, only an empty string as the name will specifically match the above.</p><h4>Further Reading</h4><p>The <a href="../apidocs/public/WebStack.Resources.ResourceMap.MapResource-class.html">API documentation</a> for the <code>MapResource</code>
1.41 class provides more detail on the subject of name matching, including
1.42 the special "catch all" name and a discussion of the pass-through
1.43 -parameter.</p></div></body></html>
1.44 \ No newline at end of file
1.45 +parameter.</p></div></body></html>