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:
Create a glossary database
Create a separate file with the root elementglossary. Each glossary entry is aglossentry.
Fileglossary.xml:
<glossary>
<!-- ... -->
<glossentry>
<glossterm baseform="XML">Extensible Markup Language</glossterm>
<acronym>XML</acronym>
<glossdef>...</glossdef>
</glossentry>
</glossary>Customizing your document
In your document, use the elementsfirsttermorglossterm. 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
baseformfor longer glossary entries.
Creating a customization file
Create a customization file as shown in Creating a customization file.Adding the parameter
glossary.collection
Add these lines to your customization file. The parameterglossary.collectioncontains 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"/>Transforming your document
Transform your document using the customization file.
Glossary databases have some limitations:
Cross-references between glossary entries using
glosssee,glossseealsoorglosstermare not currently supported. For more information, see the parameterglossary.collection.Back-references from a glossary entry into your document are impossible. The document and glossary database are separate files processed in their own contexts. Without a shared context, these references have no resolvable target.
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