metanorma-mpfd 0.3.21 → 0.3.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -0
  3. data/Gemfile +1 -8
  4. data/README.adoc +1 -96
  5. data/lib/asciidoctor/mpfd/biblio.rng +166 -567
  6. data/lib/asciidoctor/mpfd/converter.rb +84 -7
  7. data/lib/asciidoctor/mpfd/isodoc.rng +727 -763
  8. data/lib/asciidoctor/mpfd/isostandard.rng +1054 -0
  9. data/lib/asciidoctor/mpfd/mpfd.rng +145 -11
  10. data/lib/asciidoctor/mpfd/pdf.js +31 -0
  11. data/lib/asciidoctor/mpfd/section.rb +51 -23
  12. data/lib/asciidoctor/mpfd.rb +1 -0
  13. data/lib/isodoc/mpfd/html/header.html +6 -64
  14. data/lib/isodoc/mpfd/html/html_rsd_titlepage.html +4 -4
  15. data/lib/isodoc/mpfd/html/htmlstyle.scss +505 -200
  16. data/lib/isodoc/mpfd/html/rsd.scss +30 -149
  17. data/lib/isodoc/mpfd/html/scripts.html +27 -25
  18. data/lib/isodoc/mpfd/html/scripts.pdf.html +70 -0
  19. data/lib/isodoc/mpfd/html/word_rsd_titlepage.html +2 -2
  20. data/lib/isodoc/mpfd/html/wordstyle.scss +9 -61
  21. data/lib/isodoc/mpfd/html_convert.rb +258 -4
  22. data/lib/isodoc/mpfd/i18n-en.yaml +0 -1
  23. data/lib/isodoc/mpfd/metadata.rb +32 -8
  24. data/lib/isodoc/mpfd/{base_convert.rb → pdf_convert.rb} +137 -40
  25. data/lib/isodoc/mpfd/word_convert.rb +292 -4
  26. data/lib/metanorma/mpfd/processor.rb +4 -8
  27. data/lib/metanorma/mpfd/version.rb +1 -1
  28. data/lib/metanorma-mpfd.rb +1 -0
  29. data/metanorma-mpfd.gemspec +8 -7
  30. metadata +66 -33
  31. data/.github/workflows/macos.yml +0 -39
  32. data/.github/workflows/ubuntu.yml +0 -53
  33. data/.github/workflows/windows.yml +0 -41
  34. data/.hound.yml +0 -3
  35. data/.rubocop.yml +0 -10
  36. data/lib/asciidoctor/mpfd/basicdoc.rng +0 -1059
  37. data/lib/asciidoctor/mpfd/reqt.rng +0 -171
  38. data/lib/asciidoctor/mpfd/validate.rb +0 -30
  39. data/lib/isodoc/mpfd/i18n-zh-Hans.yaml +0 -2
@@ -1,171 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!--
4
- Presupposes isodoc.rnc, is included in it
5
- include "isodoc.rnc" { }
6
- -->
7
- <define name="requirement">
8
- <element name="requirement">
9
- <ref name="RequirementType"/>
10
- </element>
11
- </define>
12
- <define name="recommendation">
13
- <element name="recommendation">
14
- <ref name="RequirementType"/>
15
- </element>
16
- </define>
17
- <define name="permission">
18
- <element name="permission">
19
- <ref name="RequirementType"/>
20
- </element>
21
- </define>
22
- <define name="RequirementType">
23
- <optional>
24
- <attribute name="obligation">
25
- <ref name="ObligationType"/>
26
- </attribute>
27
- </optional>
28
- <optional>
29
- <attribute name="unnumbered">
30
- <data type="boolean"/>
31
- </attribute>
32
- </optional>
33
- <optional>
34
- <attribute name="subsequence"/>
35
- </optional>
36
- <attribute name="id">
37
- <data type="ID"/>
38
- </attribute>
39
- <optional>
40
- <attribute name="filename"/>
41
- </optional>
42
- <optional>
43
- <attribute name="model"/>
44
- </optional>
45
- <optional>
46
- <attribute name="type"/>
47
- </optional>
48
- <optional>
49
- <ref name="reqtitle"/>
50
- </optional>
51
- <optional>
52
- <ref name="label"/>
53
- </optional>
54
- <optional>
55
- <ref name="subject"/>
56
- </optional>
57
- <zeroOrMore>
58
- <ref name="reqinherit"/>
59
- </zeroOrMore>
60
- <zeroOrMore>
61
- <ref name="classification"/>
62
- </zeroOrMore>
63
- <zeroOrMore>
64
- <choice>
65
- <ref name="measurementtarget"/>
66
- <ref name="specification"/>
67
- <ref name="verification"/>
68
- <ref name="import"/>
69
- <ref name="description"/>
70
- </choice>
71
- </zeroOrMore>
72
- <optional>
73
- <ref name="reqt_references"/>
74
- </optional>
75
- <zeroOrMore>
76
- <choice>
77
- <ref name="requirement"/>
78
- <ref name="recommendation"/>
79
- <ref name="permission"/>
80
- </choice>
81
- </zeroOrMore>
82
- </define>
83
- <define name="reqtitle">
84
- <element name="title">
85
- <ref name="FormattedString"/>
86
- </element>
87
- </define>
88
- <define name="label">
89
- <element name="label">
90
- <text/>
91
- </element>
92
- </define>
93
- <define name="subject">
94
- <element name="subject">
95
- <text/>
96
- </element>
97
- </define>
98
- <define name="reqinherit">
99
- <element name="inherit">
100
- <text/>
101
- </element>
102
- </define>
103
- <define name="measurementtarget">
104
- <element name="measurement-target">
105
- <ref name="RequirementSubpart"/>
106
- </element>
107
- </define>
108
- <define name="specification">
109
- <element name="specification">
110
- <ref name="RequirementSubpart"/>
111
- </element>
112
- </define>
113
- <define name="verification">
114
- <element name="verification">
115
- <ref name="RequirementSubpart"/>
116
- </element>
117
- </define>
118
- <define name="import">
119
- <element name="import">
120
- <ref name="RequirementSubpart"/>
121
- </element>
122
- </define>
123
- <define name="description">
124
- <element name="description">
125
- <ref name="RequirementSubpart"/>
126
- </element>
127
- </define>
128
- <define name="reqt_references">
129
- <element name="references">
130
- <oneOrMore>
131
- <ref name="bibitem"/>
132
- </oneOrMore>
133
- </element>
134
- </define>
135
- <define name="RequirementSubpart">
136
- <optional>
137
- <attribute name="type"/>
138
- </optional>
139
- <optional>
140
- <attribute name="exclude">
141
- <data type="boolean"/>
142
- </attribute>
143
- </optional>
144
- <oneOrMore>
145
- <ref name="BasicBlock"/>
146
- </oneOrMore>
147
- </define>
148
- <define name="ObligationType">
149
- <choice>
150
- <value>requirement</value>
151
- <value>recommendation</value>
152
- <value>permission</value>
153
- </choice>
154
- </define>
155
- <define name="classification">
156
- <element name="classification">
157
- <ref name="classification_tag"/>
158
- <ref name="classification_value"/>
159
- </element>
160
- </define>
161
- <define name="classification_tag">
162
- <element name="tag">
163
- <text/>
164
- </element>
165
- </define>
166
- <define name="classification_value">
167
- <element name="value">
168
- <text/>
169
- </element>
170
- </define>
171
- </grammar>
@@ -1,30 +0,0 @@
1
- module Asciidoctor
2
- module Mpfd
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(policy-and-procedures best-practices supporting-document
17
- report legal directives proposal standard).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
30
-
@@ -1,2 +0,0 @@
1
- clause: 段
2
- annex: 附录