-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow obsolete attributes/values #58
Comments
I was just trying to go through and remove pieces we flagged as deprecated for 1.1. Is this the correct patch for these two attribute values @rmzelle? As in, I can simply remove them? PR linked below. You can just click "approved" on the review if good. diff --git a/schemas/styles/csl.rnc b/schemas/styles/csl.rnc
index 3947925..f9f18c9 100644
--- a/schemas/styles/csl.rnc
+++ b/schemas/styles/csl.rnc
@@ -164,10 +164,6 @@ div {
|
## URI of style documentation.
"documentation"
- |
- ## Obsolete for independent styles. Will be disallowed with
- ## CSL 1.1.
- "independent-parent"
},
info-text
}
@@ -187,10 +183,6 @@ div {
|
## URI of style documentation.
"documentation"
- |
- ## Obsolete for dependent styles. Will be disallowed with CSL
- ## 1.1.
- "template"
},
info-text
} |
This removes the deprecated "template" and "independent-parent" attribute values, and closes #58.
If we're okay with the schema being more strict in 1.1 (and have some 1.0/1.0.1 styles in the wild stop validating against the 1.1 schema unless upgraded), then sure. Note that there are the separate obsolete attribute values on cs:style: Line 53 in 964179d
Lines 60 to 63 in 964179d
And in the past the CSL project provided a XSLT schema to upgrade 0.8.1 styles to 1.0 (https://docs.citationstyles.org/en/1.0/release-notes.html#updating-csl-0-8-styles). I don't know if we should offer that for 1.1 as well? (e.g. Zotero still ships with it to upgrade 0.8.1 styles on-the-fly: https://github.com/zotero/zotero/blob/bb220ad0f2d6bf0eca6df6d225d3d358cb50a27b/chrome/content/zotero/updateCSL.xsl and https://github.com/zotero/zotero/blob/617564982c81962a9ddf819f7e09385ddd91ec51/chrome/content/zotero/xpcom/style.js#L724) |
CSL 1.0.1 also introduced new legacy attributes: Lines 521 to 525 in 964179d
https://docs.citationstyles.org/en/1.0.1/release-notes.html#affixes-on-cs-et-al P.S. Never mind, I see you covered these in a separate PR: #221 |
In general, idea of 1.1 is to fix bugs ("sub verbo") and problems (including places where we're being too loose), and add new features (like intext). Currently, the 1.1 branch schema will not validate 1.0 styles at all. It will require: <style version="1.1"> The upshot is one would have to choose to target a particular version, and to validate against two independent versions of the schema file. Reason is two-fold:
Beyond that, I have no opinion on these specific issues. So if you are rethinking whether we should deprecate these, let me know.
Not sure how I missed that; thanks!
We could; sure. |
I'm definitely for cleaning up the schema. Just stressing the implications. Having to upgrade styles once-a-decade doesn't seem like too much to ask. |
This removes the deprecated "template" and "independent-parent" attribute values, and closes #58.
OK, merged. Since I'm maintaining 1.1. on a separate branch, it will be easy for us to review it as a complete release. We can always further tweak things as we move along. |
Maybe we can tag PRs that involve changes where styles/locales can/should be upgraded as such with a GitHub label? (just dropping attributes would be easy to do in XSLT) (that might be handier than having to update an XSLT for each relevant PR that is merged) |
I did add a deprecate tag, which I used on these two PRs. |
And I just added a commit with the XSLT file. It currently only strips link elements with those two values, and updates the version number. As you can see, it's trivial. https://github.com/citation-style-language/schema/blob/v1.1/tools/csl-update.xsl |
Wait, not sure I'm understanding your distinction here. In any case, so far, there aren't many changes for 1.1. |
I meant, if keeping an XSLT file up to date as PRs are being merged is inconvenient, we could just label PRs that require XSLT work (or another CSL upgrade path) and tackle them all at the end before release of the CSL version in question. |
Gotcha. We can tag to give us that option. But there's value in updating the XSLT as we go too, because it helps ensure the changes aren't too onerous. |
This removes the deprecated "template" and "independent-parent" attribute values, and closes citation-style-language#58.
Pretty sure this should be closed now. |
This removes the deprecated "template" and "independent-parent" attribute values, and closes citation-style-language#58.
This removes the deprecated "template" and "independent-parent" attribute values, and closes #58.
Since CSL 1.0, the schema has been rewritten to include separate definitions for dependent and independent styles. As a result, we can be more specific with regard to the attributes and attributes values allowed for each type. We should probably make this change in CSL 1.1 to prevent style from becoming invalid. The attributes/values affected:
cs:link
, "independent-parent" (independent styles) and "template" (dependent styles)cs:style
, "class", and any of the style options (dependent styles)These can all just be stripped from styles with the next XSLT upgrade script, and removed from the schema.
The text was updated successfully, but these errors were encountered: