Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 34 additions & 30 deletions doc/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<meta itemprop="pubType" content="AG">
<meta itemprop="pubNumber" content="26">
<!-- <meta itemprop="pubPart" content="XX"> -->
<meta itemprop="pubState" content="pub">
<meta itemprop="pubState" content="draft">
<meta itemprop="pubStage" content="PUB">
<meta itemprop="pubConfidential" content="no">
<!--< meta itemprop="pubTC" content="XX"> -->
<meta itemprop="pubSuiteTitle" content="HTML Pub">
<meta itemprop="pubDateTime" content="2026-05-05">
<meta itemprop="pubDateTime" content="2026-05-12">
<!-- <meta itemprop="pubRevisionOf" content="SMPTE ST XXXX-Y:ZZZZ"> -->
<title>Tooling and documentation for HTML documents</title>
</head>
Expand Down Expand Up @@ -416,17 +416,17 @@ <h4>Overall structure</h4>
<tr>
<td><a>Scope</a></td>
<td>Exactly 1</td>
<tr>
<td><a>Conformance</a></td>
<td>0 or 1</td>
</tr>
<tr>
<td><a>Normative references</a></td>
<td>0 or 1</td>
<tr>
<td><a>Terms and definitions</a></td>
<td>0 or 1</td>
</tr>
<tr>
<td><a>Conformance</a></td>
<td>0 or 1</td>
</tr>
<tr>
<td><a>Prose</a></td>
<td>0 or more</td>
Expand Down Expand Up @@ -556,30 +556,6 @@ <h4>Scope <code>section</code></h4>

</section>

<section id="sec-conformance-section">
<h4>Conformance <code>section</code></h4>

<p>The <dfn>Conformance</dfn> <code>section</code> contains author-supplied, conformance-related prose that is added to the SMPTE
boilerplate text that is generated depending on <code>pubType</code>.</p>

<p>The absence of this <code>section</code> indicates that no author-supplied, conformance-related prose is provided.</p>

<p>The <code>id</code> attribute shall be present on the <code>section</code> element and equal to
<code>sec-conformance</code>.</p>

<p>The heading shall not be present.</p>

<div class="example">
<pre>&lt;section id=&quot;sec-conformance&quot;&gt;
&lt;p&gt;These are additional conformance requirements and definitions.&lt;/p&gt;
&lt;/section&gt;
</pre>
</div>

<p>This <code>section</code> is prohibited unless the document is a Standard or Recommended Practice.</p>

</section>

<section id="sec-norm-refs-section">
<h4>Normative references <code>section</code></h4>

Expand Down Expand Up @@ -712,6 +688,34 @@ <h4>Terms and definitions <code>section</code></h4>

</section>

<section id="sec-conformance-section">
<h4>Conformance <code>section</code></h4>

<p>The <dfn>Conformance</dfn> <code>section</code> contains author-supplied, conformance-related prose that is added to the SMPTE
boilerplate text that is generated depending on <code>pubType</code>.</p>

<p>The <a>Conformance</a> <code>section</code> follows <a>Terms and definitions</a> and is the first SMPTE-defined clause that
may carry substantive conformance requirements. It is positioned consistent with ISO/IEC Directives, Part 2, which reserve
Clauses 1, 2, and 3 for <a>Scope</a>, <a>Normative references</a>, and <a>Terms and definitions</a> respectively.</p>

<p>The absence of this <code>section</code> indicates that no author-supplied, conformance-related prose is provided.</p>

<p>The <code>id</code> attribute shall be present on the <code>section</code> element and equal to
<code>sec-conformance</code>.</p>

<p>The heading shall not be present.</p>

<div class="example">
<pre>&lt;section id=&quot;sec-conformance&quot;&gt;
&lt;p&gt;These are additional conformance requirements and definitions.&lt;/p&gt;
&lt;/section&gt;
</pre>
</div>

<p>This <code>section</code> is prohibited unless the document is a Standard or Recommended Practice.</p>

</section>

<section id="sec-prose-section">
<h4>Prose <code>section</code>(s)</h4>

Expand Down
10 changes: 5 additions & 5 deletions js/validate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,11 +1155,6 @@ function validateBody(body, logger) {
logger.error("Mandatory Scope clause missing", elements[0]);
}

/* validate optional conformance */

if (elements.length > 0 && ConformanceMatcher.match(elements[0], logger))
elements.shift();

/* validate optional normative references */

if (elements.length > 0 && NormativeReferencesMatcher.match(elements[0], logger))
Expand All @@ -1170,6 +1165,11 @@ function validateBody(body, logger) {
if (elements.length > 0 && DefinitionsMatcher.match(elements[0], logger))
elements.shift();

/* validate optional conformance */

if (elements.length > 0 && ConformanceMatcher.match(elements[0], logger))
elements.shift();

/* validate zero or more clauses */

while (elements.length > 0) {
Expand Down
11 changes: 7 additions & 4 deletions smpte.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ function insertNormativeReferences(docMetadata) {
if (sec === null) {
sec = document.createElement("section");
sec.id = SMPTE_NORM_REFS_ID;
document.body.insertBefore(sec, document.getElementById(SMPTE_CONFORMANCE_ID).nextSibling);
document.body.insertBefore(sec, document.getElementById(SMPTE_SCOPE_ID).nextSibling);
}

const p = document.createElement("p");
Expand Down Expand Up @@ -665,7 +665,10 @@ function insertConformance(docMetadata) {
sec = document.createElement("section");
sec.id = SMPTE_CONFORMANCE_ID;

document.body.insertBefore(sec, document.getElementById(SMPTE_SCOPE_ID).nextSibling);
const anchor = document.getElementById(SMPTE_TERMS_ID)
|| document.getElementById(SMPTE_NORM_REFS_ID)
|| document.getElementById(SMPTE_SCOPE_ID);
document.body.insertBefore(sec, anchor.nextSibling);
}

let implConformance = "";
Expand Down Expand Up @@ -698,7 +701,7 @@ function insertConformance(docMetadata) {
helpful to the user, but not indispensable, and can be removed, changed, or added editorially without
affecting interoperability. Informative text does not contain any conformance keywords. </p>

<p>All text in this document is, by default, normative, except: the Introduction, any clause explicitly
<p>All text in this document is, by default, normative, except: the Introduction, the Bibliography, or any clause explicitly
labeled as "Informative" or individual paragraphs that start with "Note:" </p>

<p>The keywords "shall" and "shall not" indicate requirements strictly to be followed in order to conform to the
Expand Down Expand Up @@ -1561,9 +1564,9 @@ async function render() {
insertForeword(docMetadata);
insertIntroduction(docMetadata);
insertScope(docMetadata);
insertConformance(docMetadata);
insertNormativeReferences(docMetadata);
insertTermsAndDefinitions(docMetadata);
insertConformance(docMetadata);

insertElementsAnnex(docMetadata);
insertBibliography(docMetadata);
Expand Down
4 changes: 4 additions & 0 deletions test/resources/html/validation/rdd-standalone-invalid.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,9 @@
<section id="sec-scope">
<p>This is the scope of the document.</p>
</section>

<section id="sec-conformance">
<p>These are additional conformance requirements and definitions.</p>
</section>
</body>
</html>
24 changes: 24 additions & 0 deletions test/resources/html/validation/st-conformance-invalid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html>
<head itemscope="itemscope" itemtype="http://smpte.org/standards/documents">
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="module" src="../../../../smpte.js"></script>
<meta itemprop="test" content="invalid" />
<meta itemprop="pubType" content="ST" />
<meta itemprop="pubNumber" content="2650" />
<meta itemprop="pubTC" content="27C" />
<meta itemprop="pubStage" content="WD" />
<meta itemprop="pubState" content="draft" />
<title>Title of the document</title>
</head>
<body>
<section id="sec-conformance">
<p>These are additional conformance requirements and definitions.</p>
</section>
<section id="sec-scope">
<p>This is the scope of the document.</p>
</section>
</body>
</html>
24 changes: 24 additions & 0 deletions test/resources/html/validation/st-conformance-valid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!doctype html>
<html>
<head itemscope="itemscope" itemtype="http://smpte.org/standards/documents">
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="module" src="../../../../smpte.js"></script>
<meta itemprop="test" content="valid" />
<meta itemprop="pubType" content="ST" />
<meta itemprop="pubNumber" content="2650" />
<meta itemprop="pubTC" content="27C" />
<meta itemprop="pubStage" content="WD" />
<meta itemprop="pubState" content="draft" />
<title>Title of the document</title>
</head>
<body>
<section id="sec-scope">
<p>This is the scope of the document.</p>
</section>
<section id="sec-conformance">
<p>These are additional conformance requirements and definitions.</p>
</section>
</body>
</html>
Loading