Input files

Text Blocks are loaded from XML files, Rich Text Blocks are loaded from Microsoft Word *.doc or *.docx files. This means that to load text fragments as Text Blocks, you have to prepare them as XML files. To load documents as Rich Text Blocks, no special preparation is necessary, except for collecting them in an input folder for the migration tool.

XML format

For the XSD specifying the structure of the Text Block XMLs, see Examples. If needed, the XSD can also be written to the file TBimport.xsd with the following command line invocation.

tbmigrate /xsd

A Text Block consists of exactly one <tbk> node at top level with the attribute "xsv" to indicate the Text Block version. This <tbk> node can contain multiple paragraphs, ordered, and unordered lists of paragraphs, represented by the nodes <par> and <lst>. The attribute "ordered" on a <lst> node indicates whether a list is ordered or unordered. Paragraph nodes can either contain normal text or header text and fields indicated by the attribute "font." A paragraph can also have an indentation, described by the attribute "indentation."

Within paragraphs, you can have multiple texts, Fields, and special characters, stored in the nodes <txt>, <fld>, and <chr>. All nodes have the attributes "bold", "italic", and "underline" to indicate their layout.

The <chr> nodes represent a non-breaking space, a non-breaking hyphen, or a line break. This is indicated by the attribute "type." Each <chr> can represent only one character.

The attribute "set" in a <fld> node indicates the Field Set for the Field. The value of this node is the name of the Field. Each <fld> node can represent only one Field.

The <txt> nodes just contain text, possibly inside a CDATA section. Note that white space in these nodes is significant and will show up in the resulting Text Block.

The XML should conform to the XSD. Also, Field and Field Set names are limited to characters from the set Latin-1 character and subject to the naming rules of the Template Scripting language.

Preparing files

For each Text Block to be imported, a separate file needs to be created that contains its XML content. The file should have .xml as extension, and its name is used as the name of the Text Block. All Text Block files should be collected in a folder. Subfolders are allowed. Unless the option /subfolders is specified, they do not result in a subfolder structure built in the ITP/Model Development Kit.

Before loading, the TBMigrate tool checks the XML files for validity. To check them before attempting a load, use the following command.

tbmigrate /check /folder=<folder>

<folder> represents the folder containing the Text Block XML files.

The content of Microsoft Word documents in the source folder, which are imported as Rich Text Blocks, is not checked.