Modified: cocoon/trunk/src/documentation/xdocs/userdocs/selectors/book.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/documentation/xdocs/userdocs/selectors/book.xml?view=diff&r1=155184&r2=155185
==============================================================================
--- cocoon/trunk/src/documentation/xdocs/userdocs/selectors/book.xml (original)
+++ cocoon/trunk/src/documentation/xdocs/userdocs/selectors/book.xml Thu Feb 24 
05:09:44 2005
@@ -35,7 +35,9 @@
     <menu-item label="Host Selector" href="host-selector.html"/>
     <menu-item label="Parameter Selector" href="parameter-selector.html"/>
     <menu-item label="Request Attribute Selector" 
href="requestattribute-selector.html"/>
+    <menu-item label="Request Method Selector" 
href="requestmethod-selector.html"/>
     <menu-item label="Request Parameter Selector" 
href="requestparameter-selector.html"/>
+    <menu-item label="Resource Exists Selector" 
href="resourceexists-selector.html"/>
     <menu-item label="Regular-expression Header Selector" 
href="regular-expression-header-selector.html"/>
   </menu>
   <menu label="Optional">

Added: 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/requestmethod-selector.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/documentation/xdocs/userdocs/selectors/requestmethod-selector.xml?view=auto&rev=155185
==============================================================================
--- 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/requestmethod-selector.xml
 (added)
+++ 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/requestmethod-selector.xml
 Thu Feb 24 05:09:44 2005
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" 
"../../dtd/document-v10.dtd">
+
+<!--
+  <![CDATA[ CVS Version: $Id: requestmethod-selector.xml 123717 2004-12-30 
14:23:28Z vgritsenko $ 
+  ]]>  
+-->
+<document>
+  <header>
+    <title>RequestMethodSelector in Cocoon</title>
+    <version>0.9</version>
+    <type>Technical document</type>
+    <authors>
+      <person name="Cocoon Community" email="dev@cocoon.apache.org"/>
+    </authors>
+    <abstract>This document describes the RequestMethodSelector of 
Cocoon.</abstract>
+  </header>
+  <body>
+    <s1 title="RequestMethodSelector">
+      <table>
+        <tr>
+          <td>NAME</td><td>RequestMethod</td>
+        </tr>
+        <tr>
+          <td>WHAT</td><td>The <code>RequestMethodSelector</code> component is 
used to 
+            select appropriate sitemap processing depending on the request 
method, 
+            for example, <code>GET</code> or <code>POST</code>.
+          </td>
+        </tr>
+        <tr>
+          <td>TYPE</td><td>Selector, Sitemap Component</td>
+        </tr>
+        <tr>
+          <td>BLOCK</td><td>Core</td>
+        </tr>
+        <tr>
+          
<td>CLASS</td><td>org.apache.cocoon.selection.RequestMethodSelector</td>
+        </tr>
+        <tr>
+          <td>CACHEABLE</td><td>not applicable</td>
+        </tr>
+      </table>
+    </s1>
+    <s1 title="Description">
+      <p>
+        The RequestMethodSelector allows pipeline creation to be influenced by 
the method of
+        the request. For example, in a Cocoon Forms environment, a 
<code>GET</code> request
+        could be forwarded to a new FlowScript function, whilst a 
<code>POST</code> could be 
+        forwarded to a continuation, for example:
+      </p>
+      <source><![CDATA[
+<map:match pattern="myform">
+  <map:select type="request-method">
+    <map:when test="GET">
+       <map:call function="myform"/>
+    </map:when>
+    <map:when test="POST">
+      <map:call continuation="request-param:continuation-id"/>
+    </map:when>
+  </map:select>
+</map:match>
+]]></source>
+    </s1>
+    <s1 title="Configuration">
+      
+      <s2 title="Sitemap component configuration example">
+        <p></p>
+        <source><![CDATA[
+<map:selectors...
+  <map:selector name="request-method" 
+                logger="sitemap.selector.request-method" 
+                src="org.apache.cocoon.selection.RequestMethodSelector"/>
+  ...
+</map:selectors>
+]]></source>
+      </s2>
+      <s2 title="Configuration">
+        <p>
+          The request method selector does not require any specific 
configuration, other than
+          specifying a name and an implementing class, as in the example above.
+        </p>
+      </s2>
+    </s1>
+    <s1 title="History">
+      <p>
+        2004-12-16: Created this document
+      </p>
+    </s1>
+    <s1 title="See also">
+      <p>
+        General documentation about selectors is available at
+        <link href="../concepts/matchers_selectors.html">Matchers and 
Selectors</link>.
+      </p>
+    </s1>
+  </body>
+</document>
+

Added: 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/resourceexists-selector.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/documentation/xdocs/userdocs/selectors/resourceexists-selector.xml?view=auto&rev=155185
==============================================================================
--- 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/resourceexists-selector.xml
 (added)
+++ 
cocoon/trunk/src/documentation/xdocs/userdocs/selectors/resourceexists-selector.xml
 Thu Feb 24 05:09:44 2005
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" 
"../../dtd/document-v10.dtd">
+
+<!--
+  <![CDATA[ $Id$ 
+  ]]>
+
+-->
+<document>
+  <header>
+    <title>ResourceExistsSelector in Cocoon</title>
+    <version>0.9</version>
+    <type>Technical document</type>
+    <authors>
+      <person name="Andrew Savory" email="[EMAIL PROTECTED]"/>
+    </authors>
+    <abstract>This document describes the ResourceExistsSelector of 
Cocoon.</abstract>
+  </header>
+  <body>
+    <s1 title="ResourceExistsSelector">
+      <table>
+        <tr>
+          <td>NAME</td><td>resource-exists</td>
+        </tr>
+        <tr>
+          <td>WHAT</td><td>The <code>ResourceExistsSelector</code> component 
is used to 
+            select appropriate sitemap processing depending on the existence 
of a set of resources.
+          </td>
+        </tr>
+        <tr>
+          <td>TYPE</td><td>Selector, Sitemap Component</td>
+        </tr>
+        <tr>
+          <td>BLOCK</td><td>Core</td>
+        </tr>
+        <tr>
+          
<td>CLASS</td><td>org.apache.cocoon.selection.ResourceExistsSelector</td>
+        </tr>
+        <tr>
+          <td>SINCE</td><td>Cocoon 2.1</td>
+        </tr>
+        <tr>
+          <td>CACHEABLE</td><td>not applicable</td>
+        </tr>
+      </table>
+    </s1>
+    <s1 title="Description">
+      <p>
+        The <code>ResourceExistsSelector</code> selects the first of a set of
+        Resources (usually files) that exists in the context.
+      </p>
+    </s1>
+    <s1 title="Usage">
+      <p>
+        Pipelines can be built based on the existence of files, for example
+        building a PDF from XSL-FO or a higher-level XML format.
+      </p>
+      <s2 title="Sitemap pipeline examples">
+        <p></p>
+        <source><![CDATA[
+<map:match pattern="**.html"> 
+  <map:select type="resource-exists">
+    <map:when test="content/{1}.xml">
+      <map:generate src="content/{1}.xml" />
+      <map:transform src="stylesheets/page2html.xsl" />
+    </map:when>
+    <map:otherwise>
+      <map:generate src="resources/html/{1}.html" />
+    </map:otherwise>
+  </map:select>
+  <map:serialize type="html"/>
+</map:match>
+        ]]></source>
+      </s2>
+      
+      <s2 title="Sitemap component configuration example">
+        <p></p>
+        <source><![CDATA[
+<map:selectors...
+
+  <map:selector name="resource-exists" 
+    src="org.apache.cocoon.selection.ResourceExistsSelector"
+    logger="sitemap.selector.resource-exists"
+  >
+    <map:parameter src="prefix" value="/"/>
+  </map:selector>
+    ...
+  </map:selectors>
+...
+]]></source>
+      </s2>
+      <s2 title="Configuration">
+        <p>
+          The optional <code>prefix</code> parameter is prepended to all test
+          expressions before evaluation. The default prefix is '/', meaning 
that
+          all expressions are relative to the context root, unless explicitly
+          overridden.
+        </p>
+      </s2>
+      <s2 title="Setup">
+        <p>
+          Setting up a <code>ResourceExistsSelector</code> includes choosing 
the
+          <code>&lt;map:when&gt;</code> test expressions, and an optional 
+          <code>&lt;map:otherwise&gt;</code> clause.
+        </p>
+      </s2>
+<!--      <s2 title="Effect on Object Model and Sitemap Parameters">
+        <p>
+        
+        </p>
+      </s2>-->
+    </s1>
+<!--    <s1 title="Bugs/Caveats">
+      <p>
+        Describe limitation, bugs of ResourceExistsSelector 
+      </p>
+    </s1>-->
+    <s1 title="History">
+      <p>
+        03-19-03: initial creation
+      </p>
+    </s1>
+    <s1 title="See also">
+      <p>
+        <!-- Links to related components pages. -->
+        A general documentation about selectors is available at
+        <link href="../concepts/matchers_selectors.html">Matchers and 
Selectors</link>.
+      </p>
+    </s1>
+  </body>
+</document>
+


Reply via email to