metanorma-iso 2.2.2 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) 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 +1 -2
  6. data/lib/isodoc/iso/html/style-human.scss +0 -1
  7. data/lib/isodoc/iso/html/style-iso.css +1 -2
  8. data/lib/isodoc/iso/html/style-iso.scss +0 -1
  9. data/lib/isodoc/iso/html/wordstyle-dis.css +10 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.scss +10 -4
  11. data/lib/isodoc/iso/i18n-en.yaml +4 -4
  12. data/lib/isodoc/iso/iso.amendment.xsl +205 -37
  13. data/lib/isodoc/iso/iso.international-standard.xsl +205 -37
  14. data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
  15. data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
  16. data/lib/isodoc/iso/word_convert.rb +6 -4
  17. data/lib/isodoc/iso/word_dis_cleanup.rb +24 -3
  18. data/lib/isodoc/iso/word_dis_convert.rb +4 -1
  19. data/lib/metanorma/iso/base.rb +2 -1
  20. data/lib/metanorma/iso/biblio.rng +5 -0
  21. data/lib/metanorma/iso/isodoc.rng +46 -12
  22. data/lib/metanorma/iso/version.rb +1 -1
  23. data/metanorma-iso.gemspec +5 -2
  24. metadata +4 -87
  25. data/.github/workflows/automerge.yml +0 -31
  26. data/.github/workflows/rake.yml +0 -15
  27. data/.github/workflows/release.yml +0 -24
  28. data/.github/workflows/ubuntu.yml +0 -41
  29. data/Rakefile +0 -8
  30. data/bin/rspec +0 -17
  31. data/spec/assets/header.html +0 -7
  32. data/spec/assets/html.css +0 -2
  33. data/spec/assets/htmlcover.html +0 -4
  34. data/spec/assets/htmlintro.html +0 -5
  35. data/spec/assets/i18n.yaml +0 -2
  36. data/spec/assets/iso.adoc +0 -10
  37. data/spec/assets/iso.headless.html +0 -33
  38. data/spec/assets/iso.xml +0 -71
  39. data/spec/assets/rice_image1.png +0 -0
  40. data/spec/assets/scripts.html +0 -3
  41. data/spec/assets/std.css +0 -2
  42. data/spec/assets/word.css +0 -2
  43. data/spec/assets/wordcover.html +0 -3
  44. data/spec/assets/wordintro.html +0 -4
  45. data/spec/examples/103_01_02.html +0 -247
  46. data/spec/examples/english.yaml +0 -69
  47. data/spec/examples/iso_123_.xml +0 -45
  48. data/spec/examples/iso_123_all_parts.xml +0 -45
  49. data/spec/examples/iso_123_no_year_note.xml +0 -46
  50. data/spec/examples/iso_124_.xml +0 -41
  51. data/spec/examples/iso_216_.xml +0 -47
  52. data/spec/examples/iso_iec_12382_.xml +0 -48
  53. data/spec/examples/rice.adoc +0 -714
  54. data/spec/examples/rice.preview.html +0 -1870
  55. data/spec/examples/rice.sh +0 -4
  56. data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
  57. data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
  58. data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
  59. data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
  60. data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
  61. data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
  62. data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
  63. data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
  64. data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
  65. data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
  66. data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
  67. data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
  68. data/spec/examples/rice_img/ISO_1213_1.png +0 -0
  69. data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
  70. data/spec/examples/rice_img/rice_image1.png +0 -0
  71. data/spec/examples/rice_img/rice_image2.png +0 -0
  72. data/spec/examples/rice_img/rice_image3_1.png +0 -0
  73. data/spec/examples/rice_img/rice_image3_2.png +0 -0
  74. data/spec/examples/rice_img/rice_image3_3.png +0 -0
  75. data/spec/isodoc/amd_spec.rb +0 -986
  76. data/spec/isodoc/blocks_spec.rb +0 -1174
  77. data/spec/isodoc/i18n_spec.rb +0 -1579
  78. data/spec/isodoc/inline_spec.rb +0 -1060
  79. data/spec/isodoc/iso_spec.rb +0 -255
  80. data/spec/isodoc/metadata_spec.rb +0 -701
  81. data/spec/isodoc/postproc_spec.rb +0 -1089
  82. data/spec/isodoc/ref_spec.rb +0 -439
  83. data/spec/isodoc/section_spec.rb +0 -998
  84. data/spec/isodoc/table_spec.rb +0 -420
  85. data/spec/isodoc/terms_spec.rb +0 -314
  86. data/spec/isodoc/word_dis_spec.rb +0 -2064
  87. data/spec/isodoc/xref_spec.rb +0 -1747
  88. data/spec/metanorma/amd_spec.rb +0 -724
  89. data/spec/metanorma/base_spec.rb +0 -1384
  90. data/spec/metanorma/blank_spec.rb +0 -38
  91. data/spec/metanorma/blocks_spec.rb +0 -624
  92. data/spec/metanorma/cleanup_spec.rb +0 -1645
  93. data/spec/metanorma/inline_spec.rb +0 -203
  94. data/spec/metanorma/lists_spec.rb +0 -197
  95. data/spec/metanorma/macros_spec.rb +0 -99
  96. data/spec/metanorma/processor_spec.rb +0 -161
  97. data/spec/metanorma/refs_spec.rb +0 -672
  98. data/spec/metanorma/section_spec.rb +0 -492
  99. data/spec/metanorma/table_spec.rb +0 -329
  100. data/spec/metanorma/validate_spec.rb +0 -2153
  101. data/spec/relaton/render_spec.rb +0 -568
  102. data/spec/requirements/requirement_components_spec.rb +0 -610
  103. data/spec/requirements/requirements_spec.rb +0 -1596
  104. data/spec/requirements/xref_spec.rb +0 -1211
  105. data/spec/spec_helper.rb +0 -313
  106. data/spec/vcr_cassettes/docrels.yml +0 -385
  107. data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,329 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe Metanorma::ISO do
4
- it "processes basic tables" do
5
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
- #{ASCIIDOC_BLANK_HDR}
7
- .Table Name
8
- |===
9
- |A |B |C
10
-
11
- h|1 |2 |3
12
- |===
13
- INPUT
14
- #{BLANK_HDR}
15
- <sections>
16
- <table id="_">
17
- <name>Table Name</name>
18
- <thead>
19
- <tr>
20
- <th align="left" valign="top">A</th>
21
- <th align="left" valign="top">B</th>
22
- <th align="left" valign="top">C</th>
23
- </tr>
24
- </thead>
25
- <tbody>
26
- <tr>
27
- <th align="left" valign="top">1</th>
28
- <td align="left" valign="top">2</td>
29
- <td align="left" valign="top">3</td>
30
- </tr>
31
- </tbody>
32
- </table>
33
- </sections>
34
- </iso-standard>
35
- OUTPUT
36
- end
37
-
38
- it "inserts header rows in a table with a name and no header" do
39
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
40
- #{ASCIIDOC_BLANK_HDR}
41
- [headerrows=2]
42
- .Table Name
43
- |===
44
- |A |B |C
45
- h|1 |2 |3
46
- h|1 |2 |3
47
- |===
48
- INPUT
49
- #{BLANK_HDR}
50
- <sections>
51
- <table id="_">
52
- <name>Table Name</name>
53
- <thead>
54
- <tr>
55
- <th align="left" valign="top">A</th>
56
- <th align="left" valign="top">B</th>
57
- <th align="left" valign="top">C</th>
58
- </tr>
59
- <tr>
60
- <th align="left" valign="top">1</th>
61
- <th align="left" valign="top">2</th>
62
- <th align="left" valign="top">3</th>
63
- </tr>
64
- </thead>
65
- <tbody>
66
- <tr>
67
- <th align="left" valign="top">1</th>
68
- <td align="left" valign="top">2</td>
69
- <td align="left" valign="top">3</td>
70
- </tr>
71
- </tbody>
72
- </table>
73
- </sections>
74
- </iso-standard>
75
- OUTPUT
76
- end
77
-
78
- it "inserts header rows in a table without a name and no header" do
79
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
80
- #{ASCIIDOC_BLANK_HDR}
81
- [headerrows=2]
82
- |===
83
- |A |B |C
84
- h|1 |2 |3
85
- h|1 |2 |3
86
- |===
87
- INPUT
88
- #{BLANK_HDR}
89
- <sections>
90
- <table id="_">
91
- <thead>
92
- <tr>
93
- <th align="left" valign="top">A</th>
94
- <th align="left" valign="top">B</th>
95
- <th align="left" valign="top">C</th>
96
- </tr>
97
- <tr>
98
- <th align="left" valign="top">1</th>
99
- <th align="left" valign="top">2</th>
100
- <th align="left" valign="top">3</th>
101
- </tr>
102
- </thead>
103
- <tbody>
104
- <tr>
105
- <th align="left" valign="top">1</th>
106
- <td align="left" valign="top">2</td>
107
- <td align="left" valign="top">3</td>
108
- </tr>
109
- </tbody>
110
- </table>
111
- </sections>
112
- </iso-standard>
113
- OUTPUT
114
- end
115
-
116
- it "processes complex tables" do
117
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
118
- #{ASCIIDOC_BLANK_HDR}
119
- [cols="<,^,^,^,^",options="header,footer",headerrows=2]
120
- .Maximum permissible mass fraction of defects
121
- |===
122
- .2+|Defect 4+^| Maximum permissible mass fraction of defects in husked rice +
123
- stem:[w_max]
124
- | in husked rice | in milled rice (non-glutinous) | in husked parboiled rice | in milled parboiled rice
125
-
126
- | Extraneous matter: organic footnote:[Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.] | 1,0 | 0,5 | 1,0 | 0,5
127
- // not rendered list here
128
- | Extraneous matter: inorganic footnote:[Inorganic extraneous matter includes stones, sand, dust, etc.] | 0,5 | 0,5 | 0,5 | 0,5
129
- | Paddy | 2,5 | 0,3 | 2,5 | 0,3
130
- | Husked rice, non-parboiled | Not applicable | 1,0 | 1,0 | 1,0
131
- | Milled rice, non-parboiled | 1,0 | Not applicable | 1,0 | 1,0
132
- | Husked rice, parboiled | 1,0 | 1,0 | Not applicable | 1,0
133
- | Milled rice, parboiled | 1,0 | 1,0 | 1,0 | Not applicable
134
- | Chips | 0,1 | 0,1 | 0,1 | 0,1
135
- | HDK | 2,0 footnote:defectsmass[The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnote:defectsmass[] | 2,0
136
- | Damaged kernels | 4,0 | 3,0 | 4,0 | 3,0
137
- | Immature and/or malformed kernels | 8,0 | 2,0 | 8,0 | 2,0
138
- | Chalky kernels | 5,0 footnote:defectsmass[] | 5,0 | Not applicable | Not applicable
139
- | Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnote:defectsmass[] | 12,0
140
- | Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnote:defectsmass[] | 11,0
141
- | Pecks | Not applicable | Not applicable | 4,0 | 2,0
142
- | Waxy rice | 1,0 footnote:defectsmass[] | 1,0 | 1,0 footnote:defectsmass[] | 1,0
143
-
144
- 5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
145
- |===
146
- INPUT
147
- #{BLANK_HDR}
148
- <sections>
149
- <table id="_">
150
- <name>Maximum permissible mass fraction of defects</name>
151
- <thead>
152
- <tr>
153
- <th align="left" rowspan="2" valign="top">Defect</th>
154
- <th align="center" colspan="4" valign="top">Maximum permissible mass fraction of defects in husked rice
155
- <br/>
156
- <stem type="MathML">
157
- <math xmlns="http://www.w3.org/1998/Math/MathML">
158
- <msub>
159
- <mrow>
160
- <mi>w</mi></mrow>
161
- <mrow>
162
- <mo>max</mo>
163
- </mrow>
164
- </msub>
165
- </math>
166
- </stem>
167
- </th>
168
- </tr>
169
- <tr>
170
- <th align="left" valign="top">in husked rice</th>
171
- <th align="center" valign="top">in milled rice (non-glutinous)</th>
172
- <th align="center" valign="top">in husked parboiled rice</th>
173
- <th align="center" valign="top">in milled parboiled rice</th>
174
- </tr>
175
- </thead>
176
- <tbody>
177
- <tr>
178
- <td align="left" valign="top">Extraneous matter: organic
179
- <fn reference="a">
180
- <p id="_">Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.</p></fn>
181
- </td>
182
- <td align="center" valign="top">1,0</td>
183
- <td align="center" valign="top">0,5</td>
184
- <td align="center" valign="top">1,0</td>
185
- <td align="center" valign="top">0,5</td>
186
- </tr>
187
- <tr>
188
- <td align="left" valign="top">Extraneous matter: inorganic
189
- <fn reference="b">
190
- <p id="_">Inorganic extraneous matter includes stones, sand, dust, etc.</p></fn>
191
- </td>
192
- <td align="center" valign="top">0,5</td>
193
- <td align="center" valign="top">0,5</td>
194
- <td align="center" valign="top">0,5</td>
195
- <td align="center" valign="top">0,5</td>
196
- </tr>
197
- <tr>
198
- <td align="left" valign="top">Paddy</td>
199
- <td align="center" valign="top">2,5</td>
200
- <td align="center" valign="top">0,3</td>
201
- <td align="center" valign="top">2,5</td>
202
- <td align="center" valign="top">0,3</td>
203
- </tr>
204
- <tr>
205
- <td align="left" valign="top">Husked rice, non-parboiled</td>
206
- <td align="center" valign="top">Not applicable</td>
207
- <td align="center" valign="top">1,0</td>
208
- <td align="center" valign="top">1,0</td>
209
- <td align="center" valign="top">1,0</td>
210
- </tr>
211
- <tr>
212
- <td align="left" valign="top">Milled rice, non-parboiled</td>
213
- <td align="center" valign="top">1,0</td>
214
- <td align="center" valign="top">Not applicable</td>
215
- <td align="center" valign="top">1,0</td>
216
- <td align="center" valign="top">1,0</td>
217
- </tr>
218
- <tr>
219
- <td align="left" valign="top">Husked rice, parboiled</td>
220
- <td align="center" valign="top">1,0</td>
221
- <td align="center" valign="top">1,0</td>
222
- <td align="center" valign="top">Not applicable</td>
223
- <td align="center" valign="top">1,0</td>
224
- </tr>
225
- <tr>
226
- <td align="left" valign="top">Milled rice, parboiled</td>
227
- <td align="center" valign="top">1,0</td>
228
- <td align="center" valign="top">1,0</td>
229
- <td align="center" valign="top">1,0</td>
230
- <td align="center" valign="top">Not applicable</td>
231
- </tr>
232
- <tr>
233
- <td align="left" valign="top">Chips</td>
234
- <td align="center" valign="top">0,1</td>
235
- <td align="center" valign="top">0,1</td>
236
- <td align="center" valign="top">0,1</td>
237
- <td align="center" valign="top">0,1</td>
238
- </tr>
239
- <tr>
240
- <td align="left" valign="top">HDK</td>
241
- <td align="center" valign="top">2,0
242
- <fn reference="c">
243
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
244
- </td>
245
- <td align="center" valign="top">2,0</td>
246
- <td align="center" valign="top">2,0
247
- <fn reference="c">
248
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
249
- </td>
250
- <td align="center" valign="top">2,0</td>
251
- </tr>
252
- <tr>
253
- <td align="left" valign="top">Damaged kernels</td>
254
- <td align="center" valign="top">4,0</td>
255
- <td align="center" valign="top">3,0</td>
256
- <td align="center" valign="top">4,0</td>
257
- <td align="center" valign="top">3,0</td>
258
- </tr>
259
- <tr>
260
- <td align="left" valign="top">Immature and/or malformed kernels</td>
261
- <td align="center" valign="top">8,0</td>
262
- <td align="center" valign="top">2,0</td>
263
- <td align="center" valign="top">8,0</td>
264
- <td align="center" valign="top">2,0</td>
265
- </tr>
266
- <tr>
267
- <td align="left" valign="top">Chalky kernels</td>
268
- <td align="center" valign="top">5,0
269
- <fn reference="c">
270
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
271
- </td>
272
- <td align="center" valign="top">5,0</td>
273
- <td align="center" valign="top">Not applicable</td>
274
- <td align="center" valign="top">Not applicable</td>
275
- </tr>
276
- <tr>
277
- <td align="left" valign="top">Red kernels and red-streaked kernels</td>
278
- <td align="center" valign="top">12,0</td>
279
- <td align="center" valign="top">12,0</td>
280
- <td align="center" valign="top">12,0
281
- <fn reference="c">
282
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
283
- </td>
284
- <td align="center" valign="top">12,0</td>
285
- </tr>
286
- <tr>
287
- <td align="left" valign="top">Partly gelatinized kernels</td>
288
- <td align="center" valign="top">Not applicable</td>
289
- <td align="center" valign="top">Not applicable</td>
290
- <td align="center" valign="top">11,0
291
- <fn reference="c">
292
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
293
- </td>
294
- <td align="center" valign="top">11,0</td>
295
- </tr>
296
- <tr>
297
- <td align="left" valign="top">Pecks</td>
298
- <td align="center" valign="top">Not applicable</td>
299
- <td align="center" valign="top">Not applicable</td>
300
- <td align="center" valign="top">4,0</td>
301
- <td align="center" valign="top">2,0</td>
302
- </tr>
303
- <tr>
304
- <td align="left" valign="top">Waxy rice</td>
305
- <td align="center" valign="top">1,0
306
- <fn reference="c">
307
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
308
- </td>
309
- <td align="center" valign="top">1,0</td>
310
- <td align="center" valign="top">1,0
311
- <fn reference="c">
312
- <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p></fn>
313
- </td>
314
- <td align="center" valign="top">1,0</td>
315
- </tr>
316
- </tbody>
317
- <tfoot>
318
- <tr>
319
- <td align="left" colspan="5" valign="top">
320
- <p id="_">Live insects shall not be present. Dead insects shall be included in extraneous matter.</p>
321
- </td>
322
- </tr>
323
- </tfoot>
324
- </table>
325
- </sections>
326
- </iso-standard>
327
- OUTPUT
328
- end
329
- end