@@ -606,10 +606,11 @@ function insertConformance(docMetadata) {
606606
607607 let sec = document . getElementById ( SMPTE_CONFORMANCE_ID ) ;
608608
609- if ( docMetadata . pubType == smpte . OM_PUBTYPE ) {
609+ if ( ! ( docMetadata . pubType == smpte . RP_PUBTYPE || docMetadata . pubType == smpte . ST_PUBTYPE ) ) {
610610 if ( sec !== null )
611- logger_ . error ( "OM must not contain a Conformance section." ) ;
612- return ;
611+ logger_ . error ( `An ${ docMetadata . pubType } document must not contain a conformance section` ) ;
612+ if ( docMetadata . pubType != smpte . EG_PUBTYPE )
613+ return ;
613614 }
614615
615616 if ( sec === null ) {
@@ -632,44 +633,61 @@ function insertConformance(docMetadata) {
632633
633634 } else {
634635
635- implConformance = sec . innerText . innerHTML ;
636+ implConformance = sec . innerHTML ;
636637
637638 }
638639
639640 } else if ( sec . innerText . trim ( ) . length !== 0 ) {
640641 logger_ . error ( "Conformance section not used in AGs." ) ;
641642 }
642643
643- sec . innerHTML = `
644- <h2>Conformance</h2>
645- <p>Normative text is text that describes elements of the design that are indispensable or contains the
646- conformance language keywords: "shall", "should", or "may". Informative text is text that is potentially
647- helpful to the user, but not indispensable, and can be removed, changed, or added editorially without
648- affecting interoperability. Informative text does not contain any conformance keywords. </p>
644+ if ( docMetadata . pubType !== smpte . EG_PUBTYPE ) {
645+
646+ sec . innerHTML = `
647+ <h2>Conformance</h2>
648+ <p>Normative text is text that describes elements of the design that are indispensable or contains the
649+ conformance language keywords: "shall", "should", or "may". Informative text is text that is potentially
650+ helpful to the user, but not indispensable, and can be removed, changed, or added editorially without
651+ affecting interoperability. Informative text does not contain any conformance keywords. </p>
652+
653+ <p>All text in this document is, by default, normative, except: the Introduction, any clause explicitly
654+ labeled as "Informative" or individual paragraphs that start with "Note:" </p>
655+
656+ <p>The keywords "shall" and "shall not" indicate requirements strictly to be followed in order to conform to the
657+ document and from which no deviation is permitted.</p>
658+
659+ <p>The keywords, "should" and "should not" indicate that, among several possibilities, one is recommended
660+ as particularly suitable, without mentioning or excluding others; or that a certain course of action
661+ is preferred but not necessarily required; or that (in the negative form) a certain possibility
662+ or course of action is deprecated but not prohibited.</p>
649663
650- <p>All text in this document is, by default, normative, except: the Introduction, any clause explicitly
651- labeled as "Informative" or individual paragraphs that start with "Note:" </p>
664+ <p>The keywords "may" and "need not" indicate courses of action permissible within the limits of the document. </p>
652665
653- <p>The keywords "shall" and "shall not" indicate requirements strictly to be followed in order to conform to the
654- document and from which no deviation is permitted.</p>
666+ <p>The keyword "reserved" indicates a provision that is not defined at this time, shall not be used,
667+ and may be defined in the future. The keyword "forbidden" indicates "reserved" and in addition
668+ indicates that the provision will never be defined in the future.</p>
655669
656- <p>The keywords, "should" and "should not" indicate that, among several possibilities, one is recommended
657- as particularly suitable, without mentioning or excluding others; or that a certain course of action
658- is preferred but not necessarily required; or that (in the negative form) a certain possibility
659- or course of action is deprecated but not prohibited.</p>
670+ ${ implConformance }
660671
661- <p>The keywords "may" and "need not" indicate courses of action permissible within the limits of the document. </p>
672+ <p>Unless otherwise specified, the order of precedence of the types of normative information in
673+ this document shall be as follows: Normative prose shall be the authoritative definition;
674+ tables shall be next; then formal languages; then figures; and then any other language forms.</p>
675+ ` ;
662676
663- <p>The keyword "reserved" indicates a provision that is not defined at this time, shall not be used,
664- and may be defined in the future. The keyword "forbidden" indicates "reserved" and in addition
665- indicates that the provision will never be defined in the future.</p>
677+ } else {
678+
679+ sec . innerHTML = `
680+ <h2>Conformance</h2>
681+ <p>This Engineering Guideline is purely informative and meant to provide tutorial information to the
682+ industry. It does not impose Conformance Requirements and avoids the use of Conformance Notation.</p>
666683
667- ${ implConformance }
684+ <p>Engineering Guidelines frequently provide tutorial information about a Standard or Recommended Practice
685+ and when this is the case, the user should rely on the Standards and Recommended Practices referenced for
686+ interoperability information.</p>
687+ ` ;
688+
689+ }
668690
669- <p>Unless otherwise specified, the order of precedence of the types of normative information in
670- this document shall be as follows: Normative prose shall be the authoritative definition;
671- tables shall be next; then formal languages; then figures; and then any other language forms.</p>
672- ` ;
673691}
674692
675693const SMPTE_FOREWORD_ID = "sec-foreword" ;
@@ -1237,6 +1255,27 @@ function resolveLinks(docMetadata) {
12371255 }
12381256}
12391257
1258+ const CONFORMANCE_RE = / \s * ( s h a l l ) | ( s h o u l d ) | ( m a y ) \s / i;
1259+
1260+ function checkConformanceNotation ( docMetadata ) {
1261+ if ( docMetadata . pubType !== smpte . EG_PUBTYPE )
1262+ return ;
1263+
1264+ for ( let section of document . querySelectorAll ( "section:not(:has(section))" ) ) {
1265+
1266+ const id = section . id ;
1267+
1268+ if ( id === SMPTE_FRONT_MATTER_ID || id === SMPTE_FOREWORD_ID || id === SMPTE_CONFORMANCE_ID )
1269+ continue ;
1270+
1271+ const r = CONFORMANCE_RE . exec ( section . innerText ) ;
1272+
1273+ if ( r !== null )
1274+ logger_ . error ( `An EG must not contain the conformance notation ${ r [ 1 ] } ` , section ) ;
1275+
1276+ } ;
1277+ }
1278+
12401279function asyncInsertSnippets ( ) {
12411280 return Promise . all ( Array . from (
12421281 document . querySelectorAll ( "pre[data-include]" ) ,
@@ -1283,6 +1322,7 @@ async function render() {
12831322 let docMetadata = loadDocMetadata ( ) ;
12841323
12851324 insertIconLink ( ) ;
1325+ checkConformanceNotation ( docMetadata ) ;
12861326 insertFrontMatter ( docMetadata ) ;
12871327 insertForeword ( docMetadata ) ;
12881328 insertIntroduction ( docMetadata ) ;
0 commit comments