TopLeaf processes input documents sequentially. Input is passed to the system in a continuous stream of text interspersed with structural and metadata objects called markers (e.g. tags and processing instructions). Each marker has the potential to trigger typesetting commands, such as Change font style to italic or Start new paragraph.

This streaming approach has the advantage of speed and simplicity, but limits the extent to which material in the document can be rearranged on the fly. To offset this, TopLeaf provides the following additional capabilities:

  • The ability to capture the content of any marker (for example the content of an element), to be used or re-used at any later point.

  • The ability to insert system or user-defined markers into the input stream, thus enabling the markup actually present in the document to be internally augmented to a level capable of driving the desired output.

The association between a marker and the corresponding actions is called a mapping. TopLeaf provides the Mapping Editor for creating and editing mappings to achieve the desired result.

In practice, the majority of markers used in document rendering correspond to the XML/SGML tags already in the document. However TopLeaf recognizes several other types of marker, all of which have the ability to drive the typesetting process.

The following section describes the available markers in greater detail.