7. Encoding Indexes

The generation of indexes depends on the markups inserted in the text.

Such markups will be processed afterwards by an external tool and will generate the index. An example of such a tool is the collateindex.pl script (see Section 11.1). Details about the process used to generate these indexes are shown in Section 11.3.

The indexes have nesting levels. The markup of an index is done by the code Example 2.

Example 2. Code for the generation of an index

       <primary>Main level</primary>
       <secondary>Second level</secondary>
       <tertiary>Third level</tertiary>

It's possible to refer to chapters, sections and other parts of the document using the attribute zone.

Example 3. Use of the attributte zone

    <section id="encoding-index">
        <title>Encoding Indexes</title>
        <indexterm zone="encoding-index">
        <para>The generation of indexes depend on the inserted markups on the text. </para>

The Example 3 has the code used to generate the entry of this edition on the index. In fact, since the attribute zone is used, the index statement could be located anywhere in the document or even in a separate file.

However, to facilitate maintenance the entries for the index were all placed after the text to which it refers.

Example 4. Usage of values startofrangeand endofrange on the attributeclass

        <PARA>Typing the text normally sometimes there's the need of 
       <INDEXTERM CLASS="startofrange" ID="example-band-index">
       mark large amounts of text.</para>
       <para>Keep inserting the paragraphs normally.</para>
       <para>Until the end of the section intended
       to be indexed.
       <INDEXTERM STARTREF="example-band-index" CLASS="endofrange">.