This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: proper use of indexterm?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/ "A.R. (Tom) Peters" <tpeters@xs4all.nl> was heard to say:
| According to the DocBook guide, one can insert <indexterm> tags in all
| kind of places. However, nsgmls always gives me an error message
| ("document type does not allow element "indexterm" here");
| the only place I found where <indexterm> was acceptable, is in an <index>
| - which is the last place where I want to use it.
And one place where it shouldn't be allowed. Sigh. XML doesn't have inclusions
or exclusions so it's a little tricky to handle these "global" elements.
In the particular case you present:
| <glossentry id="whatever">
| <indexterm zone="A"><primary>whatever</primary></indexterm>
| <glossterm>whatever</glossterm>
| <glossdef>
| <para>however</para>
| </glossdef>
| </glossentry>
A quick peek at http://docbook.org/tdg/en/html/glossentry.html reveals
glossentry ::=
(glossterm,acronym?,abbrev?,
(indexterm)*,
revhistory?,
(glosssee|glossdef+))
which means that indexterm has to come after the glossterms:
<glossentry id="whatever">
<glossterm>whatever</glossterm>
<indexterm zone="A"><primary>whatever</primary></indexterm>
<glossdef>
<para>however</para>
</glossdef>
</glossentry>
Though I think I'd be inclined to put it in the glossdef myself:
<glossentry id="whatever">
<glossterm>whatever</glossterm>
<glossdef>
<para><indexterm zone="A"><primary>whatever</primary></indexterm>
however</para>
</glossdef>
</glossentry>
Be seeing you,
norm
- --
Norman Walsh <ndw@nwalsh.com> | In a universe of electrons and
http://www.oasis-open.org/docbook/ | selfish genes, blind physical
Chair, DocBook Technical Committee | forces and genetic replication,
| some people are going to get hurt,
| other people are going to get
| lucky, and you won't find any
| rhyme or reason in it, nor any
| justice.--Richard Dawkins
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>
iD8DBQE+LTK5OyltUcwYWjsRAgLzAJ9oaAaiTdLd1vn7a7K9tlMbH28+7gCgj7G6
0E8vTLYQVpTZBH9ZEJRPTGk=
=Q2hE
-----END PGP SIGNATURE-----