You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by as...@apache.org on 2007/09/08 22:17:47 UTC

svn commit: r573901 [21/44] - in /cocoon/site: site/ site/2.0/ site/2.0/developing/ site/2.0/faq/ site/2.0/howto/chaperon/ site/2.0/installing/ site/2.0/plan/ site/2.0/snippet/ site/2.0/tutorial/ site/2.0/userdocs/ site/2.0/userdocs/actions/ site/2.0/u...

Modified: cocoon/site/site/2.0/userdocs/matchers/matchers.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/matchers/matchers.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/matchers/matchers.html (original)
+++ cocoon/site/site/2.0/userdocs/matchers/matchers.html Sat Sep  8 13:17:41 2007
@@ -1,357 +1,357 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Matchers</title>
-<STYLE type="text/css">
-a.menu {
-	color: #FFFFFF;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:plain;
-    text-decoration:none;
-    padding-left: 14px
-}
-
-A.menu:hover {
-	color: #FFCC00
-}
-
-
-.menutitle {
-	color: #000000;
-    text-align:left;               
-    font-size:10px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 8px
-}
-.menuselected {
-	color: #FFCC00;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Matchers</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Matchers</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Overview</span></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Default</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcarduri-matcher.html">WildCard URI Matcher</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Core</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcardheader-matcher.html">WildCard Header Matcher</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Optional</span></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
-	
-	
-		 <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Goal</font>
-<hr style="color: #0086b2" size="1">
-			
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      This document lists all of the available matchers of Apache Cocoon and
-      describes their purpose.
-      See also the concepts document
-      <a href="../concepts/matchers_selectors.html">Using and Implementing
-      Matchers and Selectors</a>.
-      </font>
-</p>
-		 
-		 
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
-<hr style="color: #0086b2" size="1">
-			
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      A matcher is a core sitemap component of Cocoon. Matchers allow Cocoon 
-      to associate a pure
-      "virtual" URI space with a given set of "instructions"
-      found in a Cocoon sitemap. Sitemap matchers are used to determine the flow and order 
-      of request processing. They typically describe
-      how to generate, transform and present a requested resource(s) to
-      the client. They may also be used to redirect requests to other pipelines
-      or to call other sitemap resources.
-      </font>
-</p>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      Cocoon is driven by the client request. A request typically
-      contains a URI, some parameters, cookies, and much more. Within 
-      the Cocoon environment, the request is evaluated to determine
-      what sitemap instructions to use for processing. 
-      More specifically, a given request is matched against a pipeline 
-      matcher's pattern attribute. When a match is found,
-      processing of the request begins.
-      </font>
-</p>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      As an example, consider the following sitemap snippet:
-      </font>
-</p>
-
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-
-&lt;map:match pattern="body-faq.xml"&gt;
-  &lt;map:generate src="xdocs/faq.xml"/&gt;
-  &lt;map:transform src="stylesheets/faq2document.xsl"/&gt;
-  &lt;map:transform src="stylesheets/document2html.xsl"/&gt;
-  &lt;map:serialize/&gt;
-&lt;/map:match&gt;
-
-&lt;map:match pattern="body-**.xml"&gt;
-  &lt;map:generate src="xdocs/{1}.xml"/&gt;
-  &lt;map:transform src="stylesheets/document2html.xsl"/&gt;
-  &lt;map:serialize/&gt;
-&lt;/map:match&gt;
-   
-</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-      Here the two sitemap entries map request URIs to different virtual URIs using
-      the default wildcard matcher (defined earlier in a matcher component configuration).
-      The first entry uses an exact match, "body-faq.xml". Only request URIs
-      composed of this exact string will match this entry. The
-      second sitemap entry uses a wildcard pattern. URI Requests that begin with
-      "body-" and end with ".xml" will meet this matcher's
-      requirement. For example, a URI request for "body-cocoon.xml" 
-      would match the second entry.
-      </font>
-</p>
-		 
-     
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Order</font>
-<hr style="color: #0086b2" size="1">
-       
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-       It's important to understand that Cocoon is based on a "first-match"
-       approach. All requests are matched against the different "map:match"
-       entries in the order in which matchers are specified in the sitemap.
-       As soon
-       as a match is successful, the pipeline processing begins. This means
-       that more specific patterns must appear before more generic ones. 
-       If the order of the two pipelines in the above example were reversed,
-       a request for "body-faq.xml" not match "body-faq.xml"
-       but "body-**.xml" because it appears first. (This is a familiar 
-       concept, especially in router and firewall configurations.) 
-       </font>
-</p>
-     
-     
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Tokenization</font>
-<hr style="color: #0086b2" size="1">
-       
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-       Another important feature of matchers is tokenization. Every "variable"
-       part of a matcher pattern will be kept in memory by Cocoon for 
-       additional reuse. It remains available within a pipeline match
-       as a numbered argument. Using the previous example, consider a request 
-       URI such as "body-index.xml" matched by the second map:match element.
-       The string "index" which matches the "**" wildcard,
-       is available for reuse by other child elements of map:match. It is
-       identified by the key {1}. This key is used as a parameter for the 
-       generator which will first resolve it to the string 
-       "index", and then look for a file named "xdocs/index.html".  
-       </font>
-</p>
-     
-     
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Wildcard and regular expressions</font>
-<hr style="color: #0086b2" size="1">
-       
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-       Most Cocoon matchers are built using two different techniques:
-       regular expressions and wildcards.
-       Regular expressions (or regexps) are a well-known and powerful 
-       system for pattern matching. Learning how to master them is beyond 
-       the scope of this document. However, you will find a lot of documentation 
-       on the web regarding this topic.
-       </font>
-</p>
-       
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-       Although powerful, regexps can be overkill for most
-       typical Cocoon use cases where simple matching operations
-       are performed. This is why Cocoon offers a simplified
-       pattern matching system based on a small set of basic rules.
-       </font>
-</p>
-       
-<blockquote>
-<ul>
-        
-<li>
-<font face="verdana, helvetica, sans serif">
-        An asterisk ('*') matches zero or more characters,
-        up to the occurrence of a '/' character (which serves as
-        a path separator). A string, such as "/cocoon/docs/index.html", 
-        would <i>not</i>
-        match successfully against the pattern '/*/*.index.html'. 
-        The first asterisk matches up to the first path
-        separator only, resulting in the "cocoon" string. 
-        A successful matching pattern would be '/*/*/*.html'.
-        </font>
-</li>
-        
-<li>
-<font face="verdana, helvetica, sans serif">
-        A string containing two asterisks ('**') matches zero or more 
-        characters. This could include the path separator '/'. 
-        In this case, "/cocoon/docs/index.html" would successfully
-        match the '/**/*.html' pattern. The double asterisk, including the
-        path separator, would match the "cocoon/docs" string.
-        </font>
-</li>
-        
-<li>
-<font face="verdana, helvetica, sans serif">
-        As with regexps, the backslash character ('\') is used to indicate an 
-        escape sequence. The string '\*' will match an actual asterisk
-        while a double backslash ('\\') will match the character '\'. A
-        pattern such as "**/a-\*-is-born.html" would match strings
-        such as "documents/movies/a-*-is-born.html" or 
-        "a/very/long/path/a-*-is-born.html". It would <i>not</i> match
-        the string "docs/a-star-is-born.html".
-        </font>
-</li>
-       
-</ul>
-</blockquote>
-     
-		 
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Matchers in Cocoon</font>
-<hr style="color: #0086b2" size="1">
-       
-<blockquote>
-<ul>
-				 
-<li>
-<font face="verdana, helvetica, sans serif"><b>WildCard URI matcher</b>(The default matcher): matches the URI against a wildcard pattern.</font>
-</li>
-				 
-<li>
-<font face="verdana, helvetica, sans serif"><b>Regexp URI matcher:</b> 
-         matches the URI against a full-blown regular expression</font>
-</li>
-				 
-<li>
-<font face="verdana, helvetica, sans serif"><b>Request parameter 
-         matcher:</b> matches a request parameters given as a pattern. If
-         the parameter exists, its value is available for later substitution.
-         </font>
-</li>
-				 
-<li>
-<font face="verdana, helvetica, sans serif"><b>Wildcard request parameter matcher:</b> matches a wildcard 
-         given as a pattern against the <b>value</b> of a configured 
-         parameter.
-         </font>
-</li>
-				 
-<li>
-<font face="verdana, helvetica, sans serif"><b>Wildcard session parameter matcher</b>: similar to the 
-         Wildcard request parameter matcher, but it matches a session parameter.</font>
-</li>
-			
-</ul>
-</blockquote>
-		
-	
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Matchers</title>
+<STYLE type="text/css">
+a.menu {
+	color: #FFFFFF;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:plain;
+    text-decoration:none;
+    padding-left: 14px
+}
+
+A.menu:hover {
+	color: #FFCC00
+}
+
+
+.menutitle {
+	color: #000000;
+    text-align:left;               
+    font-size:10px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 8px
+}
+.menuselected {
+	color: #FFCC00;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">Matchers</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Matchers</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">Overview</span></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Default</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcarduri-matcher.html">WildCard URI Matcher</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Core</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcardheader-matcher.html">WildCard Header Matcher</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Optional</span></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+	
+	
+		 <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Goal</font>
+<hr style="color: #0086b2" size="1">
+			
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      This document lists all of the available matchers of Apache Cocoon and
+      describes their purpose.
+      See also the concepts document
+      <a href="../concepts/matchers_selectors.html">Using and Implementing
+      Matchers and Selectors</a>.
+      </font>
+</p>
+		 
+		 
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Overview</font>
+<hr style="color: #0086b2" size="1">
+			
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      A matcher is a core sitemap component of Cocoon. Matchers allow Cocoon 
+      to associate a pure
+      "virtual" URI space with a given set of "instructions"
+      found in a Cocoon sitemap. Sitemap matchers are used to determine the flow and order 
+      of request processing. They typically describe
+      how to generate, transform and present a requested resource(s) to
+      the client. They may also be used to redirect requests to other pipelines
+      or to call other sitemap resources.
+      </font>
+</p>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      Cocoon is driven by the client request. A request typically
+      contains a URI, some parameters, cookies, and much more. Within 
+      the Cocoon environment, the request is evaluated to determine
+      what sitemap instructions to use for processing. 
+      More specifically, a given request is matched against a pipeline 
+      matcher's pattern attribute. When a match is found,
+      processing of the request begins.
+      </font>
+</p>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      As an example, consider the following sitemap snippet:
+      </font>
+</p>
+
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+
+&lt;map:match pattern="body-faq.xml"&gt;
+  &lt;map:generate src="xdocs/faq.xml"/&gt;
+  &lt;map:transform src="stylesheets/faq2document.xsl"/&gt;
+  &lt;map:transform src="stylesheets/document2html.xsl"/&gt;
+  &lt;map:serialize/&gt;
+&lt;/map:match&gt;
+
+&lt;map:match pattern="body-**.xml"&gt;
+  &lt;map:generate src="xdocs/{1}.xml"/&gt;
+  &lt;map:transform src="stylesheets/document2html.xsl"/&gt;
+  &lt;map:serialize/&gt;
+&lt;/map:match&gt;
+   
+</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+      Here the two sitemap entries map request URIs to different virtual URIs using
+      the default wildcard matcher (defined earlier in a matcher component configuration).
+      The first entry uses an exact match, "body-faq.xml". Only request URIs
+      composed of this exact string will match this entry. The
+      second sitemap entry uses a wildcard pattern. URI Requests that begin with
+      "body-" and end with ".xml" will meet this matcher's
+      requirement. For example, a URI request for "body-cocoon.xml" 
+      would match the second entry.
+      </font>
+</p>
+		 
+     
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Order</font>
+<hr style="color: #0086b2" size="1">
+       
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+       It's important to understand that Cocoon is based on a "first-match"
+       approach. All requests are matched against the different "map:match"
+       entries in the order in which matchers are specified in the sitemap.
+       As soon
+       as a match is successful, the pipeline processing begins. This means
+       that more specific patterns must appear before more generic ones. 
+       If the order of the two pipelines in the above example were reversed,
+       a request for "body-faq.xml" not match "body-faq.xml"
+       but "body-**.xml" because it appears first. (This is a familiar 
+       concept, especially in router and firewall configurations.) 
+       </font>
+</p>
+     
+     
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Tokenization</font>
+<hr style="color: #0086b2" size="1">
+       
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+       Another important feature of matchers is tokenization. Every "variable"
+       part of a matcher pattern will be kept in memory by Cocoon for 
+       additional reuse. It remains available within a pipeline match
+       as a numbered argument. Using the previous example, consider a request 
+       URI such as "body-index.xml" matched by the second map:match element.
+       The string "index" which matches the "**" wildcard,
+       is available for reuse by other child elements of map:match. It is
+       identified by the key {1}. This key is used as a parameter for the 
+       generator which will first resolve it to the string 
+       "index", and then look for a file named "xdocs/index.html".  
+       </font>
+</p>
+     
+     
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Wildcard and regular expressions</font>
+<hr style="color: #0086b2" size="1">
+       
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+       Most Cocoon matchers are built using two different techniques:
+       regular expressions and wildcards.
+       Regular expressions (or regexps) are a well-known and powerful 
+       system for pattern matching. Learning how to master them is beyond 
+       the scope of this document. However, you will find a lot of documentation 
+       on the web regarding this topic.
+       </font>
+</p>
+       
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+       Although powerful, regexps can be overkill for most
+       typical Cocoon use cases where simple matching operations
+       are performed. This is why Cocoon offers a simplified
+       pattern matching system based on a small set of basic rules.
+       </font>
+</p>
+       
+<blockquote>
+<ul>
+        
+<li>
+<font face="verdana, helvetica, sans serif">
+        An asterisk ('*') matches zero or more characters,
+        up to the occurrence of a '/' character (which serves as
+        a path separator). A string, such as "/cocoon/docs/index.html", 
+        would <i>not</i>
+        match successfully against the pattern '/*/*.index.html'. 
+        The first asterisk matches up to the first path
+        separator only, resulting in the "cocoon" string. 
+        A successful matching pattern would be '/*/*/*.html'.
+        </font>
+</li>
+        
+<li>
+<font face="verdana, helvetica, sans serif">
+        A string containing two asterisks ('**') matches zero or more 
+        characters. This could include the path separator '/'. 
+        In this case, "/cocoon/docs/index.html" would successfully
+        match the '/**/*.html' pattern. The double asterisk, including the
+        path separator, would match the "cocoon/docs" string.
+        </font>
+</li>
+        
+<li>
+<font face="verdana, helvetica, sans serif">
+        As with regexps, the backslash character ('\') is used to indicate an 
+        escape sequence. The string '\*' will match an actual asterisk
+        while a double backslash ('\\') will match the character '\'. A
+        pattern such as "**/a-\*-is-born.html" would match strings
+        such as "documents/movies/a-*-is-born.html" or 
+        "a/very/long/path/a-*-is-born.html". It would <i>not</i> match
+        the string "docs/a-star-is-born.html".
+        </font>
+</li>
+       
+</ul>
+</blockquote>
+     
+		 
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Matchers in Cocoon</font>
+<hr style="color: #0086b2" size="1">
+       
+<blockquote>
+<ul>
+				 
+<li>
+<font face="verdana, helvetica, sans serif"><b>WildCard URI matcher</b>(The default matcher): matches the URI against a wildcard pattern.</font>
+</li>
+				 
+<li>
+<font face="verdana, helvetica, sans serif"><b>Regexp URI matcher:</b> 
+         matches the URI against a full-blown regular expression</font>
+</li>
+				 
+<li>
+<font face="verdana, helvetica, sans serif"><b>Request parameter 
+         matcher:</b> matches a request parameters given as a pattern. If
+         the parameter exists, its value is available for later substitution.
+         </font>
+</li>
+				 
+<li>
+<font face="verdana, helvetica, sans serif"><b>Wildcard request parameter matcher:</b> matches a wildcard 
+         given as a pattern against the <b>value</b> of a configured 
+         parameter.
+         </font>
+</li>
+				 
+<li>
+<font face="verdana, helvetica, sans serif"><b>Wildcard session parameter matcher</b>: similar to the 
+         Wildcard request parameter matcher, but it matches a session parameter.</font>
+</li>
+			
+</ul>
+</blockquote>
+		
+	
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>

Modified: cocoon/site/site/2.0/userdocs/matchers/wildcardheader-matcher.html
URL: http://svn.apache.org/viewvc/cocoon/site/site/2.0/userdocs/matchers/wildcardheader-matcher.html?rev=573901&r1=573900&r2=573901&view=diff
==============================================================================
--- cocoon/site/site/2.0/userdocs/matchers/wildcardheader-matcher.html (original)
+++ cocoon/site/site/2.0/userdocs/matchers/wildcardheader-matcher.html Sat Sep  8 13:17:41 2007
@@ -1,383 +1,383 @@
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>WildcardHeader-Matcher in Cocoon</title>
-<STYLE type="text/css">
-a.menu {
-	color: #FFFFFF;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:plain;
-    text-decoration:none;
-    padding-left: 14px
-}
-
-A.menu:hover {
-	color: #FFCC00
-}
-
-
-.menutitle {
-	color: #000000;
-    text-align:left;               
-    font-size:10px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 8px
-}
-.menuselected {
-	color: #FFCC00;
-    text-align:left;               
-    font-size:12px;
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-weight:bold;
-    padding-left: 14px
-}
-</STYLE>
-</head>
-<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
-<table border="0" cellpadding="0" cellspacing="0" width="100%">
-<tr>
-<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
-</tr>
-<tr>
-<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">WildcardHeader-Matcher in Cocoon</font></td>
-</tr>
-<tr>
-<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
-<table width="288" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr width="100%">
-<td align="left" valign="top" width="120">
-<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
-<tr>
-<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Matchers</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="matchers.html">Overview</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Default</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcarduri-matcher.html">WildCard URI Matcher</a></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Core</span></td>
-</tr>
-<tr>
-<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">WildCard Header Matcher</span></td>
-</tr>
-<tr>
-<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
-<span class="menutitle">Optional</span></td>
-</tr>
-<tr>
-<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
-</td>
-</tr>
-</table>
-</td><td>
-<table cellspacing="15" cellpadding="0" border="0">
-<tr>
-<td>
-  
-  
-    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">WildcardHeaderMatcher</font>
-<hr style="color: #0086b2" size="1">
-      
-<table cellpadding="2" cellspacing="2" border="0" width="100%">
-<caption>
-<font face="verdana,helvetica,sanserif"></font>
-</caption>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">NAME</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">header-match, referer-match</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">WHAT</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> matches a header value
-            against a wildcard expression..
-          </font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">TYPE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Matcher, Sitemap Component</font></td>
-        
-</tr>
-        
-<tr>
-          
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">BLOCK</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Core</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CLASS</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">org.apache.cocoon.matching.WildcardHeaderMatcher</font></td>
-        
-</tr>
-        
-        
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">SINCE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Cocoon 2.0</font></td>
-        
-</tr>
-        
-<tr>
-          
-<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CACHEABLE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">not applicable</font></td>
-        
-</tr>
-      
-</table>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Description</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> matches a wildcard pattern against a 
-        header value of the request.
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Usage</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> is used to apply the same sitemap processing
-        to a group of requested URIs. A requested URI belongs to this group iff
-        the header value is matched by the specified pattern.  
-      </font>
-</p>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The snippet below applies to all requested URIs having a header referer value matching
-        the wildcard pattern <code><font face="courier, monospaced">http://foo.bar:8080/documentation/*.html</font></code> the specified pipeline processing.
-      </font>
-</p>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The generator retrieves the xml document having extension <code><font face="courier, monospaced">.xml</font></code>,
-        its basename is the request URI path, stripped off the prefix <code><font face="courier, monospaced">page-</font></code>.
-      </font>
-</p>
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap pipeline examples</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The snippet below uses the <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> for matching
-          the referer header value.
-        </font>
-</p>
-        
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-&lt;map:pipelines&gt;
-  &lt;map:pipeline&gt;
-    ....
-    &lt;map:match type="referer-match" pattern=http://foo.bar:8080/documentation/*.html"&gt;
-      &lt;!-- pipeline processing generator, transformer, serializing
-      &lt;map:generator src="xdocs/{../1}.xml"/&gt;
-      &lt;map:transformer src="stylesheet/document2html"/&gt;
-        &lt;map:parameter name="prev" value="{1}.html"/&gt;
-      &lt;map:transformer/&gt;
-      &lt;map:serialize/&gt;
-    &lt;/map:match&gt;
-    ...
-  &lt;/map:pipeline&gt;
-  ...
-        </pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap component configuration example</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> sitemap configuration consists of
-          choosing a name, and specifying the src attribute of the fully qualified name of the 
-          WildcardHeaderMatcher class.
-        </font>
-</p>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          Moreover sub element name <code><font face="courier, monospaced">header-name</font></code> specifies the name of the
-          header. Its value is matched against the specified pattern.
-        </font>
-</p>
-        
-<div align="center">
-<table border="0" cellpadding="0" cellspacing="4">
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
-<pre>
-&lt;map:matchers...
-  &lt;map:matcher name="referer-match" 
-    src="org.apache.cocoon.matching.WildcardHeaderMatcher"
-    logger="sitemap.matcher.referer-match" 
-  /&gt;
-    &lt;header-name&gt;referer&lt;/header-name&gt;
-    ...
-  &lt;/map:matcher&gt;
-...
-</pre>
-</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-<tr>
-<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
-</tr>
-</table>
-</div>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> is configured by the 
-          subelement <code><font face="courier, monospaced">header-name</font></code>, specifying the name of the header attribute
-          name.
-        </font>
-</p>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Setup</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> gets the wildcard pattern from
-          its pattern attribute.
-        </font>
-</p>
-      
-      
-<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Effect on Object Model and Sitemap Parameters</b></font>
-        
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-          See a detailed discussion in
-          <a href="wildcarduri-matcher.html">WildcardURIMatcher</a>
-        </font>
-</p>
-      
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Bugs/Caveats</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        The use of <code><font face="courier, monospaced">parameter-name</font></code> instead of <code><font face="courier, monospaced">header-name</font></code> is deprecated. 
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">History</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        12-28-02: initial creation
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Copyright</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
-      </font>
-</p>
-    
-    
-<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">See also</font>
-<hr style="color: #0086b2" size="1">
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        A general documentation about matchers is available at
-        <a href="../concepts/matchers_selectors.html">Matchers and Selectors</a>.
-      </font>
-</p>
-      
-<p>
-<font color="black" face="verdana,helvetica,sanserif">
-        For a reference of available header names
-        see <a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a>, especially
-        if Cocoon's run time environment is an http servlet environment. 
-      </font>
-</p>
-    
-  
-
-</td>
-</tr>
-</table>
-</td>
-</tr>
-</table>
-<table width="100%" cellspacing="0" cellpadding="0" border="0">
-<tr>
-<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
-</tr>
-<tr>
-<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
-</tr>
-</table>
-</body>
-</html>
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>WildcardHeader-Matcher in Cocoon</title>
+<STYLE type="text/css">
+a.menu {
+	color: #FFFFFF;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:plain;
+    text-decoration:none;
+    padding-left: 14px
+}
+
+A.menu:hover {
+	color: #FFCC00
+}
+
+
+.menutitle {
+	color: #000000;
+    text-align:left;               
+    font-size:10px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 8px
+}
+.menuselected {
+	color: #FFCC00;
+    text-align:left;               
+    font-size:12px;
+    font-family: Verdana, Arial, Helvetica, sans-serif;
+    font-weight:bold;
+    padding-left: 14px
+}
+</STYLE>
+</head>
+<body bgcolor="#ffffff" marginheight="4" marginwidth="4" leftmargin="4" topmargin="4" alink="#cc0000" vlink="#0086b2" link="#039acc" text="#000000">
+<table border="0" cellpadding="0" cellspacing="0" width="100%">
+<tr>
+<td align="left" valign="top" rowspan="3" height="60" width="135"><img border="0" vspace="0" hspace="0" src="images/logo.gif" height="60" width="135"></td><td background="images/line.gif" rowspan="1" colSpan="2" align="left" valign="top" height="0" width="100%"></td><td align="left" valign="top" rowspan="3" height="60" width="29"><img border="0" vspace="0" hspace="0" src="images/right.gif" height="60" width="29"></td>
+</tr>
+<tr>
+<td bgcolor="#0086b2" colspan="2" align="right" valign="top" height="35" width="100%"><font color="#ffffff" face="Verdana, Arial, Helvetica, sans-serif" size="5">WildcardHeader-Matcher in Cocoon</font></td>
+</tr>
+<tr>
+<td background="images/bottom.gif" colspan="2" width="100%" valign="top" height="20" bgcolor="#0086b2" align="right">
+<table width="288" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td align="left" valign="top" height="20" width="96"><a target="new" href="http://xml.apache.org/"><img border="0" vspace="0" hspace="0" name="xml" src="images/button-xml-lo.gif" height="20" width="96" alt="http://xml.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.apache.org/"><img border="0" vspace="0" hspace="0" name="asf" src="images/button-asf-lo.gif" height="20" width="96" alt="http://www.apache.org/"></a></td><td align="left" valign="top" height="20" width="96"><a target="new" href="http://www.w3.org/"><img border="0" vspace="0" hspace="0" name="w3c" src="images/button-w3c-lo.gif" height="20" width="96" alt="http://www.w3.org/"></a></td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr width="100%">
+<td align="left" valign="top" width="120">
+<table width="120" cellspacing="0" cellpadding="0" border="0" bgcolor="#a0a0a0">
+<tr>
+<td valign="top" align="left"><img width="120" vspace="0" src="images/join.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../../index.html">Main</a></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="../index.html">User Documentation</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Matchers</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="matchers.html">Overview</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Default</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><a class="menu" href="wildcarduri-matcher.html">WildCard URI Matcher</a></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Core</span></td>
+</tr>
+<tr>
+<td valign="top" bgcolor="#959595" background="images/label-background_a.gif"><span class="menuselected">WildCard Header Matcher</span></td>
+</tr>
+<tr>
+<td background="images/label-background_b.gif" bgcolor="#959595" valign="top"><img width="120" height="6" src="images/separator.gif"><br>
+<span class="menutitle">Optional</span></td>
+</tr>
+<tr>
+<td align="left" valign="top"><img width="120" vspace="0" src="images/close.gif" hspace="0" height="14" border="0"><br>
+</td>
+</tr>
+</table>
+</td><td>
+<table cellspacing="15" cellpadding="0" border="0">
+<tr>
+<td>
+  
+  
+    <font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">WildcardHeaderMatcher</font>
+<hr style="color: #0086b2" size="1">
+      
+<table cellpadding="2" cellspacing="2" border="0" width="100%">
+<caption>
+<font face="verdana,helvetica,sanserif"></font>
+</caption>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">NAME</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">header-match, referer-match</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">WHAT</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> matches a header value
+            against a wildcard expression..
+          </font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">TYPE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Matcher, Sitemap Component</font></td>
+        
+</tr>
+        
+<tr>
+          
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">BLOCK</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Core</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CLASS</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">org.apache.cocoon.matching.WildcardHeaderMatcher</font></td>
+        
+</tr>
+        
+        
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">SINCE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">Cocoon 2.0</font></td>
+        
+</tr>
+        
+<tr>
+          
+<td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">CACHEABLE</font></td><td align="left" valign="top" rowspan="1" colspan="1" bgcolor="#a0ddf0"><font face="verdana,helvetica,sanserif" size="-1" color="black">not applicable</font></td>
+        
+</tr>
+      
+</table>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Description</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> matches a wildcard pattern against a 
+        header value of the request.
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Usage</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> is used to apply the same sitemap processing
+        to a group of requested URIs. A requested URI belongs to this group iff
+        the header value is matched by the specified pattern.  
+      </font>
+</p>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The snippet below applies to all requested URIs having a header referer value matching
+        the wildcard pattern <code><font face="courier, monospaced">http://foo.bar:8080/documentation/*.html</font></code> the specified pipeline processing.
+      </font>
+</p>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The generator retrieves the xml document having extension <code><font face="courier, monospaced">.xml</font></code>,
+        its basename is the request URI path, stripped off the prefix <code><font face="courier, monospaced">page-</font></code>.
+      </font>
+</p>
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap pipeline examples</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The snippet below uses the <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> for matching
+          the referer header value.
+        </font>
+</p>
+        
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+&lt;map:pipelines&gt;
+  &lt;map:pipeline&gt;
+    ....
+    &lt;map:match type="referer-match" pattern=http://foo.bar:8080/documentation/*.html"&gt;
+      &lt;!-- pipeline processing generator, transformer, serializing
+      &lt;map:generator src="xdocs/{../1}.xml"/&gt;
+      &lt;map:transformer src="stylesheet/document2html"/&gt;
+        &lt;map:parameter name="prev" value="{1}.html"/&gt;
+      &lt;map:transformer/&gt;
+      &lt;map:serialize/&gt;
+    &lt;/map:match&gt;
+    ...
+  &lt;/map:pipeline&gt;
+  ...
+        </pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Sitemap component configuration example</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> sitemap configuration consists of
+          choosing a name, and specifying the src attribute of the fully qualified name of the 
+          WildcardHeaderMatcher class.
+        </font>
+</p>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          Moreover sub element name <code><font face="courier, monospaced">header-name</font></code> specifies the name of the
+          header. Its value is matched against the specified pattern.
+        </font>
+</p>
+        
+<div align="center">
+<table border="0" cellpadding="0" cellspacing="4">
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td bgcolor="#ffffff">
+<pre>
+&lt;map:matchers...
+  &lt;map:matcher name="referer-match" 
+    src="org.apache.cocoon.matching.WildcardHeaderMatcher"
+    logger="sitemap.matcher.referer-match" 
+  /&gt;
+    &lt;header-name&gt;referer&lt;/header-name&gt;
+    ...
+  &lt;/map:matcher&gt;
+...
+</pre>
+</td><td width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+<tr>
+<td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td><td height="1" width="1" bgcolor="#0086b2"><img border="0" hspace="0" vspace="0" height="1" width="1" src="images/void.gif"></td>
+</tr>
+</table>
+</div>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Configuration</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> is configured by the 
+          subelement <code><font face="courier, monospaced">header-name</font></code>, specifying the name of the header attribute
+          name.
+        </font>
+</p>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Setup</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          The <code><font face="courier, monospaced">WildcardHeaderMatcher</font></code> gets the wildcard pattern from
+          its pattern attribute.
+        </font>
+</p>
+      
+      
+<font face="verdana, helvetica, sans serif" size="+1" color="#0086b2"><b>Effect on Object Model and Sitemap Parameters</b></font>
+        
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+          See a detailed discussion in
+          <a href="wildcarduri-matcher.html">WildcardURIMatcher</a>
+        </font>
+</p>
+      
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Bugs/Caveats</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        The use of <code><font face="courier, monospaced">parameter-name</font></code> instead of <code><font face="courier, monospaced">header-name</font></code> is deprecated. 
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">History</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        12-28-02: initial creation
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">Copyright</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        Copyright (C) 1999-2002 The Apache Software Foundation. All rights reserved.
+      </font>
+</p>
+    
+    
+<font face="verdana, helvetica, sans serif" size="+2" color="#0086b2">See also</font>
+<hr style="color: #0086b2" size="1">
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        A general documentation about matchers is available at
+        <a href="../concepts/matchers_selectors.html">Matchers and Selectors</a>.
+      </font>
+</p>
+      
+<p>
+<font color="black" face="verdana,helvetica,sanserif">
+        For a reference of available header names
+        see <a href="http://www.ietf.org/rfc/rfc2068.txt">RFC 2068</a>, especially
+        if Cocoon's run time environment is an http servlet environment. 
+      </font>
+</p>
+    
+  
+
+</td>
+</tr>
+</table>
+</td>
+</tr>
+</table>
+<table width="100%" cellspacing="0" cellpadding="0" border="0">
+<tr>
+<td bgcolor="#0086b2"><img width="1" src="images/dot.gif" height="1"></td>
+</tr>
+<tr>
+<td align="center"><font size="-1" face="arial,helvetica,sanserif" color="#0086b2"><i>Copyright &copy; 1999-2002 The Apache Software Foundation. All Rights Reserved.</i></font></td>
+</tr>
+</table>
+</body>
+</html>