Citationberg
A library for parsing CSL styles.
[]
= "0.4"
Citationberg deserializes CSL styles from XML into Rust structs. It supports CSL 1.0.2.
This crate is not a CSL processor, so you are free to choose whatever data model and data types you need for your bibliographic needs. If you need to render citations, you can use Hayagriva which uses this crate under the hood.
Parse your style like this:
use fs;
use Style;
let string = read_to_string?;
let style = from_xml?;
let Independent = style else ;
assert_eq!;
Be sure to check out the CSL
styles and
locales repositories into
sibling folders of citationberg
if you want to run the tests.
Safety
This crate forbids unsafe code.
License
This crate is dual-licensed under the MIT and Apache 2.0 licenses.