CiteProc
Overview
CiteProc is a 包括的な 解答 for bibliographic and citation formatting. It consists of an 平易な-to-use XML citation style language (CSL), and the XSLT code to 判型 文書s based on them. In essence, it is designed to serve as an XML-based analog to BibTeX, but with 劇の 改良s in 緩和する-of-use, metadata 柔軟性, and international support.
CiteProc reads the source 文書 for citation 言及/関連s and collects the corresponding 記録,記録的な/記録するs from an 外部の bibliographic data 蓄える/店, and then 判型s the bibliography and citations によれば specifications in the CSL とじ込み/提出する.
CiteProc Overview
The data 蓄える/店 can either be a flat XML とじ込み/提出する, or a server that supports HTTP-based XQuery or SRU queries. SRU is a 特に 約束ing new RESTful 議定書 that comes out of the library world, and which can 供給する a nice — easily 器具/実施するd—基準 around which a 多様制 of bibliographic 解答s can interoperate.
CiteProc is but one example of the 可能性s opened up with SRU, where a 使用者 in North America can 判型 their 文書s using bibliographic data 蓄える/店d on the other 味方する of the world. Indeed, CiteProc is bundled with just such an example! The RefBase 事業/計画(する) out of Germany recently 追加するd SRU support. The 見本 XML and XSLT とじ込み/提出するs 含むd here (見本s/docbook-実験(する)-sru-refbase.xml and xslt/文書/refbase-xhtml.xsl それぞれ) 論証する how 平易な it is to 追加する this support.
Design
The 核心 of the logic is embedded in the design of CSL, which has the に引き続いて features:
- a tree-based design that mimics bibliographic metadata
- 組織するd around 言及/関連s classes, rather than types
- modularizes formatting 関心s
At the 核心, CSL and CiteProc are both 組織するd around 構造上の classes (monograph, serial, etc.) rather than 言及/関連 types or genres. CSL thus does not have the —generic— 言及/関連 type 鮮明度/定義s one finds in other style languages. Rather, CSL instead 委任統治(領)s 鮮明度/定義s for three of the most ありふれた —types— : article, 調書をとる/予約する, and 一時期/支部. These then serve as the class-明確な/細部 fallback 鮮明度/定義s. Indeed, most formatting ends up 存在 扱うd by these generic 鮮明度/定義s.
This design 決定/判定勝ち(する) 演説(する)/住所s problems with type-based formatting systems like BibTeX or those in commmerical 使用/適用s like Endnote, which tend to be 公正に/かなり 壊れやすい and not very portable. In these systems, if a social scientist who frequently 特記する/引用するs archival 文書s uses a style とじ込み/提出する created by a physical scientist, they will typically find they need to ひどく edit the とじ込み/提出する ーするために 判型 their 言及/関連s. By moving to a class-based logic and modularizing formatting configuration as much as possible, styles become more portable. Likewise, 保持するing the familiar type-like interface is easier for 使用者s creating style とじ込み/提出するs.
Organization
The CiteProc code consists of one main stylesheet—called citeproc.xsl—which is 輸入するd into a 基準 文書 stylesheet.
CiteProc とじ込み/提出する structure
必要物/必要条件s
CiteProc is written in XSLT 2.0, and as such 要求するs a compliant 加工業者. At this point, this means Saxon 8. In 新規加入, it 要求するs a data 蓄える/店 for MODS bibliographic data. CiteProc supports flatfile and server-based 選択s, 含むing both SRU and XQuery. The eXist XML DB is a good 選択. Bibutils is an excellent 道具 to 変える from 遺産/遺物 判型s like Endnote, RIS and BibTeX to MODS, and 支援する.
Useage
The default data source for the Bibliographic database is a eXist DB. You need to 任命する/導入する eXist and using the eXist (弁護士の)依頼人 GUI 公共事業(料金)/有用性 負担 the /data/mods.xml とじ込み/提出する into a eXist data collection (directory) called 'mods' (create it if it not there), then run a transform 命令(する) like the one given below.
There are a few example 文書 stylesheets in the xsl/文書 directory. Choose one, and run it using a citation-style parameter like so from the 見本s directory:
There are a few example 文書 stylesheets in the xsl/文書 directory. For a basic 地元の 変形 using a flat とじ込み/提出する, use:
java 逮捕する.sf.saxon.Transform -o 実験(する).html 見本s/docbook-実験(する).xml \
xsl/文書/dbng-xhtml.xsl citation-style="author-year" bibdb="flatfile"
To use the remote SRU web service 選択s, try the RefBase example like so:
java 逮捕する.sf.saxon.Transform -o 実験(する).html 見本s/docbook-実験(する)-sru-refbase.xml \
xsl/文書/refbase-xhtml.xsl
The latter stylesheet is just a wrapper that 輸入するs the dbng-xhtml.xsl とじ込み/提出する and 始める,決めるs a few parameters.
This is 見解/翻訳/版 1.71 of CiteProc. Check for the 最新の 見解/翻訳/版 and updates.
There are now Python and Ruby 見解/翻訳/版 of CiteProc. These are 利用できる from a Subversion server, see the 指示/教授/教育s.
CiteProc is 解放する/自由な ソフトウェア, licensed under the CC-GNU GPL.


