blob: 1704ef4441e0c68b15d7ecde3f945833ae419d27 [file] [log] [blame]
<?xml version="1.0" encoding=""?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="" />
<meta name="description"
content="A Javadoc-like Documentation Tool for for all versions of XSLT (1.0, 1.1, 2.0). Available for free on a GPL licence. "
/>
<meta name="author" content="P&amp;P Software GmbH" />
<meta name="keywords"
content="XSLT, XSLT documentation, XSLT 2.0, Open Source, Documenting XSLT, xsltdoc, xsldoc, Javadoc, Doxygen, xdoc, gpl"
/>
<title>CiteProc - Main Page</title>
<link href="XSLTdoc.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="navbar">
<div id="menuLinks">
<a class="menuLinkCurrent" href="index.html">Main Page</a><a class="menuLink"
href="stylesheetList.html">Stylesheet List</a><a class="menuLink"
href="functionTemplateList.html">Function/Template List</a></div>
</div>
<div id="content">
<div id="mainPage">
<h1>CiteProc</h1>
<div class="section">
<h2>Overview</h2>
<p>CiteProc is a comprehensive solution for bibliographic and citation
formatting. It consists of an easy-to-use XML citation style language (CSL),
and the XSLT code to format documents based on them. In essence, it is
designed to serve as an XML-based analog to BibTeX, but with dramatic
improvements in ease-of-use, metadata flexibility, and international
support.</p>
<p>CiteProc reads the source document for citation references and collects
the corresponding records from an external bibliographic data store, and then
formats the bibliography and citations according to specifications in the CSL
file.</p>
<div class="image" align="center">
<img src="images/citeproc-overview.png" width="320px" />
<p>CiteProc Overview</p>
</div>
<p>The data store can either be a flat XML file, or a server that supports
HTTP-based XQuery or <a
href="http://www.loc.gov/z3950/agency/zing/srw/sru.html">SRU</a> queries. SRU
is a particularly promising new RESTful protocol that comes out of the
library world, and which can provide a nice &mdash; <a
href="http://sru.miketaylor.org.uk/">easily implemented</a>&mdash;standard around
which a diversity of bibliographic solutions can interoperate.</p>
<p>CiteProc is but one example of the possibilities opened up with SRU, where
a user in North America can format their documents using bibliographic data
stored on the other side of the world. Indeed, CiteProc is bundled with just
such an example! The <a href="http://www.refbase.net">RefBase</a> project out
of Germany recently added SRU support. The sample XML and XSLT files included
here (samples/docbook-test-sru-refbase.xml and
xslt/document/refbase-xhtml.xsl respectively) demonstrate how easy it is to
add this support.</p>
</div>
<div class="section">
<h2>Design</h2>
<p>The core of the logic is embedded in the design of CSL, which has the
following features:</p>
<ul>
<li>a tree-based design that mimics bibliographic metadata</li>
<li>organized around references classes, rather than types</li>
<li>modularizes formatting concerns</li>
</ul>
<p>At the core, CSL and CiteProc are both organized around structural classes
(monograph, serial, etc.) rather than reference types or genres. CSL thus
does not have the &mdash;generic&mdash; reference type definitions one finds in other
style languages. Rather, CSL instead mandates definitions for three of the
most common &mdash;types&mdash; : article, book, and chapter. These then serve as the
class-specific fallback definitions. Indeed, most formatting ends up being
handled by these generic definitions.</p>
<p>This design decision addresses problems with type-based formatting systems
like BibTeX or those in commmerical applications like Endnote, which tend to
be fairly fragile and not very portable. In these systems, if a social
scientist who frequently cites archival documents uses a style file created
by a physical scientist, they will typically find they need to heavily edit
the file in order to format their references. By moving to a class-based
logic and modularizing formatting configuration as much as possible, styles
become more portable. Likewise, retaining the familiar type-like interface is
easier for users creating style files.</p>
</div>
<div class="section">
<h2>Organization</h2>
<p>The CiteProc code consists of one main stylesheet&mdash;called
citeproc.xsl&mdash;which is imported into a standard document stylesheet.</p>
<div class="image" align="center">
<img src="images/citeproc-files.png" width="420px" />
<p>CiteProc file structure</p>
</div>
</div>
<div class="section">
<h2>Requirements</h2>
<p>CiteProc is written in XSLT 2.0, and as such requires a compliant
processor. At this point, this means <a href="http://www.saxonica.com">Saxon
8</a>. In addition, it requires a data store for <a
href="http://www.loc.gov/standards/mods">MODS</a> bibliographic data.
CiteProc supports flatfile and server-based options, including both SRU and
XQuery. The <a href="http://exist-db.org">eXist XML DB</a> is a good option.
<a
href="http://www.scripps.edu/~cdputnam/software/bibutils/bibutils.html">Bibutils</a>
is an excellent tool to convert from legacy formats like Endnote, RIS and
BibTeX to MODS, and back.</p>
</div>
<div class="section">
<h2>Useage</h2>
</div>
<p>The default data source for the Bibliographic database is a eXist DB. You
need to install eXist and using the eXist client GUI utility load the
/data/mods.xml file into a eXist data collection (directory) called 'mods'
(create it if it not there), then run a transform command like the one given
below.</p>
<p>There are a few example document stylesheets in the xsl/document
directory. Choose one, and run it using a citation-style parameter like so
from the samples directory:</p>
<div class="section">
<p>There are a few example document stylesheets in the xsl/document
directory. For a basic local transformation using a flat file, use:</p>
<p><pre><code>java net.sf.saxon.Transform -o test.html samples/docbook-test.xml \
xsl/document/dbng-xhtml.xsl citation-style="author-year" bibdb="flatfile"</code></pre>
</p>
<p>To use the remote SRU web service options, try the RefBase example like
so:</p>
<p><pre><code>java net.sf.saxon.Transform -o test.html samples/docbook-test-sru-refbase.xml \
xsl/document/refbase-xhtml.xsl</code></pre>
</p>
<p>The latter stylesheet is just a wrapper that imports the dbng-xhtml.xsl
file and sets a few parameters.</p>
</div>
<p>This is version 1.71 of CiteProc. Check for the latest version and <a
href="http://sourceforge.net/project/showfiles.php?group_id=117435">updates</a>.
</p>
<p>There are now Python and Ruby version of CiteProc. These are available
from a <a href="http://subversion.tigris.org/">Subversion</a> server, see the
<a
href="http://wiki.services.openoffice.org/wiki/Bibliographic_Project's_Developer_Page#Formating_Engine">instructions</a>.</p>
<p></p>
<div class="license">
<p>CiteProc is free software, licensed under the <a
href="http://creativecommons.org/licenses/GPL/2.0/">CC-GNU GPL</a>.</p>
<div class="image">
<a href="http://creativecommons.org/licenses/GPL/2.0/"><img alt="CC-GNU GPL"
border="0" src="images/cc-GPL-a.png" /></a></div>
</div>
</div>
</div>
<div id="footer">
<div style="float:left">
Powered By <a target="_blank" href="http://xsltdoc.sf.net">XSLTdoc
1.1</a></div>
<div style="float:right">
<a href="http://jigsaw.w3.org/css-validator/">CSS</a> | <a
href="http://validator.w3.org/check?uri=referer">XHTML</a> |</div>
</div>
</body>
</html>