There're two types of eText templates: fixed-position based (EFT templates) and delimiter-based (EDI templates).
The templates are composed of a series of tables. The tables define layout and setup commands and data field definitions. The required data description columns for the two types of templates vary, but the commands and functions available are the same. A table can contain just commands, or it can contain commands and data fields.
The following illustration shows a sample from an EFT template to display the general structure of command and data rows.
Commands that apply globally, or commands that define program elements for the template, are "setup" commands. These must be specified in the initial tables of the template. Examples of setup commands are Template Type and Character Set.
In the data tables you provide the source XML data element name and the specific placement and formatting definitions required by the receiving bank or entity. You can also define functions to be performed on the data and conditional statements.
The data tables must always start with a command row that defines the "Level." The Level associates the table to an element from the XML data file, and establishes the hierarchy. The data fields that are then defined in the table for the Level correspond to the child elements of the XML element.
The following graphic illustrates the relationship between the XML data hierarchy and the template Level. The XML element "RequestHeader" is defined as the Level. The data elements defined in the table ("FileID" and "Encryption") are children of the RequestHeader element.
The order of the tables in the template determines the print order of the records. At runtime the system loops through all the instances of the XML element corresponding to a table (Level) and prints the records belonging to the table. The system then moves on to the next table in the template. If tables are nested, the system generates the nested records of the child tables before moving on to the next parent instance.
Command Rows, Data Rows, and Data Column Header Rows
Command rows are used to specify commands in the template. Command rows always have two columns: command name and command parameter. Command rows don't have column headings. The commands control the overall setup and record structures of the template.
The following figure shows the placement of Command Rows, Data Rows, and Data Column Header Rows:
Blank rows can be inserted anywhere in a table to improve readability. Most often they're used in the setup table, between commands. Blank rows are ignored by Publisher when the template is parsed.
Data Column Header Rows
Data column headers specify the column headings for the data fields (such as Position, Length, Format, Padding, and Comments). A column header row usually follows the Level command in a table (or the sorting command, if one is used). The data column header row must come before any data rows in the table. Additional empty column header rows can be inserted at any position in a table to improve readability. The empty rows are ignored at runtime.
The required data column header rows vary depending on the template type. See Structure of the Data Rows.
Data rows provide the values for the data column header attributes for each data field.
The content of the data rows varies depending on the template type. See Structure of the Data Rows.