You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2001/07/17 14:31:32 UTC

cvs commit: xml-cocoon2/xdocs actions.xml generators.xml serializers.xml transformers.xml

cziegeler    01/07/17 05:31:32

  Modified:    xdocs    actions.xml generators.xml serializers.xml
                        transformers.xml
  Log:
  Small docs update
  
  Revision  Changes    Path
  1.4       +36 -2     xml-cocoon2/xdocs/actions.xml
  
  Index: actions.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/actions.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- actions.xml	2001/06/21 13:09:00	1.3
  +++ actions.xml	2001/07/17 12:31:29	1.4
  @@ -8,6 +8,7 @@
   	 <authors>
              <person name="Berin Loritsch" email="bloritsch@apache.org"/> 
              <person name="Giacomo Pati" email="giacomo@apache.org"/>
  +           <person name="Carsten Ziegeler" email="cziegeler@apache.org"/>
   	 </authors> 
     </header> 
     <body> 
  @@ -115,7 +116,11 @@
   import org.xml.sax.EntityResolver;
   
   public class HelloWorldAction extends AbstractAction {
  -  Map act(EntityResolver resolver, Map objectModel, String source, Parameters params) {
  +  public Map act (Redirector redirector, 
  +                  SourceResolver resolver, 
  +                  Map objectModel, 
  +                  String source, 
  +                  Parameters params) {
       Map sitemapParams = new HashMap();
       sitemapParams.put("world", "hello");
   
  @@ -168,10 +173,39 @@
          </source>
        </s3>
       </s2>
  +    <s2 title="Communication between Sitemap and Action">
  +       <p>
  +        As stated previously there is a two way communication between the
  +        Sitemap and the Action. The Sitemap can pass the parameters
  +        and the source attribute to the Action and the Action can return
  +        a Map object with new values which can be used in the sitemap.
  +       </p>
  +       <source>
  +<![CDATA[
  +<map:match pattern="file">
  +  <map:act type="hello-world" src="optinal src">
  +    <!-- and here come the parameters: -->
  +    <map:parameter name="first parameter" value="test"/>
  +
  +    <map:generate type="serverpages" src="{world}_world.xsp"/>
  +  </map:act>
  +  <map:serialize/>
  +</map:match>
  +]]>
  +       </source>
  +       <p>
  +        In addition to delivering values to the Sitemap, the Action can
  +        also control the flow. If the action returns <code>null</code>
  +        all statements inside the <code>map:act</code> element are
  +        not executed. So, if in the example above the hello world action
  +        would return <code>null</code> the server page generator
  +        would not be activated.
  +       </p>
  +    </s2>
      </s1>
      <s1 title="Action Sets">
       <p>
  -     You can arrage actions in an action set. The sitemap calls the
  +     You can arrange actions in an action set. The sitemap calls the
        act method of those actions in the sequence they are defined in the 
        action set. It is possible to signal to the sitemap to
        call an antion only if the Environments getAction method returns
  
  
  
  1.4       +1 -1      xml-cocoon2/xdocs/generators.xml
  
  Index: generators.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/generators.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- generators.xml	2001/07/13 09:56:27	1.3
  +++ generators.xml	2001/07/17 12:31:29	1.4
  @@ -25,7 +25,7 @@
   		 </s1>
   		 <s1 title="The Generators in Apache Cocoon 2">
   			<ul>
  -				<li><link href="file-generator.html">File Generator</link></li>
  +				<li><link href="file-generator.html">File Generator</link> (The default generator)</li>
   				<li><link href="html-generator.html">HTML Generator</link></li>
   				<li><link href="directory-generator.html">Directory Generator</link></li>
   				<li><link href="imagedirectory-generator.html">Image Directory Generator</link></li>
  
  
  
  1.4       +1 -1      xml-cocoon2/xdocs/serializers.xml
  
  Index: serializers.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/serializers.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- serializers.xml	2001/07/13 09:56:49	1.3
  +++ serializers.xml	2001/07/17 12:31:30	1.4
  @@ -24,7 +24,7 @@
   		 </s1>
   		 <s1 title="The Serializers in Apache Cocoon 2">
   			<ul>
  -				<li><link href="html-serializer.html">HTML Serializer</link></li>
  +				<li><link href="html-serializer.html">HTML Serializer</link> (The default serializer)</li>
   				<li><link href="xml-serializer.html">XML Serializer</link></li>
   				<li><link href="text-serializer.html">Text Serializer</link></li>
   				<li><link href="pdf-serializer.html">PDF Serializer</link></li>
  
  
  
  1.4       +1 -1      xml-cocoon2/xdocs/transformers.xml
  
  Index: transformers.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/xdocs/transformers.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- transformers.xml	2001/07/13 09:57:06	1.3
  +++ transformers.xml	2001/07/17 12:31:30	1.4
  @@ -24,7 +24,7 @@
   		 </s1>
   		 <s1 title="The Transformers in Apache Cocoon 2">
   			<ul>
  -				<li><link href="xslt-transformer.html">XSLT Transformer</link></li>
  +				<li><link href="xslt-transformer.html">XSLT Transformer</link> (The default transformer)</li>
   				<li><link href="extractor-transformer.html">Fragment Extractor Transformer</link></li>
   				<li><link href="i18n-transformer.html">I18n Transformer</link></li>
   				<li><link href="log-transformer.html">Log Transformer</link></li>
  
  
  

----------------------------------------------------------------------
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