Pipelines overview
The multi-channel publishing subsystem of Cocoon is based on XML processing pipelines.
A pipeline consists of:
- A Generator, which generates XML data for further processing.
-
Zero or more Transformers, which process, transform or complete
the XML data.
-
A Serializer, which transforms the XML data into the appropriate
text or binary format for the client.
The are many types of Generators, Transformers and Serializers, but
a typical pipeline could consist of:
-
A FileGenerator which produces XML data by parsing XML files or XML documents
retrieved via an HTTP request.
-
An XSLT transformer which converts the XML vocabulary to another, for example
XHTML.
-
An HTMLSerializer which sets the text/html content-type and sends
the XML elements as HTML to the output.
The building and configuration of the pipelines is controlled by the sitemap, an
XML document used by Cocoon to dynamically instantiate and activate pipelines.
The next pages show several examples using various components.