Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

32 Working with content models > 32.6 Inspecting and correcting element types


32.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: 

[spacer]

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 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 §15.4.3.1 Assigning DITA elements to FrameMaker paragraph formats. That way you will not be forced to use CodeBefore and CodeAfter settings to insert the tags for such an element.



32 Working with content models > 32.6 Inspecting and correcting element types