Using custom stylesheets to process documents with bibliographies
Prev | Chapter 10. Bibliographies | Next

## Using custom stylesheets to process documents with bibliographies

The RefDB stylesheets handle the oddities of formatting your bibliographies. The stock DocBook or TEI stylesheets handle the remainder of your documents. What if the formatting of the latter is not to your liking? To this end, the recommended way is to use stylesheet driver files which override those parameters, or entire sections, of the stylesheets which you need modified. Now, processing documents containing RefDB bibliographies with regular DocBook or TEI driver files won't do you any good as you'll lose the journal-specific citation and bibliography support. However, you can easily design driver files which accomplish the task at hand.

refdbnd-created Makefiles contain hooks to use custom driver files; if you prefer to run the transformations manually, these Makefiles will also tell you how. The relevant Makefile section looks like this:

    # options to use customized RefDB driver files, if any
    fodriveropt = -a custom-fo.xsl
    htmldriveropt = -b custom-html.xsl
    xhtmldriveropt = -c custom-xhtml.xsl

As shown here, you can pass options to runbib which specify custom driver files. You can keep those in the same directory as the document itself, or specify a relative or full path. Your custom driver files must include the appropriate RefDB stylesheets, not the stock DocBook or TEI stylesheets, like this (shown for the fo driver file):

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      version="1.0">

      <xsl:import href="/usr/local/share/refdb/xsl/docbk-refdb-xsl/docbk-fo/docbk-refdb-fo.xsl"/>

      <!-- your customizations here -->

    </xsl:stylesheet>

Prev | Up | Next
Create RTF bibliographies | Home | Chapter 11. RefDB SRU interface