[ dispatch icon ]

Dispatchers

The dispatcher is an element that has one input and many outputs. It can be used for broadcasting the input to several channels or to selectively separate some elements from others.

The dispatch element introduces the use of a dispatcher in a process body. Its structure is the following:

<dispatch type="type" id="id" in="channel" out="channels"> {<with-param>}* </dispatch>

Transmorpher provides a basic implementation of a dispatcher, its behavior is to copy the input to the different outputs. It is used in the bibliography example for dispatching the input:

<dispatch type="broadcast" id="dispatch 2" in="R112" out="D1 D3"/> <dispatch type="broadcast" id="dispatchStripped" in="X1" out="X11 X12"/>

DispatchBasic
Figure: Basic dispatcher

One can imagine more complex dispatchers. In the bibliography example, a dispatcher could split the reference elements into a regular list of references and the list of authors. This can be useful for generating a list of authors (sorted and uniq'ed) or an index. In the transformation of this paper from XML to HTML, we could have separated the graphic elements from the rest of this paper in order to transform the TIFF pictures into JPEG.

DispatchComplex
Figure: Complex dispatcher

 [ merge icon ]

Mergers

The merger is a process that has several inputs and one output.

The merge element introduces the use of a merger in a process body. Its structure is the following:

<merge type="type" id="id" in="channels" out="channel"> {<with-param>}* </merge>

Transmorpher provides a simple notion of merger that copies all the 2..n channels under the root element of the first channel (preserving order). This merger is used in the bibliography example for merging two source XML documents:

<merge type="concat" id="merge" in="R1 R2" out="R3"/>

ConnectorBasic
Figure: Basic merger

One can imagine more complex mergers. For instance, in the bibliography example, one can define a merger which merges a channel of titles with a channel of authors to produce a channel of references.

ConnectorComplex
Figure: complex merger

Next chapter: External processes


Feel free to comment to transmorpher-dev@fluxmedia.fr, Last modified: Tue May 29 14:16:53 CEST 2001
$Id: dispatch.html,v 1.2 2001/10/10 07:29:23 jerome Exp $