About Arbortext Styler > Generating Indexes > Creating a Index with Nesting Element Model Index Terms
Creating a Index with Nesting Element Model Index Terms
Some document types that provide a single index term element usually require you to nest that element to indicate whether it is a primary, secondary, or tertiary index term. For example, documents based on the Darwin Information Typing Architecture (DITA) model contain only the indexterm element. To indicate that an index term is a secondary index term in DITA, you would nest a second indexterm element inside a primary indexterm element. Similarly, you would nest a tertiary indexterm inside the secondary indexterm element.
Arbortext Styler allows you to configure multiple elements as index term elements and set those index term elements to specify the elements that perform the other roles in an index term. This allows you to include multiple index models in your output.
The following example demonstrates how to create and modify an index using the Nesting Element Model. The index will contain three levels of nested index term, representing primary, secondary, and tertiary terms.
Example: Creating a Nesting Model Index (DITA)
1. In Arbortext Editor, open an existing DITA document, or create a new one based on one of the DITA document types shipped with Arbortext Editor.
Insert some index terms based on three levels of nested indexterm element.
2. Choose Styler > Edit Stylesheet to edit the associated stylesheet. If you are working with a sample document type the stylesheet may be of read only status and you will need to save a local copy if you wish to make amendments.
3. In Arbortext Styler, select the indexterm element and give it the Index Term (Nesting Element Model) style from the Style list, accessed via the Edit > Style menu option. If the element already has that style assigned, choose to edit the style via the Edit > Edit Style Details menu option. The Index Term (Nesting Element Model) dialog box opens.
If you want to include index terms only under certain conditions, some extra configuration is required. Refer to Conditional Inclusion of an Index Term in an Index for information.
4. On the Indexes tab, note that the index definition object Main Index is already selected. The index term you’re styling will belong to all indexes set to be formatted with this index definition object.
Create and select an alternative index definition object if required. Refer to Indexes List for further information.
5. Back in Arbortext Styler, select in the Elements list the element that will output the index in your document. Give the element the Index style from the Style list, accessed via the Edit > Style menu option. The Index Details dialog box opens.
6. In the Index Details dialog box, select the index definition object that will format the index from the Index drop down list. Set the language in which the index will be sorted from the Language field.
7. In Arbortext Editor, insert the element that should output the index at the required location in your document.
8. Back in Arbortext Styler, select Preview > Print. In the Print Preview window, note that the entries in your index have been output in three levels as expected.