csl-legacy
Parser for the legacy Citation Style Language 1.0 XML format (.csl)
and CSL-JSON references. Produces a typed, in-memory representation of the
CSL document that downstream tools can analyze, transform, or convert.
The primary consumer is citum-migrate,
which uses this crate to read CSL 1.0 styles and convert them to equivalent
Citum styles. End users moving styles from CSL 1.0 → Citum should use the
citum migrate CLI rather than depending on this crate directly.
Scope
This crate is read-only and migration-focused. It is not a full CSL 1.0
processor; it parses the XML and JSON formats into Rust types but does
not execute citation rendering. For rendering, see
citum-engine.
Usage
The XML entry point takes a roxmltree::Node
representing the root <style> element:
use parse_style;
use Document;
let xml = read_to_string?;
let doc = parse?;
let style = parse_style?;
println!;
println!;
For CSL-JSON input, see [csl_legacy::csl_json].
Project
Part of Citum, a modern citation engine in Rust. CSL 1.0 is the legacy format Citum is migrating from.
License
Dual-licensed under MIT or Apache-2.0 at your option.