KCM Core Text Block XML elements

Header

<tbk xsv='2.2.0'>
    <par ...> ... </par>
    <lst ...> ... </lst>
    <tbl ...> ... </tbl>
    ...
</tbk>

The required xsv attribute specifies the version of the KCM Core Text Block XML format. This must be version 2.2.0.

The content of the Text Block is a sequence of one or more paragraphs, lists, and tables.

KCM Repository and KCM Core can expose Text Block XML files where the xsv attribute refers to older versions of the Text Block XML format. The 2.0.x and 2.1.x versions are a subset of the 2.2.0 format, and you can treat these versions as if they were saved as version 2.2.0. Version 1 is completely incompatible and should be rejected.

Paragraphs

The paragraph element represents a logical paragraph and the attributes that apply to this paragraph. The attributes are mapped to styles in Microsoft Word.

<par font='normal' indentation='0' hanging-indentation='false'>
    <txt ...> ... </txt>
    <chr .../>
    <fld ...> ... </fld>
    ...
</par>

All of the following attributes are required:

  • font defines the style in which the paragraph is represented. Allowed values are normal for regular text and header for highlighted text.
  • indentation defines the indentation level of the paragraph. Every level shifts the paragraph one tab stop to the right.
  • hanging-indentation indicates whether or not the first line of the paragraph should start one tab stop to the left of the other lines. Allowed values are true or false.

The content of the paragraph is a sequence of zero or more text runs, special characters and KCM Core data fields.

All elements in the paragraph require the boolean attributes bold, italic, and underline. These attributes control the font attributes of the rendered text and expect the values true and false.

The paragraph attributes only provide context hints to the intended layout. The style sheet defines the actual visualization of the styles.

Text elements

A text element represents a simple run of text.

All white space between the <txt> and </txt> tags is significant.

<txt bold='false'
     italic='true'
     underline='false'><![CDATA[This is some formatted text.]]></txt>

Character elements

A character element represents a control character.

<chr type='NBSP' bold='false' italic='true' underline='true'/>

All attributes are required.

The type attribute expresses the type of control character. Supported values are the following:

  • TAB is a Tab character.
  • LBR is a soft line break (Shift+Enter in Microsoft Word).
  • NBSP is a non-breakable space.
  • NBHH is a non-breakable hyphen.

Field elements

The field element is used to insert a value from the Data Backbone into the result document.

The specific Field Set that provides the value is resolved at run time when the Content Wizard determines in which context the Text Block is used.

<fld bold='false' italic='true' underline='false' set='Customer'>Name</fld>

All attributes are required.

The set attribute defines the Field Set and the content of the tag defines the field that will be retrieved. Both references are case-sensitive and must match the definition in the KCM Repository exactly.

List elements

The list element represents a list of paragraphs and lists where every element is shown as an item.

<lst style='ordered'>
    <par ...> ... </par>
    <lst ...> ... </lst>
    ...
</lst>

All attributes are required.

The style attribute defines one of the following types of list that will be rendered:

  • ordered defines a numbered list.
  • unordered defines a bulleted list.

The style attributes only provide context hints to the intended layout. The style sheet defines the actual visualization of the list.

Lists are allowed to be nested. Every nested list automatically increases the nesting level by one.

Table elements

Table elements are currently only supported in the context of Microsoft Word DOCX projects.

The table element represents a simple table in the Text Block. This table is restricted to a fixed number of rows and columns.

<tbl>
    <prp ... > ... </prp>
    <row>
        <col>
        </col>
        ...
    </row>
    ...
</tbl>

Each cell in the table may contain a sequence of paragraphs and lists. Tables cannot be nested.

Table properties

The property element defines the format and layout of the table.

<prp nrows='10'
     ncols='3'
     header-row='false' footer-row='true'
     first-column='false' last-column='false'
     autosize='false'>
    <col width='1440'/><!-- one inch -->
    <col width='567'/><!-- one centimeter -->
    ...
</prp>

The following attributes are required:

  • nrows defines the number of rows in the table.
  • ncols defines the number of columns in every row.

The following attributes are optional:

  • header-row
  • footer-row
  • first-column
  • last-column

    These four attributes determine whether special formatting rules from the Microsoft Word style must be applied to the indicated row or column. If one of these values is set to true, the exception is applied to that row or column.

  • autosize instructs Microsoft Word to enable or disable the autosizing of the table. If autosize is set to true, Microsoft Word automatically sizes the table based on the content of the cells and any <col .../> column definitions are ignored.

The <col .../> elements define the width of the columns if the autosize attribute is not present or set to false. If the table is manually sized there must be a <col width='...' /> element for every column. The width is specified in units of 1440th of an inch (twips).

Rows

The row element defines a row of cells in the table. The number of <row> elements must exactly match the nrows attribute of the table.

Cells

The cell element defines a cell in a row. The number of <col> elements in every row must exactly match the ncols attribute of the table.

<col>
    <par ...> ... </par>
    <lst ...> ... </lst>
    ...
</col>

A cell contains a sequence of one or more paragraphs and lists. It is not possible put a table within another table cell.