[core.doc.create] Create requirements document

{{ parent: core.doc }}

The System shall provide the ability to create a requirements document file. This file must contain all requirements loaded in the Document entity. This file must be a well-formed Markdown file.

[core.doc.create.header] Writing headers

The System shall write requirement header as a standard Markdown header # [id] title\n. The level of header must be calculated through the requirement depth in requirement hierarchy.

[core.doc.create.header.skipid] 'suppress_id' system attribute

When requirement contains a special attribute {{suppress_id: true}}, the System shall suppress the [id] output part of header.

[core.doc.create.attr] Attributes section

When requirement contains any attributes except special attributes (see [[core.req.file.attr.sys]]), the System shall write a table of attributes after requirement header in the following way.

Attribute | Value :———- | :—— attribute 1 | value 1 attribute 2 | value 2

When requirement body contains links macros with other requirements [[requirement id]], the System shall replace these links macros with the right link to requirement in the target document.

[core.doc.create.check] Check document for errors

Before creating a document, the System shall check Document entity for errors (see [[core.doc.chk]] for details). When any error is found, the System shall abort execution of create document and show a list of errors.