You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by ha...@apache.org on 2001/07/24 11:49:22 UTC

cvs commit: xml-cocoon2/xdocs actions.xml faq.xml who.xml

haul        01/07/24 02:49:22

  Modified:    xdocs    actions.xml faq.xml who.xml
  Log:
  - FAQ entry actions and listOfMaps
  - actions docs extended with Maps & Maps for action sets
  
  Revision  Changes    Path
  1.7       +31 -2     xml-cocoon2/xdocs/actions.xml
  
  Index: actions.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/actions.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- actions.xml	2001/07/19 13:47:19	1.6
  +++ actions.xml	2001/07/24 09:49:22	1.7
  @@ -9,6 +9,7 @@
              <person name="Berin Loritsch" email="bloritsch@apache.org"/> 
              <person name="Giacomo Pati" email="giacomo@apache.org"/>
              <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
  +           <person name="Christian Haul" email="haul@apache.org"/>
   	 </authors> 
     </header> 
     <body> 
  @@ -193,6 +194,23 @@
   </map:match>
   ]]>
          </source>
  +       <p>This Map object does not replace the previous Map object put
  +       is stacked on top of it. The other Map objects are still
  +       accessible through a path expression.</p>
  +<source>
  +<![CDATA[
  +<map:match pattern="*">
  +  <map:act type="validate-session">
  +    <map:generate type="serverpages" src="{../1}.xsp"/>
  +  </map:act>
  +  <map:serialize/>
  +</map:match>
  +]]>
  +</source>
  +       <p>The above example shows how to access the next to last map
  +       by prefixing the key with "<code>../</code>"</p>
  +    </s2>
  +    <s2 title="Flow Control">
          <p>
           In addition to delivering values to the Sitemap, the Action can
           also control the flow. If the action returns <code>null</code>
  @@ -201,6 +219,9 @@
           would return <code>null</code> the server page generator
           would not be activated.
          </p>
  +       <p> In other words: The statements within the
  +       <code>map:act</code> element are <em>only</em> executed if the
  +       action returns at least an empty Map object.</p>
       </s2>
      </s1>
      <s1 title="Action Sets">
  @@ -212,8 +233,16 @@
        a String identical to the value supplied with an action attribute.
        In the current implementation of the HttpEnvironment the value 
        returned by the getAction method is determined by a http parameter 
  -     called "cocoon-action". So far let's have a look at at possible 
  -     action set definition:
  +     called "cocoon-action".</p>
  +     <p> Above we have seen that a successfully executed action
  +     returns a Map object that can be used to communicate with the
  +     sitemap. In case of an action set this is similar. With action
  +     sets all returned Map objects are merged into a single Map. Of
  +     course a Map can contain only one value per key so that if
  +     multiple actions within an action set use the same key to
  +     communicate to the sitemap, only the last one "survives".</p>
  +     <p>
  +      So far let's have a look at at possible action set definition:
       </p>
       <source>
   <![CDATA[
  
  
  
  1.14      +26 -0     xml-cocoon2/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/faq.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- faq.xml	2001/07/23 15:27:42	1.13
  +++ faq.xml	2001/07/24 09:49:22	1.14
  @@ -360,6 +360,32 @@
    </answer>
   </faq>
   <faq>
  +  <question>When I add an action to a pipeline @docname@ returns an
  +  error.</question>
  +  <answer>
  +  <p>Before the action was added to the pipeline it worked fine. After
  +  the change @docname@ seems not to find the file specified in the
  +  variable that is returned by the matcher.</p>
  +<source>
  +<![CDATA[
  +<map:match pattern="*">
  +  <map:act type="validate-session">
  +    <map:generate type="serverpages" src="{../1}.xsp"/>
  +  </map:act>
  +  <map:serialize/>
  +</map:match>
  +]]>
  +</source>
  +  <p>Please note in the above example the
  +  "<em><code>../1</code></em>".</p> 
  +  <p>Map objects returned from matchers, actions etc. are organised
  +  <em>hierarchically</em>. Therefore they are not replaced by new ones
  +  but older ones are still accessible through a path expression. Here
  +  "<code>../1</code>" references key ("variable") "1" in the next to
  +  last Map. </p>
  +  </answer>
  +</faq>
  +<faq>
    <question>How could I have my @docname@app in an URI other than
      &lt;you-server&gt;/cocoon/&lt;my-app&gt;?
    </question>
  
  
  
  1.5       +1 -0      xml-cocoon2/xdocs/who.xml
  
  Index: who.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/who.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- who.xml	2001/07/23 02:30:42	1.4
  +++ who.xml	2001/07/24 09:49:22	1.5
  @@ -56,6 +56,7 @@
         <li>Michael Anderson (mmanders@apache.org)</li>
         <li>Sylvain Wallez (sylvain@apache.org)</li>
         <li>Vadim Gritsenko (vgritsenko@apache.org)</li>
  +      <li>Christian Haul (haul@apache.org)</li>
       </ul>
     </s2>
    </s1>
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org