diff --git a/doc/main.html b/doc/main.html
index b5b96fb..debeb1e 100644
--- a/doc/main.html
+++ b/doc/main.html
@@ -558,7 +558,7 @@
Introduction section
The heading shall not be present.
- When pubType is ST, RP, EG, ER or
+
When pubType is ST, RP, EG or
RDD, a statement that the clause is entirely informative is generated automatically at the start of
the clause. This statement shall not be supplied by the author.
diff --git a/js/common.mjs b/js/common.mjs
index f76fec0..4c568c9 100644
--- a/js/common.mjs
+++ b/js/common.mjs
@@ -35,8 +35,8 @@ export const RDD_PUBTYPE = "RDD";
export const PUB_TYPES = new Set([AG_PUBTYPE, OM_PUBTYPE, ST_PUBTYPE, RP_PUBTYPE, EG_PUBTYPE, ER_PUBTYPE, RDD_PUBTYPE]);
export const LONG_PUB_TYPE = new Map([
- [AG_PUBTYPE, "Administrative Guideline"],
- [OM_PUBTYPE, "Operations Manual"],
+ [AG_PUBTYPE, "SMPTE Administrative Guideline"],
+ [OM_PUBTYPE, "SMPTE Operations Manual"],
[ST_PUBTYPE, "SMPTE Standard"],
[RP_PUBTYPE, "SMPTE Recommended Practice"],
[EG_PUBTYPE, "SMPTE Engineering Guideline"],
@@ -44,7 +44,7 @@ export const LONG_PUB_TYPE = new Map([
[RDD_PUBTYPE, "SMPTE Registered Disclosure Document"]
])
-export const ENGDOC_PUBTYPES = new Set([ST_PUBTYPE, RP_PUBTYPE, EG_PUBTYPE, ER_PUBTYPE, RDD_PUBTYPE]);
+export const ENGDOC_PUBTYPES = new Set([ST_PUBTYPE, RP_PUBTYPE, EG_PUBTYPE, RDD_PUBTYPE]);
/* document types whose Foreword carries the patent rights statement, and hence
support pubIPRClaimed */
diff --git a/scripts/build.mjs b/scripts/build.mjs
index 1095a70..75c91a8 100644
--- a/scripts/build.mjs
+++ b/scripts/build.mjs
@@ -138,14 +138,14 @@ function mirrorDirExcludeTooling(srcDir, targetDir, relParentPath) {
if (srcStat.isDirectory()) {
- s3SyncDir(srcPath, s3Client, bucket, dstKey + "/");
+ await s3SyncDir(srcPath, s3Client, bucket, dstKey + "/");
} else if (srcStat.isFile()) {
const contentType = guessContentTypeFromExtension(srcPath);
const cmd = new PutObjectCommand({
- Body: fs.createReadStream(srcPath),
+ Body: fs.readFileSync(srcPath),
Bucket: bucket,
Key: dstKey,
ContentType: contentType
@@ -315,7 +315,7 @@ async function s3Upload(buildPaths, versionKey, generatedFiles) {
pubLinks.libraryZip = `${deployPrefix}${s3PubKeyPrefix}${encodeURIComponent(generatedFiles.libraryZip)}`;
}
- s3SyncDir(buildPaths.pubDirPath, s3Client, s3Bucket, s3PubKeyPrefix);
+ await s3SyncDir(buildPaths.pubDirPath, s3Client, s3Bucket, s3PubKeyPrefix);
return pubLinks;
}
@@ -739,7 +739,7 @@ async function main() {
generatedFiles.elements.push({
title: element.title.replace(/\s+/g, " "),
file: {
- path: href,
+ path: decodeURIComponent(href),
mediaType: guessContentTypeFromExtension(href)
}
});
diff --git a/smpte.js b/smpte.js
index cf802a4..fa9ae8c 100644
--- a/smpte.js
+++ b/smpte.js
@@ -190,12 +190,12 @@ function insertFrontMatter(docMetadata) {
switch (docMetadata.pubType) {
case smpte.AG_PUBTYPE:
+ case smpte.ER_PUBTYPE:
case smpte.OM_PUBTYPE:
break;
case smpte.ST_PUBTYPE:
case smpte.RP_PUBTYPE:
case smpte.EG_PUBTYPE:
- case smpte.ER_PUBTYPE:
case smpte.RDD_PUBTYPE:
if (docMetadata.pubPart !== null)
actualPubNumber += `-${docMetadata.pubPart}`;
@@ -230,13 +230,13 @@ function insertFrontMatter(docMetadata) {
break;
}
- const draftWarning = docMetadata.pubStage === smpte.PUB_STAGE_PUB ? "" : SMPTE_DRAFT_WARNING;
+ const draftWarning = docMetadata.pubStage === smpte.PUB_STAGE_PUB ? "" : smpteDraftWarning(longDocType);
let boilerplate;
if (docMetadata.pubState === smpte.PUB_STATE_PUB && docMetadata.pubType === smpte.OM_PUBTYPE)
boilerplate = SMPTE_PUB_OM_FRONT_MATTER_BOILERPLATE;
- else if (docMetadata.pubState === smpte.PUB_STATE_PUB && docMetadata.pubType === smpte.AG_PUBTYPE)
+ else if (docMetadata.pubState === smpte.PUB_STATE_PUB && (docMetadata.pubType === smpte.AG_PUBTYPE || docMetadata.pubType === smpte.ER_PUBTYPE))
boilerplate = SMPTE_PUB_AG_FRONT_MATTER_BOILERPLATE;
else
boilerplate = SMPTE_FRONT_MATTER_BOILERPLATE;
@@ -714,7 +714,12 @@ function insertElementsAnnex(docMetadata) {
if (isAbsoluteLink) {
e.innerText = href;
} else {
- e.innerText = href.split('\\').pop().split('/').pop();
+ const fileName = href.split('\\').pop().split('/').pop();
+ try {
+ e.innerText = decodeURIComponent(fileName);
+ } catch {
+ e.innerText = fileName;
+ }
}
e.parentElement.insertBefore(
@@ -919,15 +924,16 @@ const SMPTE_DOC_FOREWORD_BOILERPLATE = `${SMPTE_GEN_FOREWORD_BOILERPLATE}
{{authorProse}}
`
-const SMPTE_DRAFT_WARNING = `
+function smpteDraftWarning(longDocType) {
+ return `
Warning: This document is an unpublished work under development and shall not be referred
-to as a SMPTE Standard,
-Recommended Practice, or Engineering Guideline. It is distributed for review and comment; distribution does not constitute
+to as a ${longDocType}. It is distributed for review and comment; distribution does not constitute
publication. Recipients of this document are strongly encouraged to submit, with their comments, notification of any relevant
patent rights of which they are aware and to provide supporting documentation.
-`
+`;
+}
function insertForeword(docMetadata) {
let sec = document.getElementById(SMPTE_FOREWORD_ID);
diff --git a/test/resources/html/validation/eg-no-pubStage-invalid.html b/test/resources/html/validation/eg-no-pubStage-invalid.html
new file mode 100644
index 0000000..e1f4694
--- /dev/null
+++ b/test/resources/html/validation/eg-no-pubStage-invalid.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Title of the document
+
+
+
+ This is the scope of the document.
+
+
+
diff --git a/test/resources/html/validation/er-no-pubStage-draft-valid.html b/test/resources/html/validation/er-no-pubStage-draft-valid.html
new file mode 100644
index 0000000..b1ff647
--- /dev/null
+++ b/test/resources/html/validation/er-no-pubStage-draft-valid.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Title of the document
+
+
+
+ This is the scope of the document.
+
+
+
diff --git a/test/resources/html/validation/er-no-pubStage-pub-valid.html b/test/resources/html/validation/er-no-pubStage-pub-valid.html
new file mode 100644
index 0000000..7e99aa3
--- /dev/null
+++ b/test/resources/html/validation/er-no-pubStage-pub-valid.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Title of the document
+
+
+
+ This is the scope of the document.
+
+
+