Rust crate containing structs and validators to create Crossref conform XML output – with confidence.
| schemas | ||
| src | ||
| tests/xml_output | ||
| .gitignore | ||
| Cargo.toml | ||
| collect-schemas.sh | ||
| LICENSE | ||
| README.md | ||
| schema.patch | ||
crossref-xml
Rust crate containing structs and validators to create Crossref conform XML output – with confidence. Based on the 5.4.0 Crossref schema (documentation).
This is a hand-curated set of structs, as generating it from the XSD schema directly is a great idea, but has failed us in quirky ways. This crate is made to ensure when XML is generated, it is valid. It is not supposed to be feature complete from the get-go, but to provide a stable development base to keep evolving schema support.
Philosophy
Crossref has a complex schema with many requirements. The philosophy of this crate is for you to focus on your content and not be exposed to more complexities than that.
Concretely this means:
- One submission per publication
- Logical defaults for our use case (may not be logical for yours)
- Digital first
- Registrant and depositor are the same
- English language default
- Archived in the Internet Archive
First pass
flowchart LR
A[✅✅doi_batch] --> B[✅✅body]
A --> C[✅✅head]
B --> D[✅✅journal]
B --> E[book]
B --> F[conference]
B --> G[sa_component]
B --> H[dissertation]
B --> I[report-paper]
B --> J[standard]
B --> K[database]
B --> L[peer_review]
B --> M[pending_publication]
B --> N[posted_content]
D --> O[✅✅journal_metadata]
D --> P[✅✅journal_issue]
D --> Q[✅✅journal_article]
Dependencies
xmllint --schema schemas/crossref5.4.0.xsd ~/Downloads/test.xml