I've been using Bruce D'Arcus' CiteProc for formatting the citations and bibliography in a paper for a journal. Basically, while writing in Docbook NG, you insert citations in the form . The linkend attribute is an identifier which CiteProc uses to find that item in your reference library, which can be a local XML file in MODS format or a database accessed using SRU (SRU is similar in many ways to OpenSearch, in that it takes a query as a URL and returns metadata in a specific XML format). CiteProc then inserts the formatted citation and builds a bibliography list at the end of the paper.

I realised that for a lot of citations, it would be easier to just cite them using a standard identifier, eg info:pmid/12345678 - then CiteProc could use those identifiers to pull in the MODS data on demand, instead of you having to manually download the MODS data for each item (from HubMed or unalog for example) and add it to your flatfile or database.

This Perl script, CiteProxy, is a first step in this direction. It doesn't yet allow you to mix on-demand data with MODS data stored locally, but it does act as an SRU gateway that CiteProc can use to fetch MODS data from defined sources using known identifiers. It's intended to run as a service on a web server: at the moment it can handle info:pmid, urn:isbn, urn:issn and unalog identifiers (we'll have to wait for Elsevier's web services to provide a DOI→MODS service, which would be very useful).