Using RefDB-lite involves little more than adding an import instruction to your existing XSLT customisation file.
<xsl:import href="./docbook-xsl-1.69.0/html/chunk.xsl"/> <xsl:import href="./refdb-lite/xsl/docbook/html/biblio.xsl"/>
The import order above is quite crucial, because RefDB-lite overrides
some of the processing templates of the standard DocBook XSL stylesheets.
You would replace instances of html in the above with xhtml
or
fo
for alternative output styles (if and when implemented).
It is also necessary to select a bibliography style file (CITESTYLE) such as
Eur.J.Pharmacol.xml
.
This could be selected from command line arguments
using xsltproc
(Veillard, 2005)
for example:
--stringparam refdb.citation.style.file.name "Eur.J.Pharmacol.xml"
or alternatively by configuring it within your customisation file.
<xsl:param name="refdb.citation.style.file.name" select="'Eur.J.Pharmacol.xml'"/>
Of course, both of these selection mechanisms assume that your desired style
exists within the RefDB-lite styles directory. If that isn't the case,
you need to override the xsl:variable
<xsl:variable name="refdb.citation.style" select="document( concat('../../../styles/',$refdb.citation.style.file.name),document(''))/CITESTYLE" />
The document()
function used above locates the style file with respect to the
refdb-lite/xsl/docbook/common/collation.xsl
file.
Replace document('')
in the above
with "/"
in your customisation,
to locate your style file with respect to your source document.
For use with DocBook you can specify an auxilliary reference database file.
This is simply a single DocBook XML file containing a bibliography
rootnode and filled with biblioentry
s with id attributes that
may or may not match those of your biblioref
citation targets. To specify this file you should iether add
<xsl:param name="bibliography.collection" select="'docbook.bib.data.xml'"/>
to your customisation file, or set it on the command line as an argument e.g. for xsltproc:
--stringparam bibliography.collection "./docbook.bib.data.xml"
Obviously this assumes that docbook.bib.data.xml
is
the relative (w.r.t. your source doc) pathname to your
raw bibliography
database.
For citation references that do not resolve iether internally, or to the external
database file (bibliography.collection
),
its possible to initiate an HTTP GET connection to a remotely running
RefDB installation. XSLT_1.0 blesses the document()
with
URL read ability, potentially through a Common Gateway Interface
(CGI) program that returns the missing items from your bibliography.
Because this interface only ever needs to read references from RefDB
and its underlying databases, it is best achieved by creating a "public"
user-account configured with read-only access permissions
(http://refdb.sourceforge.net/manual/sect1-add-user.html),
that would be used by everyone intending to work with RefDB-lite.
This would provide the greatest level of reference database security.
Notwithstanding the potential severe security breach, the potential user intending to imbue RefDB-lite with CGI access will need to set some or all of the following parameters in their XSLT customisation file:
<xsl:param name="refdb.server.address" select="'http://localhost/refdb/refdb-lite/refdb-lite-server.cgi'" /> <xsl:param name="refdb.server.username" select="'anon'" /> <xsl:param name="refdb.server.password" select="'password'" /> <xsl:param name="refdb.server.default.database" select="'refs'" /> <xsl:param name="refdb.server.data.format" select="'risx'" /> <xsl:param name="refdb.server.timeout" select="1"/> <!-- autodestroy session id in N minutes?? -->
In the interests of local security, you could add some or all of those
parameters to an auxilliary customisation file with read/write
permissions restricted only to yourself
(chmod 600 auxfile.xsl
), and then include that
within your primary customisation file:
<xsl:include href="auxfile.xsl"/>
While that will protect your RefDB access account details locally, your database password is still passed in cleartext form to the HTTP access URL and that is easily intercepted mid flight, as well as being logged by the gateway server access and error logs (Have to look into this a bit more, but presumably we could negotiate a variable password encoding key of some description and implement that in XSLT?). Do tread very, very carefully!