Documenting a CSL Processor
For anyone interested in understanding how citation and bibliographic formatting code might work conceptually, the documentation for Andrea Rossatto’s Haskell implementation of CSL is a great place to start.
I find Haskell a bit tough going at the level of details, but the type definitions are really clear. For example, the Text.CSL.Proc documentation includes a citeproc type, whose signature is:
citeproc :: Style -> [Reference] -> [[(String, String)]] -> BiblioData
The documentation then usefully tells us this means:
With a Style, a list of References and the list of citation groups (the list of citations with their locator), produce the FormattedOutput for each citation group and the bibliography.
Creative Commons License