cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Your first XML pipeline (publishing)
Date Sun, 06 May 2007 17:10:58 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/documentation/1290.html

Document ID: 1290
Branch: main
Language: default
Name: Your first XML pipeline (publishing) (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 5/6/07 5:10:38 PM
Updated by: Reinhard Pötz

A new version has been created, state: publish

Parts
=====

Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 8239 bytes (previous version: 8304 bytes)
Content diff:
    <html>
    <body>
    
--- <p class="fixme">The archetype has to use Maven deployer by default.</p>
+++ <p>This tutorial is based on the <a href="daisy:1159">"Your first Cocoon
+++ application using Maven 2"</a> guide which shows how to bootstrap a Cocoon
+++ project.</p>
    
--- <p class="fixme">The first tutorial should be split into two parts: one that
--- only creates a block and a second one, that creates a war. That tutorial should
--- be stand alone because it is too much to introduce this concept there too IMHO
--- (rpoetz).</p>
+++ <p>In this tutorial you will</p>
    
--- <p class="fixme">The first tutorial should introduce into cocoon:rcl so that
--- Cocoon becomes useable right away.</p>
+++ <ol>
+++ <li>get an overview of what a Cocoon pipelines and sitemaps are</li>
+++ <li>create your first pipeline that emits XML</li>
+++ <li>enhance this first pipeline by adding an XML transformation step based on
+++ XSLT that produces HTML as output</li>
+++ <li>write a pipeline that creates a PDF document</li>
+++ </ol>
    
--- <p class="fixme">The first tutorial should be renamed.</p>
--- 
--- <p>This tutorial is based on the <a href="daisy:1159">"Your first Cocoon
--- application using Maven 2" guide</a> which shows how to bootstrap a Cocoon
--- project.</p>
--- 
    <h1>Overview</h1>
    
    <p>Cocoon is based around the concept of pipelines:</p>
    
    <p><img src="daisy:367"/></p>
    
--- <p>If a request comes in, a <strong>generator</strong> produces SAX
events (~
--- XML), <strong>tranformers</strong> can alter the stream of SAX events and
a
+++ <p>If a request comes in, a <strong>generator</strong> produces
+++ <a href="http://www.saxproject.org/">SAX events</a> that represent the XML,
+++ <strong>tranformers</strong> can alter the stream of SAX events and a
    <strong>serialize</strong>r finally creates an output stream which is sent
to
    the client.</p>
    
(5 equal lines skipped)
    <li>HTML serializer</li>
    </ul>
    
--- <p>Sitemaps connect requests with those sitemaps by definining rules. When a
--- rule matches, the pipeline is executed.</p>
+++ <p><strong>Sitemaps</strong> are used to define those pipelines and
connect them
+++ with requests. This connections are defined by some kind of rules. In the
+++ context  of Cocoon  those rules are named matchers. Whenever one of those rules
+++ (matcher) matches, a pipeline is executed.</p>
    
    <h1>Create a pipeline in the sitemap</h1>
    
(53 equal lines skipped)
     xmlns:map="http://apache.org/cocoon/sitemap/1.0"&gt;
    
      &lt;map:pipelines&gt;
---     &lt;map:pipeline&gt;<strong>
--- </strong>      &lt;map:match pattern="myFirstPipeline"&gt;
+++     &lt;map:pipeline&gt;       &lt;map:match pattern="myFirstPipeline"&gt;
            &lt;map:generate src="myXmlFile.xml" type="file"/&gt;
            &lt;map:serialize type="xml"/&gt;
---       &lt;/map:match&gt;<strong>
--- </strong><strong><strong><strong>      &lt;map:match pattern="mySecondPipeline"&gt;
+++       &lt;/map:match&gt; <strong><strong><strong>      &lt;map:match
pattern="mySecondPipeline"&gt;
            &lt;map:generate src="myXmlFile.xml" type="file"/&gt;
    </strong></strong><strong><strong><strong><strong>
       &lt;map:transform src="myXsltFile.xslt" type="xslt"/&gt;</strong></strong></strong></strong>
    <strong><strong>        &lt;map:serialize type="html"/&gt;
(38 equal lines skipped)
     xmlns:map="http://apache.org/cocoon/sitemap/1.0"&gt;
    
      &lt;map:pipelines&gt;
---     &lt;map:pipeline&gt;<strong>
--- </strong>      &lt;map:match pattern="myFirstPipeline"&gt;
+++     &lt;map:pipeline&gt;       &lt;map:match pattern="myFirstPipeline"&gt;
            &lt;map:generate src="myXmlFile.xml" type="file"/&gt;
            &lt;map:serialize type="xml"/&gt;
---       &lt;/map:match&gt;<strong>
--- </strong>      &lt;map:match pattern="mySecondPipeline"&gt;
+++       &lt;/map:match&gt;       &lt;map:match pattern="mySecondPipeline"&gt;
            &lt;map:generate src="myXmlFile.xml" type="file"/&gt;
            &lt;map:transform src="myXsltFile.xslt" type="xslt"/&gt;
            &lt;map:serialize type="html"/&gt;
---       &lt;/map:match&gt;<strong><strong><strong>
--- </strong></strong></strong><strong><strong><strong>
     &lt;map:match pattern="myThirdPipeline"&gt;
+++       &lt;/map:match&gt; <strong><strong><strong>      &lt;map:match
pattern="myThirdPipeline"&gt;
            &lt;map:generate src="myXmlFile.xml" type="file"/&gt;
    </strong></strong><strong><strong><strong><strong>
       &lt;map:transform src="myXml2PdfFile.xslt" type="xslt"/&gt;</strong></strong></strong></strong>
    <strong><strong>        &lt;map:serialize type="fop"/&gt;
(36 equal lines skipped)


Mime
View raw message