Changes

Jump to: navigation, search

Citation Style Language

929 bytes added, 22:56, 28 December 2010
m
Reverted edits by 79.142.68.99 (Talk); changed back to last version by 119.82.183.48
The '''Citation Style Language''' (CSL) is an XML-Based stylesheet language for formatting of citations and bibliographies. It is used in reference management software such as [[Zotero]], [[Mendeley]], [[CiteProc]] and [[Pandoc]]. CSL was initiated by Bruce D’Arcus in the XBib project. The latest specification of the language, CSL 1.0 specification , was published in March 2010.
== The idea behind CSL ==
Citation output is generated using CSL in a way similar to XSLT processing. If you know [[BibTeX]] you can compare CSL with the BibTeX style file language BAFLL (BibTeX Anonymous Forth-Like). If you know XSL than you can compare it with XSLT. The basic idea is to seperate separate bibliographic data and a the citation styles style definition, so that can be used to create nicely formatted citationsin various styles can be generated from a single body of data.
CSL-Style
Bibliographic record -> CSL-Processor -> Citation
CSL-Processors are available processors have been written in different a variety of programming languages. The most elaborate complete implementation of CSL-Processor 1.0 at present is the Javascript implementation, [http://bitbucket.org/fbennett/citeproc-js/wiki/Home citeproc-js], which runs in Firefox and other Gecko-based browsers, Google Chrome, Safari, IE6 and above, and in Rhino and spidermonkey/tracemonkey for server-side deployments.
== Getting started ==
If you use a reference management software such as Zotero or Mendeley, you already use CLS CSL under the hood. If you want to dig your hands into code, have a look at citeproc-js, which is currently undergoing integration in these two projects:
hg clone http://bitbucket.org/fbennett/citeproc-js
Documentation is located in the manual directory or online at A [http://gsl-nagoya-u.net/http/pub/citeproc-doc.html and a demo that runs in a Browser formatted version of the processor manual] is available at online, and a [http://gsl-nagoya-u.net/http/pub/citeproc-demo/demo.htmldemo that runs the processor in a browser] is also available. The citeproc-js source archive contains a large suite of test cases, and the test framework offers a lightweight platform for exploring the behavior of the processor.
== Bibliographic record format ==
Of course you cannot throw just any bibliographic record format into a CSL-Processor but processor; you must use the [http://citationstyles.org/downloads/specification.html#appendices field names defined in the CSL 1.0 specification]. Some Fields are of the three types: plain text, date fields are repeatable , and name fields. The latter two have an interal internal structure [http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#data-input as described here]. As a guide to the field assignments for particular types of content, the CSL mappings used in the Zotero reference manager [http://gsl-nagoya-u.net/http/pub/csl-fields/index.html are described here].
=== CSL record format ===
Derived from the CSL 1.0 specification and the citeproc-js documentation , a CSL record can be defined as a follows , in incomplete Backus-Naur-Form and additional descriptionform, with supplementary descriptions:
A record is a JSON object with unique keys of three kinds (VAR, NAME, DATE, and TYPE):
== Embedding CSL records in twitter annotations ==
On the Code4lib mailing list it has been discussed to embed bibliographic data in twitter annotations. If this annotations contain CSL records then you could display a bibliographic reference in the citation style of your choice, delegating the formatting task to the client application.
A twitter annotation is a JSON object with up to 512 bytes (later more):

Navigation menu