metanorma-iso 2.2.2 → 2.2.4

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 (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iso/html/header-dis.html +111 -29
  3. data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
  4. data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
  5. data/lib/isodoc/iso/html/style-human.css +7 -2
  6. data/lib/isodoc/iso/html/style-human.scss +0 -1
  7. data/lib/isodoc/iso/html/style-iso.css +7 -2
  8. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +160 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +154 -4
  11. data/lib/isodoc/iso/html/wordstyle.css +150 -0
  12. data/lib/isodoc/iso/html/wordstyle.scss +144 -0
  13. data/lib/isodoc/iso/i18n-en.yaml +4 -4
  14. data/lib/isodoc/iso/iso.amendment.xsl +1649 -1199
  15. data/lib/isodoc/iso/iso.international-standard.xsl +1649 -1199
  16. data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
  17. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
  18. data/lib/isodoc/iso/word_convert.rb +6 -4
  19. data/lib/isodoc/iso/word_dis_cleanup.rb +30 -8
  20. data/lib/isodoc/iso/word_dis_convert.rb +5 -2
  21. data/lib/metanorma/iso/base.rb +2 -1
  22. data/lib/metanorma/iso/biblio.rng +5 -0
  23. data/lib/metanorma/iso/isodoc.rng +47 -13
  24. data/lib/metanorma/iso/validate.rb +2 -2
  25. data/lib/metanorma/iso/version.rb +1 -1
  26. data/metanorma-iso.gemspec +5 -2
  27. metadata +4 -87
  28. data/.github/workflows/automerge.yml +0 -31
  29. data/.github/workflows/rake.yml +0 -15
  30. data/.github/workflows/release.yml +0 -24
  31. data/.github/workflows/ubuntu.yml +0 -41
  32. data/Rakefile +0 -8
  33. data/bin/rspec +0 -17
  34. data/spec/assets/header.html +0 -7
  35. data/spec/assets/html.css +0 -2
  36. data/spec/assets/htmlcover.html +0 -4
  37. data/spec/assets/htmlintro.html +0 -5
  38. data/spec/assets/i18n.yaml +0 -2
  39. data/spec/assets/iso.adoc +0 -10
  40. data/spec/assets/iso.headless.html +0 -33
  41. data/spec/assets/iso.xml +0 -71
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +0 -3
  44. data/spec/assets/std.css +0 -2
  45. data/spec/assets/word.css +0 -2
  46. data/spec/assets/wordcover.html +0 -3
  47. data/spec/assets/wordintro.html +0 -4
  48. data/spec/examples/103_01_02.html +0 -247
  49. data/spec/examples/english.yaml +0 -69
  50. data/spec/examples/iso_123_.xml +0 -45
  51. data/spec/examples/iso_123_all_parts.xml +0 -45
  52. data/spec/examples/iso_123_no_year_note.xml +0 -46
  53. data/spec/examples/iso_124_.xml +0 -41
  54. data/spec/examples/iso_216_.xml +0 -47
  55. data/spec/examples/iso_iec_12382_.xml +0 -48
  56. data/spec/examples/rice.adoc +0 -714
  57. data/spec/examples/rice.preview.html +0 -1870
  58. data/spec/examples/rice.sh +0 -4
  59. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  60. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  61. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  62. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  63. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  64. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  65. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  66. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  67. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  68. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  69. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  70. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  71. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  72. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  73. data/spec/examples/rice_img/rice_image1.png +0 -0
  74. data/spec/examples/rice_img/rice_image2.png +0 -0
  75. data/spec/examples/rice_img/rice_image3_1.png +0 -0
  76. data/spec/examples/rice_img/rice_image3_2.png +0 -0
  77. data/spec/examples/rice_img/rice_image3_3.png +0 -0
  78. data/spec/isodoc/amd_spec.rb +0 -986
  79. data/spec/isodoc/blocks_spec.rb +0 -1174
  80. data/spec/isodoc/i18n_spec.rb +0 -1579
  81. data/spec/isodoc/inline_spec.rb +0 -1060
  82. data/spec/isodoc/iso_spec.rb +0 -255
  83. data/spec/isodoc/metadata_spec.rb +0 -701
  84. data/spec/isodoc/postproc_spec.rb +0 -1089
  85. data/spec/isodoc/ref_spec.rb +0 -439
  86. data/spec/isodoc/section_spec.rb +0 -998
  87. data/spec/isodoc/table_spec.rb +0 -420
  88. data/spec/isodoc/terms_spec.rb +0 -314
  89. data/spec/isodoc/word_dis_spec.rb +0 -2064
  90. data/spec/isodoc/xref_spec.rb +0 -1747
  91. data/spec/metanorma/amd_spec.rb +0 -724
  92. data/spec/metanorma/base_spec.rb +0 -1384
  93. data/spec/metanorma/blank_spec.rb +0 -38
  94. data/spec/metanorma/blocks_spec.rb +0 -624
  95. data/spec/metanorma/cleanup_spec.rb +0 -1645
  96. data/spec/metanorma/inline_spec.rb +0 -203
  97. data/spec/metanorma/lists_spec.rb +0 -197
  98. data/spec/metanorma/macros_spec.rb +0 -99
  99. data/spec/metanorma/processor_spec.rb +0 -161
  100. data/spec/metanorma/refs_spec.rb +0 -672
  101. data/spec/metanorma/section_spec.rb +0 -492
  102. data/spec/metanorma/table_spec.rb +0 -329
  103. data/spec/metanorma/validate_spec.rb +0 -2153
  104. data/spec/relaton/render_spec.rb +0 -568
  105. data/spec/requirements/requirement_components_spec.rb +0 -610
  106. data/spec/requirements/requirements_spec.rb +0 -1596
  107. data/spec/requirements/xref_spec.rb +0 -1211
  108. data/spec/spec_helper.rb +0 -313
  109. data/spec/vcr_cassettes/docrels.yml +0 -385
  110. data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,255 +0,0 @@
1
- require "spec_helper"
2
- require "fileutils"
3
-
4
- RSpec.describe IsoDoc::Iso do
5
- it "processes isodoc as ISO: HTML output" do
6
- IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", false)
7
- <iso-standard xmlns="http://riboseinc.com/isoxml">
8
- <preface>
9
- <foreword>
10
- <note>
11
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
12
- </note>
13
- </foreword>
14
- </preface>
15
- </iso-standard>
16
- INPUT
17
- html = File.read("test.html", encoding: "utf-8")
18
- expect(html)
19
- .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
20
- expect(html)
21
- .to match(%r[blockquote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
22
- expect(html)
23
- .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
24
- end
25
-
26
- it "processes isodoc as ISO: alt HTML output" do
27
- IsoDoc::Iso::HtmlConvert.new(alt: true).convert("test", <<~"INPUT", false)
28
- <iso-standard xmlns="http://riboseinc.com/isoxml">
29
- <preface>
30
- <foreword>
31
- <note>
32
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
33
- </note>
34
- </foreword>
35
- </preface>
36
- </iso-standard>
37
- INPUT
38
- html = File.read("test.html", encoding: "utf-8")
39
- expect(html)
40
- .to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
41
- expect(html)
42
- .to match(%r[blockquote[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
43
- expect(html)
44
- .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
45
- end
46
-
47
- it "processes isodoc as ISO: Chinese HTML output" do
48
- IsoDoc::Iso::HtmlConvert.new(script: "Hans")
49
- .convert("test", <<~"INPUT", false)
50
- <iso-standard xmlns="http://riboseinc.com/isoxml">
51
- <preface>
52
- <foreword>
53
- <note>
54
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
55
- </note>
56
- </foreword>
57
- </preface>
58
- </iso-standard>
59
- INPUT
60
- html = File.read("test.html", encoding: "utf-8")
61
- expect(html)
62
- .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
63
- expect(html)
64
- .to match(%r[blockquote[^{]+\{[^{]+font-family: "Source Han Sans", serif;]m)
65
- expect(html)
66
- .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Source Han Sans", sans-serif;]m)
67
- end
68
-
69
- it "processes isodoc as ISO: user nominated fonts" do
70
- IsoDoc::Iso::HtmlConvert.new(bodyfont: "Zapf Chancery",
71
- headerfont: "Comic Sans",
72
- monospacefont: "Andale Mono")
73
- .convert("test", <<~"INPUT", false)
74
- <iso-standard xmlns="http://riboseinc.com/isoxml">
75
- <preface>
76
- <foreword>
77
- <note>
78
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
79
- </note>
80
- </foreword>
81
- </preface>
82
- </iso-standard>
83
- INPUT
84
- html = File.read("test.html", encoding: "utf-8")
85
- expect(html)
86
- .to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
87
- expect(html)
88
- .to match(%r[blockquote[^{]+\{[^{]+font-family: Zapf Chancery;]m)
89
- expect(html)
90
- .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: Comic Sans;]m)
91
- end
92
-
93
- it "processes isodoc as ISO: Word output" do
94
- IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", false)
95
- <iso-standard xmlns="http://riboseinc.com/isoxml">
96
- <preface>
97
- <foreword>
98
- <note>
99
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
100
- </note>
101
- </foreword>
102
- </preface>
103
- </iso-standard>
104
- INPUT
105
- html = File.read("test.doc", encoding: "utf-8")
106
- expect(html)
107
- .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
108
- expect(html)
109
- .to match(%r[Quote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
110
- expect(html)
111
- .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
112
- end
113
-
114
- it "does not include IEV in references" do
115
- output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
116
- <iso-standard xmlns="http://riboseinc.com/isoxml">
117
- <preface>
118
- <foreword>
119
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
120
- <eref bibitemid="IEV">IEV</eref>
121
- <eref bibitemid="ISO20483">ISO 20483</eref>
122
- </p>
123
- </foreword>
124
- </preface>
125
- <bibliography>
126
- <references id="_normative_references" normative="true" obligation="informative">
127
- <title>1<tab/>
128
- Normative References</title>
129
- <bibitem id="IEV" type="international-standard">
130
- <title format="text/plain" language="en" script="Latn">Electropedia: The World's Online Electrotechnical Vocabulary</title>
131
- <uri type="src">http://www.electropedia.org</uri>
132
- <docidentifier>IEV</docidentifier>
133
- <contributor>
134
- <role type="publisher"/>
135
- <organization>
136
- <name>International Electrotechnical Commission</name>
137
- <abbreviation>IEC</abbreviation>
138
- <uri>www.iec.ch</uri>
139
- </organization>
140
- </contributor>
141
- <language>en</language>
142
- <language>fr</language>
143
- <script>Latn</script>
144
- <copyright>
145
- <owner>
146
- <organization>
147
- <name>International Electrotechnical Commission</name>
148
- <abbreviation>IEC</abbreviation>
149
- <uri>www.iec.ch</uri>
150
- </organization>
151
- </owner>
152
- </copyright>
153
- <relation type="updates">
154
- <bibitem>
155
- <formattedref>IEC 60050</formattedref>
156
- </bibitem>
157
- </relation>
158
- </bibitem>
159
- <bibitem id="ISO20483" type="standard">
160
- <formattedref format="text/plain"><em>Cereals and pulses</em></formattedref>
161
- <docidentifier>ISO 20483</docidentifier>
162
- <date type="published">
163
- <from>2013</from>
164
- <to>2014</to>
165
- </date>
166
- <contributor>
167
- <role type="publisher"/>
168
- <organization>
169
- <name>International Organization for Standardization</name>
170
- </organization>
171
- </contributor>
172
- </bibitem>
173
- </references>
174
- </bibliography>
175
- </iso-standard>
176
- INPUT
177
- expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
178
- #{HTML_HDR}
179
- <br/>
180
- <div>
181
- <h1 class="ForewordTitle">Foreword</h1>
182
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
183
- <a href="#IEV">IEV</a>
184
- <a href="#ISO20483">ISO 20483</a>
185
- </p>
186
- </div>
187
- <p class="zzSTDTitle1"/>
188
- <div>
189
- <h1>1&#160; Normative References</h1>
190
- <p id="ISO20483" class="NormRef">ISO 20483, <i>Cereals and pulses</i></p>
191
- </div>
192
- </div>
193
- </body>
194
- </html>
195
- OUTPUT
196
- end
197
-
198
- it "inserts identifiers for editorial group and approval group" do
199
- input = <<~INPUT
200
- <iso-standard xmlns="http://riboseinc.com/isoxml">
201
- <bibdata>
202
- <ext>
203
- <doctype>international-standard</doctype>
204
- <horizontal>true</horizontal>
205
- <editorialgroup>
206
- <agency>ISO</agency>
207
- <agency>IEC</agency>
208
- <technical-committee type="A" number="34">Food products</technical-committee>
209
- <subcommittee type="B" number="4">Cereals and pulses</subcommittee>
210
- <workgroup type="C" number="3">Rice Group</workgroup>
211
- <secretariat>GB</secretariat>
212
- </editorialgroup>
213
- <approvalgroup>
214
- <agency>ISO</agency>
215
- <technical-committee type="D" number="34a">Food products A</technical-committee>
216
- <subcommittee type="E" number="4a">Cereals and pulses A</subcommittee>
217
- <workgroup type="F" number="3a">Rice Group A</workgroup>
218
- </approvalgroup>
219
- <stagename>Committee draft</stagename>
220
- </ext>
221
- </bibdata>
222
- </iso-standard>
223
- INPUT
224
- presxml = <<~OUTPUT
225
- <bibdata>
226
- <ext>
227
- <doctype language=''>international-standard</doctype>
228
- <doctype language='en'>International Standard</doctype>
229
- <horizontal>true</horizontal>
230
- <editorialgroup identifier='ISO/IEC/A 34/B 4/C 3'>
231
- <agency>ISO</agency>
232
- <agency>IEC</agency>
233
- <technical-committee type='A' number='34'>Food products</technical-committee>
234
- <subcommittee type='B' number='4'>Cereals and pulses</subcommittee>
235
- <workgroup type='C' number='3'>Rice Group</workgroup>
236
- <secretariat>GB</secretariat>
237
- </editorialgroup>
238
- <approvalgroup identifier='ISO/D 34a/E 4a/F 3a'>
239
- <agency>ISO</agency>
240
- <technical-committee type='D' number='34a'>Food products A</technical-committee>
241
- <subcommittee type='E' number='4a'>Cereals and pulses A</subcommittee>
242
- <workgroup type='F' number='3a'>Rice Group A</workgroup>
243
- </approvalgroup>
244
- <stagename>Committee draft</stagename>
245
- </ext>
246
- </bibdata>
247
- OUTPUT
248
- expect(xmlpp(Nokogiri::XML(
249
- IsoDoc::Iso::PresentationXMLConvert.new({})
250
- .convert("test", input, true),
251
- )
252
- .at("//xmlns:bibdata").to_xml))
253
- .to be_equivalent_to xmlpp(presxml)
254
- end
255
- end