Chapter 8. Bibliograpy elements

Table of Contents

8.1. Handling

Bibliographic information is specified inside the bibliography element. DocBook implements two styles of bibliography entries, and they have quite different processing expectations. On the one hand, you have raw informatioin, that you specify generically inside a biblioentry element, which contain a database-like collection of named fields. On the other hand, bibliomixe entries cooked, i.e., fields occur in the order in which they are to be displayed and additional punctuation may be sprinkled between the fields.

In the following we will mainly emphasize the generic entries. In the text a citation element can be used to refer to a bibliographic entry.

8.1. Handling

Example Example 8.1 is an XML DocBook source document that contains a short text with a few citations to books or Internet documents, that are defined in the bibliography.

Example 8.1. Example of A bibliography and citations

  1 <!DOCTYPE article PUBLIC '-//OASIS//DTD DocBook XML V4.2//EN'
     "/afs/cern.ch/sw/XML/cdrom/www.nwalsh.com/docbook/xml/docbookx.dtd">
    <article>
    <sect1>
  5 <title>DocBook and bibliographic references</title>
    
    <para>
    The DocBook markup system is described in the printed book
    <emphasis>DocBook - The Definitive Guide</emphasis> <citation><xref
 10 linkend="bib.TDG99" endterm="bib.TDG99.abbrev"/></citation>. There is
    an up-to-date local HTML copy at CERN <citation> <xref
    linkend="bib.TDGupd" endterm="bib.TDGupd.abbrev"/></citation>
    </para>
    
 15 <para>
    The XSLT language, that is used to transform the DocBook XML sources
    into HTML, XSLT-FO, etc. is described in the W3C recommendation
    <emphasis>XSL Transformations <citation><xref linkend="bib.xsltrec"
    endterm="bib.xsltrec.abbrev"/></citation></emphasis>. There is a nice
 20 XSLT tutorial <citation><xref linkend="bib.XSLTtut.Nic"
    endterm="bib.XSLTtut.Nic.abbrev"/></citation>, as well as Mike Kay's book
    <emphasis>XSLT Programmer's Reference</emphasis> <citation><xref
    linkend="bib.xsltkay2" endterm="bib.xsltkay2.abbrev"/></citation>.
    The style sheets themselves are also described <citation><xref
 25 linkend="bib.docbook.xslt" endterm="bib.docbook.xslt.abbrev"/></citation>.
    </para>
    
    <para>
    The are two discussion lists, about Docbook <citation><xref
 30 linkend="bib.docbook.list" endterm="bib.docbook.list.abbrev"/></citation> 
    and its applications <citation><xref linkend="bib.docbook.apps.list"
    endterm="bib.docbook.apps.list.abbrev"/></citation>.
    </para>
    </sect1>
 35 
    <bibliography id="sec.bibliography">
    <title>Bibliography</title>
    
    <biblioentry id="bib.xsltrec">
 40   <abbrev id="bib.xsltrec.abbrev">REC-XSLT</abbrev>
      <editor><firstname>James</firstname><surname>Clark</surname></editor>
      <title><ulink url="http://www.w3.org/TR/xslt">XSL Transformations
        (XSLT) Version 1.0</ulink></title>
      <publishername>W3C Recommendation</publishername>
 45   <pubdate>16 November 1999</pubdate>
    </biblioentry>
    <biblioentry id="bib.XSLTtut.Nic">
      <abbrev id="bib.XSLTtut.Nic.abbrev">NICXSLTUT</abbrev>
      <author><firstname>Miloslav</firstname><surname>Nic</surname></author>
 50   <title><ulink url="http://www.zvon.org/xxl/XSLTutorial/Books/Book1/index.html">XSLT Tutorial</ulink></title>
    </biblioentry>
    <biblioentry id="bib.xsltkay2">
      <abbrev id="bib.xsltkay2.abbrev">KAY2001</abbrev>
      <author><firstname>Michael</firstname><surname>Kay</surname></author>
 55   <title>XSLT 2nd Edition</title>
      <subtitle>Programmer's Reference</subtitle>
      <pubdate>2001</pubdate>
      <edition>2</edition>
      <isbn>ISBN: 1861005067</isbn>
 60   <pagenums>940</pagenums>
    </biblioentry>
    <biblioentry id="bib.TDG99">
      <abbrev id="bib.TDG99.abbrev">TDG1999</abbrev>
      <authorgroup>
 65     <author><firstname>Norman</firstname><surname>Walsh</surname></author>
        <author><firstname>Leonard</firstname><surname>Muellner</surname></author>
      </authorgroup>
      <title>DocBook</title>
      <subtitle>The Definitive Guide</subtitle>
 70   <pubdate>1999</pubdate>
      <edition>1</edition>
      <isbn>ISBN: 156592-580-7</isbn>
      <pagenums>648</pagenums>
      <releaseinfo>
 75     <ulink url="http://www.oreilly.com/catalog/docbook/index.html">Oreilly's catalog entry</ulink>.  
        An online version <ulink url="http://www.oasis-open.org/docbook/documentation/reference/html/docbook.html">is available</ulink>
      </releaseinfo>
    </biblioentry>
    <biblioentry id="bib.TDGupd">
 80   <abbrev id="bib.TDGupd.abbrev">TDG2002</abbrev>
      <authorgroup>
        <author><firstname>Norman</firstname><surname>Walsh</surname></author>
        <author><firstname>Leonard</firstname><surname>Muellner</surname></author>
      </authorgroup>
 85   <title>DocBook 4.2</title>
      <subtitle><ulink url="http://xml.cern.ch/www.docbook.org/tdg/en/html/docbook.html">Updated
        online Reference installed at CERN</ulink></subtitle>
    </biblioentry>
    <biblioentry id="bib.docbook.xslt">
 90   <abbrev id="bib.docbook.xslt.abbrev">DBXSLTDOC</abbrev>
      <authorgroup>
        <author><firstname>Norman</firstname><surname>Walsh</surname></author>
        <author><firstname>Bob</firstname><surname>Stayton</surname></author>
      </authorgroup>
 95   <title>DocBook XSL stylesheets</title>
      <releaseinfo>
        <ulink url="http://sourceforge.net/projects/docbook/">The sources n 
        <literal>sourceforge</literal></ulink>. At CERN these
        stylesheets are installed locally, as well as the associated <ulink
100     url="http://xml.cern.ch/sourceforge.net/projects/docbook/docbook-xsl-1.49/doc/index.html"> documentation</ulink>
      </releaseinfo>
    </biblioentry>
    <biblioentry>
    <biblioentry id="bib.docbook.list">
105   <abbrev id="bib.docbook.list.abbrev">DBLIST</abbrev>
      <title>DocBook discussion list <email>[email protected]</email></title>
      <releaseinfo><ulink url="http://lists.oasis-open.org/archives/docbook/">List archive</ulink></releaseinfo>
    </biblioentry>
    <biblioentry id="bib.docbook.apps.list">
110   <abbrev id="bib.docbook.apps.list.abbrev">DBAPPSLIST</abbrev>
      <title>DocBook applications discussion list <email>[email protected]</email></title>
      <releaseinfo><ulink url="http://lists.oasis-open.org/archives/docbook-apps/">List archive</ulink></releaseinfo>
    </biblioentry>
    
115 </bibliography>
    </article>

The result of transforming the xml file of Example 8.1 into PDF (with docbook2pdf, see Figure 8.1) and HTML (with docbook2html, see Figure 8.2).

Figure 8.1. Citations and bibliography (PDF output)

An example of bibliography and citations in
                 PDF

Figure 8.2. Citations and bibliography (Displayed by the Mozilla browser)

An example of bibliography and citations in
                 HTML viewed with Mozilla