preformat-type

Type of Preformatted Text

Type of content contained in the <preformat> element (for example, man-machine dialogs, poetry, ASCII art).

Usage

Many book tag sets make a distinction between different types of preformatted text (some by means of attributes, others with distinct elements). In this Tag Set, these different textual types will be tagged using either the element <preformat> or the element <code>. The element <code> is reserved for computer programs, XML instances and schema, pseudo-code, et al. For the other preformatted text types, the distinctions between different types can be preserved using the @preformat-type attribute, for example, by recording the content type of the text, such as “man-machine-dialogue”.

Remarks

This attribute is intended to capture already recorded information; however, for many documents this type of data will not be available.

Attribute Values

In Element

<preformat>
ValueMeaning
Text, numbers, or special charactersA 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 is an optional attribute; there is no default.

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