metanorma-iso 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +4 -0
  3. data/.gitignore +11 -0
  4. data/.hound.yml +3 -0
  5. data/.oss-guides.rubocop.yml +1077 -0
  6. data/.rubocop.ribose.yml +66 -0
  7. data/.rubocop.tb.yml +650 -0
  8. data/.rubocop.yml +15 -0
  9. data/.travis.yml +21 -0
  10. data/CODE_OF_CONDUCT.md +46 -0
  11. data/Gemfile +7 -0
  12. data/LICENSE +25 -0
  13. data/Makefile +39 -0
  14. data/README.adoc +882 -0
  15. data/Rakefile +6 -0
  16. data/asciidoctor-iso.gemspec.old +50 -0
  17. data/bin/rspec +18 -0
  18. data/docs/customisation.adoc +186 -0
  19. data/docs/guidance.adoc +436 -0
  20. data/docs/htmloutput.adoc +115 -0
  21. data/docs/quickstart.adoc +375 -0
  22. data/lib/asciidoctor-iso.rb +11 -0
  23. data/lib/asciidoctor/iso/base.rb +48 -0
  24. data/lib/asciidoctor/iso/biblio.rng +836 -0
  25. data/lib/asciidoctor/iso/cleanup.rb +39 -0
  26. data/lib/asciidoctor/iso/converter.rb +19 -0
  27. data/lib/asciidoctor/iso/front.rb +131 -0
  28. data/lib/asciidoctor/iso/isodoc.rng +1059 -0
  29. data/lib/asciidoctor/iso/isostandard.rnc +176 -0
  30. data/lib/asciidoctor/iso/isostandard.rng +1001 -0
  31. data/lib/asciidoctor/iso/section.rb +72 -0
  32. data/lib/asciidoctor/iso/validate.rb +190 -0
  33. data/lib/asciidoctor/iso/validate_requirements.rb +105 -0
  34. data/lib/asciidoctor/iso/validate_section.rb +214 -0
  35. data/lib/asciidoctor/iso/validate_style.rb +134 -0
  36. data/lib/asciidoctor/iso/version.rb +5 -0
  37. data/lib/isodoc/iso/html/header.html +206 -0
  38. data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
  39. data/lib/isodoc/iso/html/html_iso_titlepage.html +34 -0
  40. data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
  41. data/lib/isodoc/iso/html/isodoc.scss +696 -0
  42. data/lib/isodoc/iso/html/scripts.html +174 -0
  43. data/lib/isodoc/iso/html/style-human.scss +1277 -0
  44. data/lib/isodoc/iso/html/style-iso.scss +1257 -0
  45. data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
  46. data/lib/isodoc/iso/html/word_iso_titlepage.html +62 -0
  47. data/lib/isodoc/iso/html/wordstyle.scss +1175 -0
  48. data/lib/isodoc/iso/html_convert.rb +118 -0
  49. data/lib/isodoc/iso/metadata.rb +107 -0
  50. data/lib/isodoc/iso/word_convert.rb +141 -0
  51. data/lib/metanorma/iso.rb +7 -0
  52. data/lib/metanorma/iso/processor.rb +44 -0
  53. data/spec/asciidoctor-iso/base_spec.rb +350 -0
  54. data/spec/asciidoctor-iso/blocks_spec.rb +469 -0
  55. data/spec/asciidoctor-iso/cleanup_spec.rb +765 -0
  56. data/spec/asciidoctor-iso/inline_spec.rb +162 -0
  57. data/spec/asciidoctor-iso/isobib_cache_spec.rb +332 -0
  58. data/spec/asciidoctor-iso/lists_spec.rb +190 -0
  59. data/spec/asciidoctor-iso/macros_spec.rb +111 -0
  60. data/spec/asciidoctor-iso/refs_spec.rb +643 -0
  61. data/spec/asciidoctor-iso/section_spec.rb +334 -0
  62. data/spec/asciidoctor-iso/table_spec.rb +307 -0
  63. data/spec/asciidoctor-iso/validate_spec.rb +907 -0
  64. data/spec/assets/header.html +7 -0
  65. data/spec/assets/html.css +2 -0
  66. data/spec/assets/htmlcover.html +4 -0
  67. data/spec/assets/htmlintro.html +5 -0
  68. data/spec/assets/i18n.yaml +2 -0
  69. data/spec/assets/iso.doc +1093 -0
  70. data/spec/assets/iso.headless.html +33 -0
  71. data/spec/assets/iso.html +278 -0
  72. data/spec/assets/iso.xml +8 -0
  73. data/spec/assets/rice_image1.png +0 -0
  74. data/spec/assets/scripts.html +3 -0
  75. data/spec/assets/std.css +2 -0
  76. data/spec/assets/word.css +2 -0
  77. data/spec/assets/wordcover.html +3 -0
  78. data/spec/assets/wordintro.html +4 -0
  79. data/spec/examples/103_01_02.html +247 -0
  80. data/spec/examples/english.yaml +69 -0
  81. data/spec/examples/iso_123_.xml +45 -0
  82. data/spec/examples/iso_123_all_parts.xml +45 -0
  83. data/spec/examples/iso_123_no_year_note.xml +46 -0
  84. data/spec/examples/iso_124_.xml +41 -0
  85. data/spec/examples/iso_216_.xml +47 -0
  86. data/spec/examples/iso_iec_12382_.xml +48 -0
  87. data/spec/examples/rice.adoc +715 -0
  88. data/spec/examples/rice.preview.html +1877 -0
  89. data/spec/examples/rice.sh +4 -0
  90. data/spec/examples/rice_images/rice_image1.png +0 -0
  91. data/spec/examples/rice_images/rice_image2.png +0 -0
  92. data/spec/examples/rice_images/rice_image3_1.png +0 -0
  93. data/spec/examples/rice_images/rice_image3_2.png +0 -0
  94. data/spec/examples/rice_images/rice_image3_3.png +0 -0
  95. data/spec/isodoc/i18n_spec.rb +642 -0
  96. data/spec/isodoc/iso_spec.rb +168 -0
  97. data/spec/isodoc/metadata_spec.rb +152 -0
  98. data/spec/isodoc/postproc_spec.rb +405 -0
  99. data/spec/isodoc/section_spec.rb +522 -0
  100. data/spec/isodoc/xref_spec.rb +1337 -0
  101. data/spec/metanorma/processor_spec.rb +70 -0
  102. data/spec/spec_helper.rb +227 -0
  103. metadata +402 -0
@@ -0,0 +1,334 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Asciidoctor::ISO do
4
+ it "processes sections" do
5
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
6
+ #{ASCIIDOC_BLANK_HDR}
7
+ .Foreword
8
+
9
+ Text
10
+
11
+ == Introduction
12
+
13
+ === Introduction Subsection
14
+
15
+ === Patent Notice
16
+
17
+ == Scope
18
+
19
+ Text
20
+
21
+ == Normative References
22
+
23
+ == Terms and Definitions
24
+
25
+ === Term1
26
+
27
+ == Terms, Definitions, Symbols and Abbreviated Terms
28
+
29
+ === Normal Terms
30
+
31
+ ==== Term2
32
+
33
+ === Symbols and Abbreviated Terms
34
+
35
+ == Symbols and Abbreviated Terms
36
+
37
+ == Clause 4
38
+
39
+ === Introduction
40
+
41
+ === Clause 4.2
42
+
43
+ [appendix]
44
+ == Annex
45
+
46
+ === Annex A.1
47
+
48
+ [%appendix]
49
+ === Appendix 1
50
+
51
+ == Bibliography
52
+
53
+ === Bibliography Subsection
54
+ INPUT
55
+ #{BLANK_HDR}
56
+ <preface><foreword obligation="informative">
57
+ <title>Foreword</title>
58
+ <p id="_">Text</p>
59
+ </foreword><introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
60
+ <title>Introduction Subsection</title>
61
+ </clause>
62
+ </introduction></preface><sections>
63
+ <clause id="_" obligation="normative">
64
+ <title>Scope</title>
65
+ <p id="_">Text</p>
66
+ </clause>
67
+
68
+ <terms id="_" obligation="normative">
69
+ <title>Terms and definitions</title>
70
+ <term id="_">
71
+ <preferred>Term1</preferred>
72
+ </term>
73
+ </terms>
74
+ <clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
75
+ <title>Normal Terms</title>
76
+ <term id="_">
77
+ <preferred>Term2</preferred>
78
+ </term>
79
+ </terms>
80
+ <definitions id="_"/></clause>
81
+ <definitions id="_"/>
82
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
83
+ <title>Introduction</title>
84
+ </clause>
85
+ <clause id="_" inline-header="false" obligation="normative">
86
+ <title>Clause 4.2</title>
87
+ </clause></clause>
88
+
89
+ </sections><annex id="_" inline-header="false" obligation="normative">
90
+ <title>Annex</title>
91
+ <clause id="_" inline-header="false" obligation="normative">
92
+ <title>Annex A.1</title>
93
+ </clause>
94
+ <appendix id="_" inline-header="false" obligation="normative">
95
+ <title>Appendix 1</title>
96
+ </appendix></annex><bibliography><references id="_" obligation="informative">
97
+ <title>Normative References</title>
98
+ </references><clause id="_" obligation="informative">
99
+ <title>Bibliography</title>
100
+ <references id="_" obligation="informative">
101
+ <title>Bibliography Subsection</title>
102
+ </references>
103
+ </clause>
104
+ </bibliography>
105
+ </iso-standard>
106
+ OUTPUT
107
+ end
108
+
109
+ it "processes sections with title attributes" do
110
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
111
+ #{ASCIIDOC_BLANK_HDR}
112
+ .Foreword
113
+
114
+ Text
115
+
116
+ [heading=introduction]
117
+ == Εισαγωγή
118
+
119
+ === Introduction Subsection
120
+
121
+ === Patent Notice
122
+
123
+ [heading=scope]
124
+ == Σκοπός
125
+
126
+ Text
127
+
128
+ [heading=normative references]
129
+ == Κανονιστικές Παραπομπές
130
+
131
+ [heading=terms and definitions]
132
+ == Όροι και Ορισμοί
133
+
134
+ === Term1
135
+
136
+ [heading="terms, definitions, symbols and abbreviated terms"]
137
+ == Όροι, Ορισμοί, Σύμβολα και Συντομογραφίες
138
+
139
+ === Normal Terms
140
+
141
+ ==== Term2
142
+
143
+ [heading=symbols and abbreviated terms]
144
+ === Σύμβολα και Συντομογραφίες
145
+
146
+ [heading=symbols and abbreviated terms]
147
+ == Σύμβολα και Συντομογραφίες
148
+
149
+ == Clause 4
150
+
151
+ === Introduction
152
+
153
+ === Clause 4.2
154
+
155
+ [appendix]
156
+ == Annex
157
+
158
+ === Annex A.1
159
+
160
+ [%appendix]
161
+ === Appendx 1
162
+
163
+ [heading=bibliography]
164
+ == Βιβλιογραφία
165
+
166
+ === Bibliography Subsection
167
+ INPUT
168
+ #{BLANK_HDR}
169
+ <preface>
170
+ <foreword obligation="informative">
171
+ <title>Foreword</title>
172
+ <p id="_">Text</p>
173
+ </foreword>
174
+ <introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
175
+ <title>Introduction Subsection</title>
176
+ </clause>
177
+ </introduction>
178
+ </preface>
179
+ <sections>
180
+ <clause id="_" obligation="normative">
181
+ <title>Scope</title>
182
+ <p id="_">Text</p>
183
+ </clause>
184
+
185
+ <terms id="_" obligation="normative">
186
+ <title>Terms and definitions</title>
187
+ <term id="_">
188
+ <preferred>Term1</preferred>
189
+ </term>
190
+ </terms>
191
+ <clause id="_" obligation="normative"><title>Terms and definitions</title><terms id="_" obligation="normative">
192
+ <title>Normal Terms</title>
193
+ <term id="_">
194
+ <preferred>Term2</preferred>
195
+ </term>
196
+ </clause>
197
+ <definitions id="_"/></terms>
198
+ <definitions id="_"/>
199
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
200
+ <title>Introduction</title>
201
+ </clause>
202
+ <clause id="_" inline-header="false" obligation="normative">
203
+ <title>Clause 4.2</title>
204
+ </clause></clause>
205
+
206
+ </sections><annex id="_" inline-header="false" obligation="normative">
207
+ <title>Annex</title>
208
+ <clause id="_" inline-header="false" obligation="normative">
209
+ <title>Annex A.1</title>
210
+ </clause>
211
+ <appendix id="_" inline-header="false" obligation="normative">
212
+ <title>Appendx 1</title>
213
+ </appendix></annex><bibliography><references id="_" obligation="informative">
214
+ <title>Normative References</title>
215
+ </references><clause id="_" obligation="informative">
216
+ <title>Bibliography</title>
217
+ <references id="_" obligation="informative">
218
+ <title>Bibliography Subsection</title>
219
+ </references>
220
+ </clause>
221
+ </bibliography>
222
+ </iso-standard>
223
+ OUTPUT
224
+ end
225
+
226
+ it "processes section obligations" do
227
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
228
+ #{ASCIIDOC_BLANK_HDR}
229
+ [obligation=informative]
230
+ == Clause 1
231
+
232
+ === Clause 1a
233
+
234
+ [obligation=normative]
235
+ == Clause 2
236
+
237
+ [appendix,obligation=informative]
238
+ == Annex
239
+ INPUT
240
+ #{BLANK_HDR}
241
+ <sections><clause id="_" inline-header="false" obligation="informative">
242
+ <title>Clause 1</title>
243
+ <clause id="_" inline-header="false" obligation="informative">
244
+ <title>Clause 1a</title>
245
+ </clause>
246
+ </clause>
247
+ <clause id="_" inline-header="false" obligation="normative">
248
+ <title>Clause 2</title>
249
+ </clause>
250
+ </sections><annex id="_" inline-header="false" obligation="informative">
251
+ <title>Annex</title>
252
+ </annex>
253
+ </iso-standard>
254
+ OUTPUT
255
+ end
256
+
257
+ it "processes inline headers" do
258
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
259
+ #{ASCIIDOC_BLANK_HDR}
260
+ == Clause 1
261
+
262
+ [%inline-header]
263
+ === Clause 1a
264
+
265
+ [appendix]
266
+ == Annex A
267
+
268
+ [%inline-header]
269
+ === Clause Aa
270
+ INPUT
271
+ #{BLANK_HDR}
272
+ <sections><clause id="_" inline-header="false" obligation="normative">
273
+ <title>Clause 1</title>
274
+ <clause id="_" inline-header="true" obligation="normative">
275
+ <title>Clause 1a</title>
276
+ </clause>
277
+ </clause>
278
+ </sections><annex id="_" inline-header="false" obligation="normative">
279
+ <title>Annex A</title>
280
+ <clause id="_" inline-header="true" obligation="normative">
281
+ <title>Clause Aa</title>
282
+ </clause>
283
+ </annex>
284
+ </iso-standard>
285
+ OUTPUT
286
+ end
287
+
288
+ it "processes blank headers" do
289
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
290
+ #{ASCIIDOC_BLANK_HDR}
291
+ == Clause 1
292
+
293
+ === {blank}
294
+
295
+ INPUT
296
+ #{BLANK_HDR}
297
+ <sections>
298
+ <clause id="_" inline-header="false" obligation="normative">
299
+ <title>Clause 1</title>
300
+ <clause id="_" inline-header="false" obligation="normative">
301
+ </clause>
302
+ </clause>
303
+ </sections>
304
+ </iso-standard>
305
+ OUTPUT
306
+ end
307
+
308
+ it "processes term document sources" do
309
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
310
+ #{ASCIIDOC_BLANK_HDR}
311
+
312
+ Foreword
313
+
314
+ [source="iso1234,iso5678"]
315
+ == Terms and Definitions
316
+
317
+ INPUT
318
+ #{BLANK_HDR}
319
+ <termdocsource bibitemid="iso1234" type="inline"/><termdocsource bibitemid="iso5678" type="inline"/>
320
+ <preface><foreword obligation="informative">
321
+ <title>Foreword</title>
322
+ <p id="_">Foreword</p>
323
+ </foreword></preface><sections>
324
+ <terms id="_" obligation="normative">
325
+ <title>Terms and definitions</title>
326
+
327
+
328
+ </terms></sections>
329
+ </iso-standard>
330
+
331
+ OUTPUT
332
+ end
333
+
334
+ end
@@ -0,0 +1,307 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Asciidoctor::ISO do
4
+ it "processes basic tables" do
5
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"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">A</th>
21
+ <th align="left">B</th>
22
+ <th align="left">C</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <tr>
27
+ <th align="left">1</th>
28
+ <td align="left">2</td>
29
+ <td align="left">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(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"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><tr>
54
+ <td align="left">A</td>
55
+ <td align="left">B</td>
56
+ <td align="left">C</td>
57
+ </tr><tr>
58
+ <th align="left">1</th>
59
+ <td align="left">2</td>
60
+ <td align="left">3</td>
61
+ </tr></thead>
62
+ <tbody>
63
+
64
+
65
+ <tr>
66
+ <th align="left">1</th>
67
+ <td align="left">2</td>
68
+ <td align="left">3</td>
69
+ </tr>
70
+ </tbody>
71
+ </table>
72
+ </sections>
73
+ </iso-standard>
74
+ OUTPUT
75
+ end
76
+
77
+
78
+ it "inserts header rows in a table without a name and no header" do
79
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"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="_"><thead><tr>
91
+ <td align="left">A</td>
92
+ <td align="left">B</td>
93
+ <td align="left">C</td>
94
+ </tr><tr>
95
+ <th align="left">1</th>
96
+ <td align="left">2</td>
97
+ <td align="left">3</td>
98
+ </tr></thead>
99
+ <tbody>
100
+
101
+
102
+ <tr>
103
+ <th align="left">1</th>
104
+ <td align="left">2</td>
105
+ <td align="left">3</td>
106
+ </tr>
107
+ </tbody>
108
+ </table>
109
+ </sections>
110
+ </iso-standard>
111
+ OUTPUT
112
+ end
113
+
114
+ it "processes complex tables" do
115
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
116
+ #{ASCIIDOC_BLANK_HDR}
117
+ [cols="<,^,^,^,^",options="header,footer",headerrows=2]
118
+ .Maximum permissible mass fraction of defects
119
+ |===
120
+ .2+|Defect 4+^| Maximum permissible mass fraction of defects in husked rice +
121
+ stem:[w_max]
122
+ | in husked rice | in milled rice (non-glutinous) | in husked parboiled rice | in milled parboiled rice
123
+
124
+ | Extraneous matter: organic footnote:[Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.] | 1,0 | 0,5 | 1,0 | 0,5
125
+ // not rendered list here
126
+ | Extraneous matter: inorganic footnote:[Inorganic extraneous matter includes stones, sand, dust, etc.] | 0,5 | 0,5 | 0,5 | 0,5
127
+ | Paddy | 2,5 | 0,3 | 2,5 | 0,3
128
+ | Husked rice, non-parboiled | Not applicable | 1,0 | 1,0 | 1,0
129
+ | Milled rice, non-parboiled | 1,0 | Not applicable | 1,0 | 1,0
130
+ | Husked rice, parboiled | 1,0 | 1,0 | Not applicable | 1,0
131
+ | Milled rice, parboiled | 1,0 | 1,0 | 1,0 | Not applicable
132
+ | Chips | 0,1 | 0,1 | 0,1 | 0,1
133
+ | HDK | 2,0 footnoteref:[defectsmass,The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.] | 2,0 | 2,0 footnoteref:[defectsmass] | 2,0
134
+ | Damaged kernels | 4,0 | 3,0 | 4,0 | 3,0
135
+ | Immature and/or malformed kernels | 8,0 | 2,0 | 8,0 | 2,0
136
+ | Chalky kernels | 5,0 footnoteref:[defectsmass] | 5,0 | Not applicable | Not applicable
137
+ | Red kernels and red-streaked kernels | 12,0 | 12,0 | 12,0 footnoteref:[defectsmass] | 12,0
138
+ | Partly gelatinized kernels | Not applicable | Not applicable | 11,0 footnoteref:[defectsmass] | 11,0
139
+ | Pecks | Not applicable | Not applicable | 4,0 | 2,0
140
+ | Waxy rice | 1,0 footnoteref:[defectsmass] | 1,0 | 1,0 footnoteref:[defectsmass] | 1,0
141
+
142
+ 5+a| Live insects shall not be present. Dead insects shall be included in extraneous matter.
143
+ |===
144
+ INPUT
145
+ #{BLANK_HDR}
146
+ <sections>
147
+ <table id="_">
148
+ <name>Maximum permissible mass fraction of defects</name>
149
+ <thead>
150
+ <tr>
151
+ <th rowspan="2" align="left">Defect</th>
152
+ <th colspan="4" align="center">Maximum permissible mass fraction of defects in husked rice<br/>
153
+ <stem type="AsciiMath">w_max</stem></th>
154
+ </tr>
155
+ <tr>
156
+ <td align="left">in husked rice</td>
157
+ <td align="center">in milled rice (non-glutinous)</td>
158
+ <td align="center">in husked parboiled rice</td>
159
+ <td align="center">in milled parboiled rice</td>
160
+ </tr></thead>
161
+ <tbody>
162
+
163
+ <tr>
164
+ <td align="left">Extraneous matter: organic<fn reference="a">
165
+ <p id="_">Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.</p>
166
+ </fn></td>
167
+ <td align="center">1,0</td>
168
+ <td align="center">0,5</td>
169
+ <td align="center">1,0</td>
170
+ <td align="center">0,5</td>
171
+ </tr>
172
+ <tr>
173
+ <td align="left">Extraneous matter: inorganic<fn reference="b">
174
+ <p id="_">Inorganic extraneous matter includes stones, sand, dust, etc.</p>
175
+ </fn></td>
176
+ <td align="center">0,5</td>
177
+ <td align="center">0,5</td>
178
+ <td align="center">0,5</td>
179
+ <td align="center">0,5</td>
180
+ </tr>
181
+ <tr>
182
+ <td align="left">Paddy</td>
183
+ <td align="center">2,5</td>
184
+ <td align="center">0,3</td>
185
+ <td align="center">2,5</td>
186
+ <td align="center">0,3</td>
187
+ </tr>
188
+ <tr>
189
+ <td align="left">Husked rice, non-parboiled</td>
190
+ <td align="center">Not applicable</td>
191
+ <td align="center">1,0</td>
192
+ <td align="center">1,0</td>
193
+ <td align="center">1,0</td>
194
+ </tr>
195
+ <tr>
196
+ <td align="left">Milled rice, non-parboiled</td>
197
+ <td align="center">1,0</td>
198
+ <td align="center">Not applicable</td>
199
+ <td align="center">1,0</td>
200
+ <td align="center">1,0</td>
201
+ </tr>
202
+ <tr>
203
+ <td align="left">Husked rice, parboiled</td>
204
+ <td align="center">1,0</td>
205
+ <td align="center">1,0</td>
206
+ <td align="center">Not applicable</td>
207
+ <td align="center">1,0</td>
208
+ </tr>
209
+ <tr>
210
+ <td align="left">Milled rice, parboiled</td>
211
+ <td align="center">1,0</td>
212
+ <td align="center">1,0</td>
213
+ <td align="center">1,0</td>
214
+ <td align="center">Not applicable</td>
215
+ </tr>
216
+ <tr>
217
+ <td align="left">Chips</td>
218
+ <td align="center">0,1</td>
219
+ <td align="center">0,1</td>
220
+ <td align="center">0,1</td>
221
+ <td align="center">0,1</td>
222
+ </tr>
223
+ <tr>
224
+ <td align="left">HDK</td>
225
+ <td align="center">2,0<fn reference="c">
226
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
227
+ </fn></td>
228
+ <td align="center">2,0</td>
229
+ <td align="center">2,0<fn reference="c">
230
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
231
+ </fn></td>
232
+ <td align="center">2,0</td>
233
+ </tr>
234
+ <tr>
235
+ <td align="left">Damaged kernels</td>
236
+ <td align="center">4,0</td>
237
+ <td align="center">3,0</td>
238
+ <td align="center">4,0</td>
239
+ <td align="center">3,0</td>
240
+ </tr>
241
+ <tr>
242
+ <td align="left">Immature and/or malformed kernels</td>
243
+ <td align="center">8,0</td>
244
+ <td align="center">2,0</td>
245
+ <td align="center">8,0</td>
246
+ <td align="center">2,0</td>
247
+ </tr>
248
+ <tr>
249
+ <td align="left">Chalky kernels</td>
250
+ <td align="center">5,0<fn reference="c">
251
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
252
+ </fn></td>
253
+ <td align="center">5,0</td>
254
+ <td align="center">Not applicable</td>
255
+ <td align="center">Not applicable</td>
256
+ </tr>
257
+ <tr>
258
+ <td align="left">Red kernels and red-streaked kernels</td>
259
+ <td align="center">12,0</td>
260
+ <td align="center">12,0</td>
261
+ <td align="center">12,0<fn reference="c">
262
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
263
+ </fn></td>
264
+ <td align="center">12,0</td>
265
+ </tr>
266
+ <tr>
267
+ <td align="left">Partly gelatinized kernels</td>
268
+ <td align="center">Not applicable</td>
269
+ <td align="center">Not applicable</td>
270
+ <td align="center">11,0<fn reference="c">
271
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
272
+ </fn></td>
273
+ <td align="center">11,0</td>
274
+ </tr>
275
+ <tr>
276
+ <td align="left">Pecks</td>
277
+ <td align="center">Not applicable</td>
278
+ <td align="center">Not applicable</td>
279
+ <td align="center">4,0</td>
280
+ <td align="center">2,0</td>
281
+ </tr>
282
+ <tr>
283
+ <td align="left">Waxy rice</td>
284
+ <td align="center">1,0<fn reference="c">
285
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
286
+ </fn></td>
287
+ <td align="center">1,0</td>
288
+ <td align="center">1,0<fn reference="c">
289
+ <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
290
+ </fn></td>
291
+ <td align="center">1,0</td>
292
+ </tr>
293
+ </tbody>
294
+ <tfoot>
295
+ <tr>
296
+ <td colspan="5" align="left">
297
+ <p id="_">Live insects shall not be present. Dead insects shall be included in extraneous matter.</p>
298
+ </td>
299
+ </tr>
300
+ </tfoot>
301
+ </table>
302
+ </sections>
303
+ </iso-standard>
304
+ OUTPUT
305
+ end
306
+ end
307
+