Xref file format

The following fragment shows the structure of a typical Xref file produced by TopLeaf:

<tl:xrefline class="title">
  <tl:title id="tl:Tutorial.19">Overview</tl:title>
  <tl:folio id="tl:Tutorial.19">2</tl:folio>
</tl:xrefline> 
<tl:xrefline class="%Heading">
  <tl:title id="tl:Tutorial.56">The <ital>Preferred</ital> Method</tl:title>
  <tl:folio id="tl:Tutorial.56">4</tl:folio>
</tl:xrefline>

Each Xref line contains a title and a folio label that identifies the page on which the entry is defined. Any internal tagging in the original entry is preserved, but distinguished by the absence of the TopLeaf namespace prefix (tl:).

The class attribute indicates the element which generated the Xref entry. If the entry was generated by a custom marker the name will be preceded by a %.

The inclusion of the original entry markup allows effects (such as emphasis or subscripting) to be reproduced in the output if desired. If you do not want such effects preserved, define a mapping (for example, tl:xrefline//ital) which does nothing. This will override the default behavior of the tag in question.

The id attributes can be used to create a link to the point in the data that generated the Xref entry. If the element contains an attribute called idtype with value auto it means that the id attribute value was generated automatically. Note that automatically-generated link values may change depending on the preceding content, so additional composition passes may be required when using them. See “Automatic link targets” for more information.