Content style validation

Style rules are currently specific to content in English.

These try to impose rules on content taken from ISO/IEC DIR 2, including restrictions on where requirements may be stated, usage of decimal points, hanging clauses, and subclauses that are the only child of their parent clause. While the error detection is not infallible, they should be reviewed at least once. Where possible, the gem will give the ID or section heading associated with the error. For example:

ISO style: WARNING (Section: ): Footnote may contain requirement: The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.
ISO style: WARNING (Section: Wire sieve,): possible decimal point: 0.02
ISO style: invalid technical committee type XYZ
ISO style: AnnexA-4-1:Preparation of test sample: subsection is only child

If any content warnings are generated during build, you will see them prefixed with ISO Style.

The style rules implemented include:

  • Numbers with what looks like dots instead of commas for decimal points. (ISO/IEC DIR 2, 9.1)

  • Groups of numbers without spacing for every three digits. (The gem attempts to ignore ISO references.) (ISO/IEC DIR 2, 9.1)

  • No space before percent sign. (ISO/IEC DIR 2, 9.2.1)

  • No bracketing of tolerance in percentage (e.g. 15 ± 7 % .) (ISO/IEC DIR 2, 9.2.1)

  • Avoid "billion" (ISO/IEC DIR 2, Table B.1)

  • Abbreviated terms should not contain full stops (ISO/IEC DIR 2, 8.4)

  • Avoid language-specific abbreviated terms like ppm (ISO/IEC DIR 2, 9.3)

  • Space between number and unit symbol, other than degree, minute, second (ISO/IEC DIR 2, 9.3)

  • Only use SI units, as set out in ISO 80000 and IEC 80000 (ISO/IEC DIR 2, 9.3)

  • No recommendations, permissions or requirements (detected by keyword) in: foreword, scope, introduction, term examples and examples, notes, footnotes. (ISO/IEC DIR 2, 12.2) (ISO/IEC DIR 2, 13.2) (ISO/IEC DIR 2, 14.2) (ISO/IEC DIR 2, 16.5.7) (ISO/IEC DIR 2, 24.5) (ISO/IEC DIR 2, 25.5) (ISO/IEC DIR 2, 26.5)

  • No requirements in term definitions (ISO/IEC DIR 2, 16.5.6)

  • Cross-referenced terms are italicised (implicit in ISO/IEC DIR 2, 16.5.10)

  • No subclauses that are the only child of a clause (in clauses, annexes, or scopes.) (ISO/IEC DIR 2, 22.2)

  • 5 levels of subclause nesting. (ISO/IEC DIR 2, 22.3.2)

  • Non-ISO/IEC reference turning up as normative. (ISO/IEC DIR 2, 10.2)

  • Term definition starts with an article, or ends with a period. (ISO/IEC DIR 2, 16.5.6)

  • Title intro or title part appears in only one of French or English.

  • Subparts are only permitted in IEC documents (ISO/IEC DIR 2, 11.4)

  • The type or nature of the document (e.g. International Standard, Technical Specification, Publicly Available Specification, Technical Report or Guide) shall not be indicated in the title. (ISO/IEC DIR 2, 11.5.2)

  • Each clause shall have a title (ISO/IEC DIR 2, 22.2)

  • A subclause shall not be created unless there is at least one further subclause at the same level. For example, text in Clause 10 shall not be designated subclause “10.1” unless there is also a subclause “10.2”. (ISO/IEC DIR 2, 22.3.2)

  • "see" and "refer to" can only introduce informative references. (ISO/IEC DIR 2, 15.5.3)

  • Undated references may be made only to a complete document. (ISO/IEC DIR 2, 10.4)

  • Forewords shall not be subdivided (ISO/IEC DIR 2, 12.4)

  • Normative references shall not be subdivided (ISO/IEC DIR 2, 15.4)

  • The Scope may be subdivided; however, this is not normally necessary as it is meant to be succinct. (ISO/IEC DIR 2, 14.4)

Syntax validation

ISO/IEC DIR 2 is more strict than most standards about the order and contents of clauses. Many of these rules are realized through the XML schema of the Metanorma ISO flavour, and they are reported on through syntax validation. Users should pay particular attention to syntax errors in Metanorma ISO documents.