Content validation
Metanorma for IETF validates the emitted RFC XML v3 at compile time, so that problems are caught before the document reaches the IETF toolchain. Validation runs on three layers: the RFC XML v3 schema (RFC 7991, RELAX NG), the released-path content checks of RFC 7991 sections 2 and 5, and the submission checks of idnits3, the tool the IETF submission gate runs. The stream rules are taken from RFC 7841 and mirror the behaviour of the xml2rfc preptool.
Validation findings are recorded in the build log with a severity, and the full report is written next to the output as a {basename}.err.html file. The complete catalog of findings, with severities and categories, is generated from the metanorma-ietf source and rendered on the validation rule catalog page.
Severities
| Severity | Behaviour |
| abort | The compile stops, and the invalid output is quarantined as {name}.rfc.xml.err so that it cannot be submitted by mistake. |
| serious / not serious | The compile completes, and the finding is recorded in the validation report. |
| info | Advice recorded in the validation report. |
Stream rules (RFC 7841)
These rules abort the compile. The stream is declared with :submission-type:, and both the hyphenated and the camelCase spelling (:submissionType:) are accepted. The five legal streams are IETF, IAB, IRTF, independent, and editorial.
- The declared stream must be one of the five legal values. Datatracker's "Individual Submissions" stream is spelled
independent;individualis not a legal value. This is the rule behind theSUBMISSION_TYPE_UNEXPECTEDfinding that idnits3 reports for drafts whose stream does not match their Datatracker record. - The document category must be one the stream carries, per RFC 7841. With no
:intended-series:declared, the default category isstdfor the IETF stream andinfofor every other stream.
| Stream | Legal categories |
| IETF | std, bcp, exp, historic, info |
| IAB | info, historic |
| IRTF | exp, historic, info |
| independent | exp, historic, info |
| editorial | info |
- The
streamof a<seriesInfo>in the front matter must agree with thesubmissionTypeof the<rfc>element (xml2rfc preptool section 5.4.2.1). - The
independentandeditorialstreams take no:consensus:setting, and the IRTF stream takes one only when the document declares a:workgroup:(xml2rfc preptool section 5.4.2.2). - A restricted copyright notice (
noModificationTrust200902,noDerivativesTrust200902) cannot be used in the IETF stream, because it withholds the right to produce derivative works (RFC 5378, section 3.3). Useipr="trust200902"oripr="pre5378Trust200902". - A document name beginning
draft-iab-ordraft-irtf-implies that stream; the declaration must agree with it.
Submission requirements
These rules abort the compile.
- The abstract is required. It is written as the first block of the document:
[abstract]
--
This document defines a distributed ledger time-stamp.
--- The file submitted to the IETF Datatracker must be named after the draft (
draft-name-revision.xml). The compile reports the expected name for the document as advice, so the output file can be renamed before submission.
Vocabulary rules
The RFC XML v3 vocabulary deprecates a set of elements and attributes, and the emitted document must not carry them. The deprecated elements are spanx, texttable, ttcol, and vspace. The deprecated attributes are listed below; they are detected on the emitted document, so a document built with a current release never triggers them.
| Element | Deprecated attributes |
| artwork | height, width, xml:space |
| figure | align, alt, height, src, suppress-title, title, width |
| note | title |
| references | title |
| section | title |
| seriesInfo | status, stream |
| t | hangText |
| texttable | title |
| xref | pageno |
Document attribute checks
These checks run on the source document while it is parsed.
- A
[cref]annotation without a matching entry. - The
editorialstream requires theinformationalintended status. - Images other than SVG are not supported by the RFC XML rendering path.
- A workgroup name that the IETF registry does not recognise.
RFC XML structure checks
The schema validation runs against the RFC XML v3 grammar of RFC 7991, and the released-path content checks report:
- a numbered section placed under, or following, an unnumbered section;
- a
toc="include"section nested in atoc="exclude"section; - a reference whose
seriesInfocarries no value, or a section without a title where a table-of-contents entry would be needed; - an
xreforrelrefwhose target does not exist, or whoseformatandsectionorrelativeattributes are not valid for the target; - an
iprvalue outside the RFC 7991 set; - a mismatch between the RFC number and the
seriesInfothat names it.
Validation report
Findings are grouped by category (stream, submission, text output, references, vocabulary, front matter) and rendered into {basename}.err.html next to the output file, in the same report format as the other Metanorma flavors. The report is regenerated on every compile of the RFC XML output.