Preprocessor for substituting variables intoa document before export. For
example the XML element
<Replaceable>Address</Replaceable> becomes
Rathfarnham, Dublin, Ireland becomes if the eventNode
passed to the printDocument method contains an element with the
id of Address containing the value, in the above
example. Similarly the
<Replaceable>xui_state/Address</Replaceable> becomes
Rathfarnham, Dublin, Ireland becomes if the stateNode
passed to the printDocument method contains an element with the
id of Address containing the value, in the above
example. The use of two nodes allows you to distinguish between input values
and the output or state values saved by the data bindings - the results of
user input and selections.
The TemplatePreprocessor first makes the substitutions described above and
the passes the processed XML to an instance of the TemplateExporter
class, and once the export file has been generated the document is either
saved, previewed or printed.
In preview mode an attempt is made to find a document with the suffix
Preview , such that a document name myDocument is
replaced with myDocumentPreview . If the preview document is not
found then the original document name is used. A file extension of
.xml is assumed. The preview mode is designed to allow a
different view of a document to be displayed, for example when previewing a
letter that may be printed of headed paper. The preview version of the
document may then contain the information that is on the pre-printed paper.
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.2 $
|