3.6. Glossary generation

One handy feature of the DocBook Open XSLs is that you can have a master glossary from which a custom glossary is built when you generate a document.

Note

The inclusion of terms in the glossary is not recursive. If the definitions of terms contain glossterms, these are not pulled into the glossary.

Pointing the XSLs to your master glossary

<xsl:param name="glossary.collection" 
select="'/local/path/to/glossary.xml'"/>

A very small master glossary

<!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<glossary>
  <glossentry>
    <glossterm>0</glossterm>
     <glossdef>
      <para>Numeric zero, as opposed to the letter 'O'.</para>
    </glossdef>
  </glossentry>
</glossary>

Using glossary term in your document

<para>There's no Roman numeral for <glossterm 
   baseform="0">zero</glossterm>.</para>