preformat-type

Type of Preformatted Text

Definition

Indicates the general kind of content the Preformatted Text element contains, for example, computer code, pseudocode, poetry, ASCII art, etc.

Usage

Many journal DTDs make a distinction between different types of preformatted text (some by means of attributes, others with distinct elements). In this DTD, all these figure types will be tagged using the <preformat> element. The distinctions between different types of preformatted text can be preserved using the preformat-type attribute, e.g., by recording the content type of the text, such as “computer code”.

Attribute Values

In Element

<preformat> Preformatted Text
Value Meaning
Text, numbers, or special characters A word or phrase that describes the content or names the type of content for the <preformat> element, for example, “code” for sample computer code or “xml” for an XML-tagged data sample
Restriction: This attribute may be specified if the element is used.

Suggested usage

Although designed to accept any text as its value, potential values for this attribute might include:

code

Code example in a computer language such as C++ or Visual Basic

poetry

Poems

ascii

ASCII art

man-machine

A man-machine dialog, such as an error message and response

pseudocode

Code-like examples used in explanation