The start-tag is required for this element. The end-tag is optional, if your SGML declaration allows minimization.
IndexTerms identify text that is to be placed in the index. In the simplest case, the placement of the IndexTerm in the document identifies the location of the term in the text. In other words, the IndexTerm is placed in the flow of the document at the point where the IndexEntry in the Index should point. In other cases, attributes on IndexTerm are used to identify the location of the term in the text.
IndexTerms mark either a single point in the document or a range. A single point is marked with an IndexTerm placed in the text at the point of reference. There are two ways to identify a range of text:
Place an IndexTerm at the beginning of the range with Class set to StartOfRange and give this term an ID. Place another IndexTerm at the end of the range with StartRef pointing to the ID of the starting IndexTerm. This second IndexTerm must be empty.
The advantage of this method is that the range can span unbalanced element boundries.
Place the IndexTerm anywhere you like and point to the element that contains the range of text you wish to index with the Zone attribute on the IndexTerm. Note that Zone is defined as IDREFS so a single IndexTerm can point to multiple ranges.
The advantage of this method is that IndexTerms can be collected together or even stored totally outside the flow of the document (in the meta for example).
IndexTerms are suppressed in the primary text flow, although they contribute to the population of an index and serve as anchors for cross references. Under no circumstances is the actual content of IndexTerm rendered in the primary flow.
It is possible to construct index terms that are difficult to parse at best and totally illogical at worst. Consider the following:
<indexterm class=startofrange zone="id1 id2">...</indexterm>
There is no way that this can fit into the semantics of an IndexTerm. Although it claims to be the start of a range, it does not have an ID for the end-of-range IndexTerm to point back to. In addition, it includes zoned terms, and mixing the two different methods for indicating a range in the same IndexTerm is probably a bad idea.
These elements contain IndexTerm: Abbrev, Accel, Ackno, Acronym, Action, Answer, Appendix, Application, ArtHeader, Article, ArtPageNums, Attribution, AuthorInitials, BiblioDiv, BiblioEntry, Bibliography, BiblioMisc, BiblioMixed, BiblioMSet, BiblioSet, BlockQuote, BookBiblio, BookInfo, BridgeHead, Callout, Caution, Chapter, Citation, CiteTitle, City, ClassName, CollabName, Command, Comment, ComputerOutput, ConfDates, ConfNum, ConfSponsor, ConfTitle, Constant, ContractNum, ContractSponsor, Contrib, CorpAuthor, CorpName, Country, Database, Date, Dedication, DocInfo, Edition, Email, Emphasis, entry, EnVar, ErrorCode, ErrorName, ErrorType, Example, Fax, Figure, Filename, FirstName, FirstTerm, ForeignPhrase, FormalPara, FuncParams, FuncSynopsisInfo, Function, Glossary, GlossDef, GlossDiv, GlossEntry, GlossSee, GlossSeeAlso, GlossTerm, GUIButton, GUIIcon, GUILabel, GUIMenu, GUIMenuItem, GUISubmenu, Hardware, Highlights, Holder, Honorific, Important, Index, InformalExample, InformalFigure, Interface, InterfaceDefinition, InvPartNumber, ISBN, ISSN, IssueNum, ITermSet, JobTitle, KeyCap, KeyCode, KeySym, Label, LegalNotice, Lineage, LineAnnotation, Link, ListItem, Literal, LiteralLayout, LoTentry, ManVolNum, Markup, MediaLabel, Member, ModeSpec, MouseButton, MsgAud, MsgExplan, MsgLevel, MsgOrig, MsgText, Note, ObjectInfo, OLink, Option, Optional, OrgDiv, OrgName, OtherAddr, OtherName, PageNums, Para, Parameter, PartIntro, Phone, Phrase, POB, Postcode, Preface, Procedure, ProductName, ProductNumber, ProgramListing, Prompt, Property, PubDate, PublisherName, PubsNumber, QandADiv, QandASet, Question, Quote, RefEntryTitle, RefMiscInfo, RefPurpose, RefSect1, RefSect1Info, RefSect2, RefSect2Info, RefSect3, RefSect3Info, RefSynopsisDiv, RefSynopsisDivInfo, ReleaseInfo, ReturnValue, RevNumber, RevRemark, Screen, ScreenInfo, Sect1, Sect1Info, Sect2, Sect2Info, Sect3, Sect3Info, Sect4, Sect4Info, Sect5, Sect5Info, Section, SectionInfo, Seg, SegTitle, SeriesInfo, SeriesVolNums, SetIndex, SetInfo, SGMLTag, ShortAffil, Sidebar, SimPara, SimpleSect, State, Step, Street, StructField, StructName, Subtitle, Surname, Symbol, Synopsis, SystemItem, Table, Term, Tip, Title, TitleAbbrev, ToCback, ToCentry, ToCfront, Token, Type, ULink, UserInput, VarName, VolumeNum, Warning, WordAsWord, Year.
Class identifies the type of IndexTerm. If StartRef is supplied, the default for Class is EndOfRange, otherwise it is Singular.
PageNum indicates the page on which this index term occurs in some version of the printed document.
Scope identifies in which indexes the IndexTerm should appear. Global means the index for the whole collection of documents, Local means the index for this document only, and All means both indexes.
Significance specifies whether or not this IndexTerm is considered the most important location for information about the terms being indexed. Generally, Preferred IndexTerms get special typographic treatment in the Index.
The use of StartRef implies a spanning index entry. StartRef is used on the term that defines the end of the span and points to the term which defines the beginning.
The use of Zone implies a spanning index entry. Zone holds the IDs of the elements to which it applies. The IndexTerm applies to the contents of the entire element(s) to which it points. If Zone is used, the phyiscal placement of the IndexTerm in the flow of the document is irrelavant.
<!DOCTYPE para PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <para> The Tiger<indexterm> <primary>Big Cats</primary> <secondary>Tigers</secondary></indexterm> is a very large cat indeed. </para>
The Tiger is a very large cat indeed.
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <chapter><title>Example Chapter</title> <!-- index term for "Example Chapter" is a span --> <indexterm id="idxexchap" class=startofrange> <primary>Example Chapter</primary></indexterm> <!-- index term for "Example Chapter" also cross references the "Examples" entry in the index --> <indexterm><primary>Example Chapter</primary> <seealso>Examples</seealso></indexterm> <!-- index term for "Chapter, Example" refers the reader to the entry under which the index term is actually listed, "Example Chapter" --> <indexterm><primary>Chapter</primary><secondary>Example</secondary> <see>Example Chapter</see></indexterm> <!-- other content --> <!-- index term, end of "Example Chapter" span --> <indexterm startref="idxexchap" class=endofrange> <para>some content</para> </chapter>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook V3.1//EN"> <chapter><title>Example Chapter</title> <indexterm zone="a1"><primary>Network Configuration</primary></indexterm> <!-- other content here --> <sect1 id=a1><title>Configuring Your Network</title> <para>…</para> </sect1> </chapter>
For additional examples, see also Chapter.
Copyright © 1999 O'Reilly & Associates, Inc. All rights reserved.