[ channel icon ]


The channels are present in the Transmorpher transformations as names in the in and out attributes of all other elements (and the test attribute of the repeat element). They are identified by their names. Because the channel separator in the in and out attributes is the space (ascii 20), it is not possible to have spaces in channel names.

<process name="myproc" in="c1" out="c2 c3"> <dispatch type="broadcast" id="dp" in="c1" out="c2 c3"/> </process>

Content, encodings and types

So far, the channels always carry SAX 2.0 (Simple API for XML) events in which characters are encoded in UTF-8. There is no explicit notion of DTD for these SAX event streams. So validation cannot take place on them.

 [ stdin icon ]  [ stdout icon ]

Standard input and output

Standard input and output are denoted by the channel names _stdin_ and _stdout_. The standard input can only be used in standlone external interface (or main), the standard output can be used both in the standalone and the servlet external interfaces.

<main> <apply-process name="myproc" id="mp" in="_stdin_" out="_stdout_ c"/> <serialize type="" id="ser" in="c"> <with-param name="file">myfile.xml</with-param> </serialize> </main>

 [ null icon ]

The _null_ channel

The null channel is used when the output of a particular call is not useful and has to be ignored. This special channel is denoted by the _null_ and can be used everywhere an output channel is used.

<process name="myproc2" in="c1" out="c2"> <apply-process name="myproc" id="mp" in="c1" out="c2 _null_"/> </process>

Next chapter: Annotations

Feel free to comment to Jérôme:Euzenat#inrialpes:fr, $Id: channels.html,v 1.5 2005-10-25 13:34:00 euzenat Exp $