Just noting this here for future reference; in RNC/RNG, a method to simplify multi-schema design/maintenance.
A basic csl-1.0.rnc file:
start = element style { non-meta }
non-meta = element citation { text }? & element bibliography { text }?
… and then a hypothetical csl-1.1.rnc schema file that simply redefines the pattern to use for the style pattern:
include "csl.rnc"
start |= element style { non-meta-1.1 }
# here we redefine the pattern on style
non-meta-1.1 = element citation { text }? & element bibliography { text }? & element intext { text }?
@Bruce_D_Arcus You are primarily concerned with the question if a you can use the 1.1 schema to validate existing styles. Is this right?
If yes, can’t we just add this to csl.rnc
version =
## Indicate CSL version compatibility ("1.0" for CSL 1.0).
[ a:defaultValue = "1.1" ] attribute version { "1.1" | "1.0"}
This schema will validate styles with 1.0 and 1.1. If we don’t introduce backwards incompatible changes, that shouldn’t be a problem. Or is it?
We could then just merge into master (or dev) and tag accordingly. (We should tag now with 1.0.1.) The current master just has to have those alternative attributes.
Hmm, that’s right. Looks like this is indeed more complicated to get right than I initially thought.
One reason for my confusion is that validity against a schema is not the same thing as processor compatibility. To validate a 1.0 style you’ll need a 1.0 schema but you can use this style with a processor that implements 1.8. (At least, according to what @cormacrelf writes here.) So, concerning the processor version="1.0" indicates the minimal requirements, but for validation you’ll need an exact match. Right?
This also means that we cannot (or should not) simply update the version attribute in all existing styles to version="1.1".
But: Do you think it will be necessary to validate against 1.0 once 1.1 is out? If yes, what about relying on git checkout tags/v.1.0.1 -b master for these cases.
This is kind of the implicit question behind my ideas in this thread.
It gets pretty complicated to try to maintain multiple schema patterns. I just pushed a commit for the in-text work that tried to do this, but I started to get confused even for this small change.
Ok, let’s say the next version is 1.0.2. How do style authors and processors know the exact version a style needs if we still have version="1.0"? Checking out the old version if you need to be sure is good for style authors, but what about processors?
(But perhaps a new attribute on cs:style could help here, processorversion or so.)
Maybe that’s not necessary as we can reasonably assume processors to incorporate those minimal changes quite soon. (Or we can even do the necessary changes ourselves, if necessary.) Or the processor will just complain about unknown variables so users get a warning?
Ok, thinking a bit more about it I guess you’re right. If we want a painless update, the next version should be 1.0.2.
What is more, I now think the approach taken by the CSL 1.0 Specification Update 2010-05-30 that I’ve already quoted above is right (although the distinction between minor and major incompatibilities is not quite clear.)
So, the new in-text feature should be on 1.0.3. (It is backwards compatible.)
The next additional backwards compatible feature is 1.0.4. etc.
Deprecating choose would perhaps be a good candidate for a 1.1. release. It’s backwards incompatible, but it’s perhaps still a minor incompatibility.
Changing the datamodel from flat to hierarchical may be considered a major incompatibility, so that would be 2.0.
In this model, we would just submit PRs against master, and keep version number constant, and the decisions would be how to sequence the merges and when to tag a 1.0.x version.
So logically, merge the low-hanging fruit of the straightforward variable and item type changes first, tag 1.0.2, then intext and tag 1.0.3.
I have no strong opinions here. I’m ok with both approaches.
Only a question: If we merge directly into master, doesn’t that mean that style authors always have to check out a specific tag? Or we can only merge immediately before a new release.