Page: http://wiki.cocoondev.org/Wiki.jsp?page=CocoonProtocolExample, version: 4
on Tue Feb 18 08:43:09 2003 by 62.94.170.93
- <map:generate src="sql-query.xml/>
+ <map:generate src="sql-query.xml"/>
? +
- <map:match pattern="fulldoc.html">
+ <map:match pattern="fulldoc-*.html">
? ++
- <map:generate src="cocoon:/fulldoc.xml"/>
+ <map:generate src="cocoon:/fulldoc-{1}.xml"/>
? ++++
- <map:match pattern="fulldoc.rtf">
+ <map:match pattern="fulldoc-*.rtf">
? ++
- <map:generate src="cocoon:/fulldoc.xml"/>
+ <map:generate src="cocoon:/fulldoc-{1}.xml"/>
? ++++
+ !How does this works -- [Gabridome]
+ When you ask for fulldoc-someContent.rtf the request will match with the last
matcher.\\
+ This pipeline (the last) will generate sax events by calling the pipeline
fulldoc-someContent.xml with the cocoon protocol.\\
+ This internal request will match with the third matcher (fulldoc-*.xml).
Inside this pipeline the content of other two pipelines - head-someContent.xml
and body-someContent.xml - will be [aggregated | Aggregator].
+ Body-someContent.xml will read body/someContent.html and it will generate and
return xhtml.
+ Head-someContent.xml will extract its contents from the connection "mypool"
and it will return xml after a transformation.\\
+ While the body part depends on the page requested, the head is always
extracted with the same query (sql-query.xml).\\
+ The fulldoc-*.xml pipeline, after having aggregated the results of the head
and of the body pipeline, return the content to the main pipeline from where we
started which transform the content to rtf.\\
+ The pipeline flow can be represented as follow:
+ {{{
+ fulldoc-*.rtf --> fulldoc-*.xml --> head-*.xml --> fulldoc-*.xml -->
fulldoc-*.rtf
+ body-*.xml --^
+ }}}
+
+ !cocoon:/?
+ If your cocoon structure is divided into sub sitemaps you will be interested
in the fact that you can call pipeline in others sitemaps by calling the right
path:
+ * cocoon:/aPipeline ask the results of the pipeline "aPipeline" which resides
in the current sitemap
+ * cocoon://aPipeline ask the results of the pipeline "aPipeline" which
resides in the __main__ sitemap
+