metanorma-cc 1.5.4 → 1.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,29 +0,0 @@
1
- module Asciidoctor
2
- module CC
3
- class Converter < Standoc::Converter
4
- def content_validate(doc)
5
- super
6
- bibdata_validate(doc.root)
7
- end
8
-
9
- def bibdata_validate(doc)
10
- doctype_validate(doc)
11
- stage_validate(doc)
12
- end
13
-
14
- def doctype_validate(xmldoc)
15
- doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
16
- %w(directive guide specification standard report administrative amendment
17
- technical-corrigendum advisory).include?(doctype) or
18
- @log.add("Document Attributes", nil, "#{doctype} is not a recognised document type")
19
- end
20
-
21
- def stage_validate(xmldoc)
22
- stage = xmldoc&.at("//bibdata/status/stage")&.text
23
- %w(proposal working-draft committee-draft draft-standard final-draft
24
- published withdrawn).include?(stage) or
25
- @log.add("Document Attributes", nil, "#{stage} is not a recognised status")
26
- end
27
- end
28
- end
29
- end