Citation Formatting in Theory and Practice
I’ve been arguing for a long time that there are better ways to do bibliographic formatting than BibTeX or Endnote et al., and that relatively new standards like MODS help facilitate this.
Last week I put my ideas to the test with the deadline for my book manuscript. The entire thing is authored in DocBook, and all the citation records are stored in MODS in an XML DB. I also wrote all of the code to create the formatted output, so any problems were my responsibility!
The book itself includes a range of references: journal articles and books, legal cases and bills, archival documents, and media sources. It’s a pretty demanding test of a citation processing system.
So how did it do? Actually, really well! Most the formatting problems I encountered could be traced to poorly-coded MODS records. I did run into some other issues that required last minute fixing, but the design of MODS and of my formatting system actually made this fairly easy.
For example, I had an issue at the end of a 19 hour day on Thursday with newspaper articles. I decided that instead of including the reporters as the sort key, I’d use the periodical title. The question was, how to do this?
The design of my system is such that default fallbacks like “article†tend to do most of the formatting, including for newspaper articles. So, I could define a new formatting definition specific to newspaper articles, but then this introduced some awkwardness in the structure of the styling definition (long story, but the language is hierarchical, and so it is not designed to mix structures across levels; a periodical title is one level, while the article reporter is another).
My solution was to rely on configuring the mods:name “role†handling. So, I have two variables: primary-contributors and secondary-contributors. When the XSLT encounters a record with names, it first says do any names that correspond to a primary-contributor exist?
If yes, it uses them. If not, it uses the alternate sort-key, which is defined like:
<creator alternate-sortkey="container-title">
...
</creator>
I thus defined the “reporter†role as a secondary-contributor. Problem solved; the system now used the alternate-sortkey.
My theory has been that the more flexible and expressive power of MODS could actually make formatting easier, rather than more complex. This is because metadata is largely neatly modularized. So far practical tests suggest the theory is correct.
Of course, it has taken a lot of work to get the code in shape for this!
Creative Commons License