cziegeler 01/07/17 05:31:54
Modified: xdocs Tag: cocoon_20_branch actions.xml generators.xml
serializers.xml transformers.xml
Log:
Small docs update
Revision Changes Path
No revision
No revision
1.2.2.2 +36 -2 xml-cocoon2/xdocs/actions.xml
Index: actions.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/actions.xml,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -r1.2.2.1 -r1.2.2.2
--- actions.xml 2001/06/21 12:59:17 1.2.2.1
+++ actions.xml 2001/07/17 12:31:52 1.2.2.2
@@ -8,6 +8,7 @@
<authors>
<person name="Berin Loritsch" email="[EMAIL PROTECTED]"/>
<person name="Giacomo Pati" email="[EMAIL PROTECTED]"/>
+ <person name="Carsten Ziegeler" email="[EMAIL PROTECTED]"/>
</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.1.2.3 +1 -1 xml-cocoon2/xdocs/generators.xml
Index: generators.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/generators.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- generators.xml 2001/07/12 21:06:09 1.1.2.2
+++ generators.xml 2001/07/17 12:31:52 1.1.2.3
@@ -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.1.2.3 +1 -1 xml-cocoon2/xdocs/serializers.xml
Index: serializers.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/serializers.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- serializers.xml 2001/07/12 21:07:05 1.1.2.2
+++ serializers.xml 2001/07/17 12:31:53 1.1.2.3
@@ -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.1.2.3 +1 -1 xml-cocoon2/xdocs/transformers.xml
Index: transformers.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/xdocs/transformers.xml,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- transformers.xml 2001/07/12 21:07:35 1.1.2.2
+++ transformers.xml 2001/07/17 12:31:53 1.1.2.3
@@ -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: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]