Tag markers

In most cases, the majority of mappings involve tag markers derived from the input document.

XML/SGML tags come in three forms:

  • start tags (possibly containing attributes)

  • end tags (marking the end of an element begun by the corresponding start tag)

  • empty element tags (treated exactly like a start end combination).

    For example the empty element tag:

    <chapter number="2" />

    is handled as if it were marked as:

    <chapter number="2"></chapter>

An important property of any marker is its content. The content of a tag marker is the same as the content of the corresponding XML/SGML element, while the marker name is the same as the element name.

So in the above example, the marker name would be chapter and the content would be the content of the chapter element, including all internal markup but excluding the chapter start and end tag.

Note that we do not consider <chapter> and </chapter> to be separate markers, and a single mapping applies to both.

It is possible to specify multiple mappings for a single element depending on position, ancestry, attribute values etc. For more information, see Defining and selecting mappings.