When a transformation flow takes input from a source which is not a stream (file, network, database...) or must output some information directly to such a location, there is a need for basic "transformations" achieving this simple task. This is useful when generating a full web site from source elements.
Generators (and serializers) are the most basic built-in components. They are transformations with no input and one output (and one input and no output respectively).
The generate element introduces the use of a generator in a process body. Its structure is the following:
In the bibliographic example, the transformation flows always get their data from files bibexmo.xml and je.xml. These files are read through the use of the generate element:
The serialize element introduces the use of a serializer in a process body. Its structure is the following:
In the bibliographic example, the transformation flows always output its results to the files biblio.html, biblio.bib, biblio-xml.html and tb-biblio.html via the serialize elements:
Serializing enables, for instance, reading a file from the file system or the Internet. It can also generate XML from a database.
Next chapter: Dispatchers