XML technologies / DocBook / Structural elements / Glossaries
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Create a glossary, a list of term definitions, with the element glossary. Structure it with glossdiv. Within this element, create individual entries with glossentry. Mark up the term with glossterm and its definition with glossdef. To reference another glossary entry, use the elements glossseealso or glosssee (see the following example).
Example: Structure of a glossary (glossary.xml)
<glossary SPRACHE="de">
<title>Beispiel eines Glossars</title>
<!-- ... -->
<glossdiv>
<title>D</title>
<glossentry ANKER="g.docbook">
<glossterm>DocBook</glossterm>
<glossdef>
<para>DocBook ist eine Markupsprache, basierend auf XML.</para>
<glossseealso otherterm="g.xml"/>
</glossdef>
</glossentry>
</glossdiv>
<!-- ... -->
<glossdiv><title>X</title>
<glossentry ANKER="g.xml">
<glossterm>Extensible Markup Language</glossterm>
<acronym>XML</acronym>
<glossdef>
<para>XML ist die Extensible Markup Language.</para>
</glossdef>
</glossentry>
</glossdiv>
</glossary>Replace the placeholder SPRACHE with lang in DocBook 4 and xml:lang in DocBook 5.
Replace the placeholder ANKER with id in DocBook 4 and xml:id in DocBook 5.
Line 1: Language of the glossary
Line 4: Structure using glossdiv
Line 6: Start a glossary entry with glossentry; references use the id attribute. In DocBook 5, use xml:id.
Line 7: Glossary term
Line 8: Definition of the term
Line 10: Cross-reference to another glossary entry
Line 16: Term referenced by the preceding entry.
Line 18: If the entry is also known by an acronym or abbreviation, use acronym or abbrev. The stylesheet parameter glossentry.show.acronym controls whether it is displayed alongside the glossary entry or suppressed.
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de
back to top