Processing instructions

Processing instructions allow documents to contain application specific instructions. The <pimap/> directive maps a processing instruction to a custom marker handler.

Where allowed

The $document mapping.

Range of effect

The entire document.

Attributes

name

Specifies the name of the processing instruction that is being mapped.

custom-marker

Specifies the name of a custom marker handler invoked each time the processing instruction is mapped.

data

Specifies how the content of the processing instruction is passed to the custom marker. It must be one of the following:

  • string passes the content to the custom marker handler as the value of attribute.

  • attributes assumes that the content is a series of NAME="VALUE" sequences and passes an attribute constructed from each of these to the custom marker.

  • cdata treats the content as unparsed character data and uses it as the content of the custom marker.

attribute

Specifies the name of a custom marker handler attribute that holds the string value of the processing instruction. Specifying a custom marker handler attribute name sets the data type to string.

[Note] Note

The string and attributes data types are only intended for string values without any structure. Entity and character references will be converted to characters before they are sent to the custom marker. Because the content is passed as attributes there are limits on both the length of the processing instruction that can be mapped and the length of each attribute value. To process character data of any type without a length restriction use the cdata data type.

In a full looseleaf publication, some processing instructions are reserved for use by TopLeaf and can not be mapped. See Full looseleaf publishing - Processing instructions.