Custom markers

A custom marker is a user defined tag inserted into the typesetting input stream from a style sheet mapping rule. Within a user customisation, custom markers can have start, end and empty forms. Custom markers can declare a set of attributes. To distinguish them from typesetting commands, custom marker names must begin with an upper case letter.

A custom marker mapping is defined just like a document tag mapping, except that the custom marker mapping name must begin with % in order to prevent a name conflict with a document tag. Note that while the mapping name begins with %, a custom marker reference does not. For example, a reference to the <Marker/> custom marker would trigger the %Marker mapping rule.

A custom marker mapping must be declared for all referenced custom markers. An error will be flagged if the typesetting engine references an unmapped custom marker. Custom marker attributes can be referenced from within the mapping as attribute variables (for example, {@ATTR}).

[Note] Note

Custom markers are implicitly declared to contain mixed content (that is, they can contain character data, or character data mixed with other custom markers). If you need to use a custom marker as a container tag, you must declare the custom marker content model (see Content model) as Element