XML technologies / DocBook / The DocBook XSL stylesheets / Using a shared bibliography and glossary database / Glossary database

(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)

To share a glossary database across documents, proceed as follows:

  1. Create a glossary database
    Create a separate file with the root element glossary. Each glossary entry is a glossentry.

    File glossary.xml:

<glossary> 
    <!-- ... --> 
    <glossentry> 
        <glossterm baseform="XML">Extensible Markup Language</glossterm> 
        <acronym>XML</acronym> 
        <glossdef>...</glossdef> 
    </glossentry> 
</glossary>

  1. Customizing your document
    In your document, use the elements firstterm or glossterm. Use the first to mark the initial occurrence of a glossary term specially.

<para>Dies ist das erste Auftreten von <firstterm baseform="XML">eXtensible Markup Language</firstterm>. Weitere <glossterm baseform="XML">XML</glossterm>-Einträge ... </para>

Be sure to use the attribute baseform for longer glossary entries.

  1. Creating a customization file
    Create a customization file as shown in Creating a customization file.

  2. Adding the parameter glossary.collection
    Add these lines to your customization file. The parameter glossary.collection contains the path to your glossary database:

<xsl:param name="glossary.collection">glossary.xml</xsl:param> 
<xsl:param name="firstterm.only.link" select="1"/> 
<xsl:param name="glossterm.auto.link" select="1"/>

  1. Transforming your document
    Transform your document using the customization file.

Glossary databases have some limitations:

  

back to top