Index file format

The following fragment shows the structure of a typical index file produced by TopLeaf before the sort/merge:

    <tl:title id="tl:Mapman.27" ><emph>Box</emph> tab</tl:title>
    <tl:folio id="tl:Mapman.27" >62</tl:folio>
      <tl:title id="tl:Mapman.28" >Effects</tl:title>
      <tl:folio id="tl:Mapman.28" >62</tl:folio>
        <tl:title id="tl:Mapman.29" >color fills</tl:title>
        <tl:folio id="tl:Mapman.29" >62</tl:folio>

Each index level has a tl:ndxline element containing a title and a folio label that identifies the page on which the entry is defined. The title will contain any child elements that were present in the original data.

Custom markers in the title are identified by the __MMCT: prefix. When these are processed they will trigger custom mappings that use the normal % prefix.

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

The id attribute can be used to create a link to the point in the data that generated the index 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.