A very high-priority, must-have, feature. And the quality has to be very good.
I doubt I have the time or skill to do it myself, however. So a PR would be welcome.
Details
I'm unsure exactly where and how to integrate this.
For style parsing, see citationberg from the typst folks. They've scaled it back to just be a CSL 1.0 parser, so can use here (see Style::from_xml).
use citationberg::Style;
use std::fs;
let style =
citationberg::Style::from_xml(
&fs::read_to_string("tests/independent/ieee.csl").unwrap()
).unwrap();
if let Style::Independent(independent) = style {
assert_eq!(independent.info.title.value, "IEEE");
// Get started processing your style!
} else {
panic!("IEEE is an independent style");
}
The tricky part is then converting that internal model to this.
My first thought was this will be difficult, because of the significant differences.
OTOH, since I've simplified the template part on this end and constrained the options for things like sorting and substitution, it may not be too hard; possibly even easy?
I think the difficult part is likely to be the conditional.
It may make sense to look to simplify that too alongside this; to provide shortcuts, in effect, for common patterns (see note below on bdarcus/csln#29).
bypass the XML syntax entirely, and just convert normalized output from existing processors into NEXT styles and templates
make style creation and maintenance going forward much easier for everyone; perhaps even making a centralized repository no longer particularly useful, or at least less labor-intensive
This second task is high complexity, very high reward, and would depend on bdarcus/csln#29.
A very high-priority, must-have, feature. And the quality has to be very good.
I doubt I have the time or skill to do it myself, however. So a PR would be welcome.
Details
I'm unsure exactly where and how to integrate this.
For style parsing, see citationberg from the typst folks. They've scaled it back to just be a CSL 1.0 parser, so can use here (see
Style::from_xml
).The tricky part is then converting that internal model to this.
My first thought was this will be difficult, because of the significant differences.
OTOH, since I've simplified the template part on this end and constrained the options for things like sorting and substitution, it may not be too hard; possibly even easy?
I think the difficult part is likely to be the conditional.
It may make sense to look to simplify that too alongside this; to provide shortcuts, in effect, for common patterns (see note below on bdarcus/csln#29).
Another option
While we're at it, if it could work reliably, this more forward-looking idea might kill two birds with one stone:
This second task is high complexity, very high reward, and would depend on bdarcus/csln#29.
See also project..