diff --git a/lib/rules.json b/lib/rules.json
index 693c1ea83..399a5689d 100644
--- a/lib/rules.json
+++ b/lib/rules.json
@@ -1223,7 +1223,7 @@
"
If this is a modified Recommendation that was modified in place or is a new edition, the document must include both the original publication date and the modification date. For example:
<p id=\"w3c-state\">W3C Recommendation 7 April 2004, edited in place 19 August2004</p>
"
],
"docIDFormat": true,
- "docIDOrder": "Document identifier information must be present in this order: - 'This version' - URI to that version
- 'Latest version' - URI to the latest version. See also the (non-normative) Version Management in W3C Technical Reports for information about \"latest version\" URI and version management.
- 'History' - URI to the history of the specification
- Editor(s)
- Feedback - GitHub repository issue links are required in the <dl>after <dt>Feedback:</dt> in the headers (<div class=\"head\">) of the document. Links are expected to be of the form
https://github.com/<USER_OR_ORG>/<REPO_NAME>/[issues|labels][/…]
.) - Errata - URI to an errata document for any errors or issues reported since publication. See also suggestions on errata page structure in the Manual of Style. Note: Do not put the errata document in TR space as the expectation is that we will not modify document in TR space after publication; see the policy for in-place modification of W3C Technical Reports.
",
+ "docIDOrder": "Document identifier information must be present in this order: - 'This version' - URI to that version
- 'Latest version' - URI to the latest version. See also the (non-normative) Version Management in W3C Technical Reports for information about \"latest version\" URI and version management.
- 'History' - URI to the history of the specification
- Editor(s)
- Feedback - GitHub repository issue links are required in the <dl>after <dt>Feedback:</dt> in the headers (<div class=\"head\">) of the document. Links are expected to be of the form
https://github.com/<USER_OR_ORG>/<REPO_NAME>/[issues|labels][/…]
.) - Errata - URI to an errata document for any errors or issues reported since publication. See also suggestions on errata page structure in the Manual of Style. Note:
- Do not put the errata document in TR space as the expectation is that we will not modify document in TR space after publication; see the policy for in-place modification of W3C Technical Reports.
- Recommendations with candidate/proposed changes are treated as inline errata, and these documents don't require an errata link.
",
"docIDThisVersion": ["REC"],
"docIDDate": true,
"docIDLatestVersion": true,
diff --git a/lib/rules/headers/errata.js b/lib/rules/headers/errata.js
index 800ef5200..b5fdffcd5 100644
--- a/lib/rules/headers/errata.js
+++ b/lib/rules/headers/errata.js
@@ -2,15 +2,32 @@
const self = {
name: 'headers.errata',
+ section: 'front-matter',
+ rule: 'docIDOrder',
};
export const { name } = self;
+// Check if document is Recommendation, and uses inline changes(REC with Candidate/Proposed changes)
+function isRECWithChanges(sr) {
+ if (sr.config.status !== 'REC') {
+ return false;
+ }
+
+ const recMeta = sr.getRecMetadata({});
+ return Object.values(recMeta).length !== 0;
+}
+
/**
* @param sr
* @param done
*/
export function check(sr, done) {
+ // for REC with Candidate/Proposed changes, no need to check errata link
+ if (isRECWithChanges(sr)) {
+ return done();
+ }
+
const dts = sr.extractHeaders();
// Check 'Errata:' exist, don't check any further.
if (!dts.Errata) {
diff --git a/test/data/TR/Recommendation/REC.js b/test/data/TR/Recommendation/REC.js
index c4f3ce2f9..13eb76e15 100644
--- a/test/data/TR/Recommendation/REC.js
+++ b/test/data/TR/Recommendation/REC.js
@@ -54,6 +54,22 @@ export const rules = {
data: 'noErrata',
errors: ['headers.errata.no-errata'],
},
+ {
+ data: 'recWithProposedSubChanges',
+ errors: [],
+ },
+ {
+ data: 'recWithProposedNewChanges',
+ errors: [],
+ },
+ {
+ data: 'recWithCandidateSubChanges',
+ errors: [],
+ },
+ {
+ data: 'recWithCandidateNewChanges',
+ errors: [],
+ },
],
dl: [
...baseRules.headers.dl,
diff --git a/test/doc-views/TR/Recommendation/REC.js b/test/doc-views/TR/Recommendation/REC.js
index 21350bf9b..033b69758 100644
--- a/test/doc-views/TR/Recommendation/REC.js
+++ b/test/doc-views/TR/Recommendation/REC.js
@@ -34,6 +34,66 @@ export default {
needErrata: false,
},
},
+ recWithProposedSubChanges: {
+ ...good,
+ config: {
+ ...good.config,
+ needErrata: false,
+ },
+ sotd: {
+ ...good.sotd,
+ rec: {
+ ...good.sotd.rec,
+ showAddition: true,
+ addition: 'It includes proposed corrections.',
+ },
+ },
+ },
+ recWithProposedNewChanges: {
+ ...good,
+ config: {
+ ...good.config,
+ needErrata: false,
+ },
+ sotd: {
+ ...good.sotd,
+ rec: {
+ ...good.sotd.rec,
+ showProposedAdd: true,
+ },
+ },
+ },
+ recWithCandidateSubChanges: {
+ ...good,
+ config: {
+ ...good.config,
+ needErrata: false,
+ },
+ sotd: {
+ ...good.sotd,
+ rec: {
+ ...good.sotd.rec,
+ showAddition: true,
+ addition: 'It includes candidate corrections.',
+ },
+ },
+ },
+ recWithCandidateNewChanges: {
+ ...good,
+ config: {
+ ...good.config,
+ needErrata: false,
+ },
+ sotd: {
+ ...good.sotd,
+ rec: {
+ ...good.sotd.rec,
+ showAddition: true,
+ addition:
+ 'It includes candidate additions, introducing new features since the previous Recommendation.',
+ },
+ },
+ },
},
deployment: {
noDeployment: {