### 41.6 Inspecting and correcting element types

Utility program dtd2ini cannot always determine from a DTD the correct type of an element. Examine the classifications in section [ElementTypes] of the content-model configuration file, and correct any that are not right.

Element types are as follows:

Block | Block element that does not allow text content
Block Text | Block element that allows text content
Block Text Preform | Block element with preformatted text
Inline | Inline element that does not allow text content
Inline Text | Inline element that allows text content

The default element type is Block without Text.

Block and Inline properties determine whether returns are inserted before start tags and after end tags. The Text property determines whether an attempt is made to wrap any invalid text (in an element that does not allow Text) in a valid container element, such as <ph> for DITA. Preform determines whether whitespace within the element is retained as is. Preform elements are always Block elements, and they always allow Text.

If you generated the content model from a DTD and you plan to rerun dtd2ini, include any changed [ElementTypes] settings as overrides in configuration file dtd2ini.ini. You can override the Block, Inline, and Preform properties, but not the Text property.

Getting the Block vs. Inline typing wrong for an element is not a major disaster. The element type primarily affects the way XML output is formatted. Most XML processors ignore the formatting, except for preformatted elements.

DITA only: If your DTD defines a block element with no text (for example, to include just PI markers in the paragraphs from which the element is mapped), also map the no-text block element to No in [DITAParaTags], in your configuration file; see §24.4.3.1 Assigning DITA elements to paragraph formats. That way you will not be forced to use CodeBefore and CodeAfter settings to insert the tags for such an element.

Previous Topic: 41.5 Understanding how DITA2Go uses content models

Next Topic: 41.7 Specializing or modifying DITA topic types

Parent Topic: 41. Working with content models

Sibling Topics:

41.1 Understanding DITA2Go content models

41.2 Modifying or replacing a content model

41.3 Preparing a content model for use with DITA2Go

41.4 Understanding content-model configurations

41.5 Understanding how DITA2Go uses content models

41.7 Specializing or modifying DITA topic types

41.8 Extracting content-model debug information

Table of Contents • Index