metanorma-standoc 0.0.1

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 (87) 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 +9 -0
  15. data/Rakefile +6 -0
  16. data/bin/rspec +18 -0
  17. data/docs/customisation.adoc +178 -0
  18. data/docs/guidance.adoc +436 -0
  19. data/docs/htmloutput.adoc +115 -0
  20. data/docs/quickstart.adoc +375 -0
  21. data/lib/asciidoctor/standoc/base.rb +198 -0
  22. data/lib/asciidoctor/standoc/biblio.rng +836 -0
  23. data/lib/asciidoctor/standoc/blocks.rb +190 -0
  24. data/lib/asciidoctor/standoc/cleanup.rb +247 -0
  25. data/lib/asciidoctor/standoc/cleanup_block.rb +193 -0
  26. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +78 -0
  27. data/lib/asciidoctor/standoc/cleanup_ref.rb +125 -0
  28. data/lib/asciidoctor/standoc/converter.rb +55 -0
  29. data/lib/asciidoctor/standoc/front.rb +121 -0
  30. data/lib/asciidoctor/standoc/inline.rb +134 -0
  31. data/lib/asciidoctor/standoc/isodoc.rng +1059 -0
  32. data/lib/asciidoctor/standoc/lists.rb +87 -0
  33. data/lib/asciidoctor/standoc/macros.rb +95 -0
  34. data/lib/asciidoctor/standoc/ref.rb +187 -0
  35. data/lib/asciidoctor/standoc/section.rb +159 -0
  36. data/lib/asciidoctor/standoc/table.rb +61 -0
  37. data/lib/asciidoctor/standoc/utils.rb +121 -0
  38. data/lib/asciidoctor/standoc/validate.rb +65 -0
  39. data/lib/asciidoctor/standoc/validate_section.rb +42 -0
  40. data/lib/asciidoctor/standoc/version.rb +5 -0
  41. data/lib/metanorma-standoc.rb +9 -0
  42. data/lib/metanorma/standoc.rb +7 -0
  43. data/lib/metanorma/standoc/processor.rb +40 -0
  44. data/metanorma-standoc.gemspec +47 -0
  45. data/spec/asciidoctor-standoc/base_spec.rb +271 -0
  46. data/spec/asciidoctor-standoc/blocks_spec.rb +469 -0
  47. data/spec/asciidoctor-standoc/cleanup_spec.rb +760 -0
  48. data/spec/asciidoctor-standoc/inline_spec.rb +162 -0
  49. data/spec/asciidoctor-standoc/isobib_cache_spec.rb +332 -0
  50. data/spec/asciidoctor-standoc/lists_spec.rb +190 -0
  51. data/spec/asciidoctor-standoc/macros_spec.rb +111 -0
  52. data/spec/asciidoctor-standoc/refs_spec.rb +606 -0
  53. data/spec/asciidoctor-standoc/section_spec.rb +310 -0
  54. data/spec/asciidoctor-standoc/table_spec.rb +307 -0
  55. data/spec/asciidoctor-standoc/validate_spec.rb +133 -0
  56. data/spec/assets/header.html +7 -0
  57. data/spec/assets/html.css +2 -0
  58. data/spec/assets/htmlcover.html +4 -0
  59. data/spec/assets/htmlintro.html +5 -0
  60. data/spec/assets/i18n.yaml +2 -0
  61. data/spec/assets/iso.headless.html +33 -0
  62. data/spec/assets/iso.xml +8 -0
  63. data/spec/assets/rice_image1.png +0 -0
  64. data/spec/assets/scripts.html +3 -0
  65. data/spec/assets/std.css +2 -0
  66. data/spec/assets/word.css +2 -0
  67. data/spec/assets/wordcover.html +3 -0
  68. data/spec/assets/wordintro.html +4 -0
  69. data/spec/examples/103_01_02.html +247 -0
  70. data/spec/examples/english.yaml +69 -0
  71. data/spec/examples/iso_123_.xml +45 -0
  72. data/spec/examples/iso_123_all_parts.xml +45 -0
  73. data/spec/examples/iso_123_no_year_note.xml +46 -0
  74. data/spec/examples/iso_124_.xml +41 -0
  75. data/spec/examples/iso_216_.xml +47 -0
  76. data/spec/examples/iso_iec_12382_.xml +48 -0
  77. data/spec/examples/rice.adoc +715 -0
  78. data/spec/examples/rice.preview.html +1877 -0
  79. data/spec/examples/rice.sh +4 -0
  80. data/spec/examples/rice_images/rice_image1.png +0 -0
  81. data/spec/examples/rice_images/rice_image2.png +0 -0
  82. data/spec/examples/rice_images/rice_image3_1.png +0 -0
  83. data/spec/examples/rice_images/rice_image3_2.png +0 -0
  84. data/spec/examples/rice_images/rice_image3_3.png +0 -0
  85. data/spec/metanorma/processor_spec.rb +70 -0
  86. data/spec/spec_helper.rb +198 -0
  87. metadata +370 -0
@@ -0,0 +1,310 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Asciidoctor::Standoc do
4
+ it "processes sections" do
5
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, 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
+ == Scope
16
+
17
+ Text
18
+
19
+ == Normative References
20
+
21
+ == Terms and Definitions
22
+
23
+ === Term1
24
+
25
+ == Terms, Definitions, Symbols and Abbreviated Terms
26
+
27
+ === Normal Terms
28
+
29
+ ==== Term2
30
+
31
+ === Symbols and Abbreviated Terms
32
+
33
+ == Symbols and Abbreviated Terms
34
+
35
+ == Clause 4
36
+
37
+ === Introduction
38
+
39
+ === Clause 4.2
40
+
41
+ [appendix]
42
+ == Annex
43
+
44
+ === Annex A.1
45
+
46
+ == Bibliography
47
+
48
+ === Bibliography Subsection
49
+ INPUT
50
+ #{BLANK_HDR}
51
+ <preface><foreword obligation="informative">
52
+ <title>Foreword</title>
53
+ <p id="_">Text</p>
54
+ </foreword><introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
55
+ <title>Introduction Subsection</title>
56
+ </clause>
57
+ </introduction></preface><sections>
58
+ <clause id="_" inline-header="false" obligation="normative">
59
+ <title>Scope</title>
60
+ <p id="_">Text</p>
61
+ </clause>
62
+
63
+ <terms id="_" obligation="normative">
64
+ <title>Terms and definitions</title>
65
+ <term id="_">
66
+ <preferred>Term1</preferred>
67
+ </term>
68
+ </terms>
69
+ <clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
70
+ <title>Normal Terms</title>
71
+ <term id="_">
72
+ <preferred>Term2</preferred>
73
+ </term>
74
+ </terms>
75
+ <definitions id="_"/></clause>
76
+ <definitions id="_"/>
77
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
78
+ <title>Introduction</title>
79
+ </clause>
80
+ <clause id="_" inline-header="false" obligation="normative">
81
+ <title>Clause 4.2</title>
82
+ </clause></clause>
83
+
84
+ </sections><annex id="_" inline-header="false" obligation="normative">
85
+ <title>Annex</title>
86
+ <clause id="_" inline-header="false" obligation="normative">
87
+ <title>Annex A.1</title>
88
+ </clause>
89
+ </annex><bibliography><references id="_" obligation="informative">
90
+ <title>Normative References</title>
91
+ </references><clause id="_" obligation="informative">
92
+ <title>Bibliography</title>
93
+ <references id="_" obligation="informative">
94
+ <title>Bibliography Subsection</title>
95
+ </references>
96
+ </clause>
97
+ </bibliography>
98
+ </standard-document>
99
+ OUTPUT
100
+ end
101
+
102
+ it "processes sections with title attributes" do
103
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
104
+ #{ASCIIDOC_BLANK_HDR}
105
+ .Foreword
106
+
107
+ Text
108
+
109
+ [heading=introduction]
110
+ == Εισαγωγή
111
+
112
+ === Introduction Subsection
113
+
114
+ [heading=normative references]
115
+ == Κανονιστικές Παραπομπές
116
+
117
+ [heading=terms and definitions]
118
+ == Όροι και Ορισμοί
119
+
120
+ === Term1
121
+
122
+ [heading="terms, definitions, symbols and abbreviated terms"]
123
+ == Όροι, Ορισμοί, Σύμβολα και Συντομογραφίες
124
+
125
+ === Normal Terms
126
+
127
+ ==== Term2
128
+
129
+ [heading=symbols and abbreviated terms]
130
+ === Σύμβολα και Συντομογραφίες
131
+
132
+ [heading=symbols and abbreviated terms]
133
+ == Σύμβολα και Συντομογραφίες
134
+
135
+ == Clause 4
136
+
137
+ === Introduction
138
+
139
+ === Clause 4.2
140
+
141
+ [appendix]
142
+ == Annex
143
+
144
+ === Annex A.1
145
+
146
+ [heading=bibliography]
147
+ == Βιβλιογραφία
148
+
149
+ === Bibliography Subsection
150
+ INPUT
151
+ #{BLANK_HDR}
152
+ <preface>
153
+ <foreword obligation="informative">
154
+ <title>Foreword</title>
155
+ <p id="_">Text</p>
156
+ </foreword>
157
+ <introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
158
+ <title>Introduction Subsection</title>
159
+ </clause>
160
+ </introduction>
161
+ </preface>
162
+ <sections>
163
+ <terms id="_" obligation="normative">
164
+ <title>Terms and definitions</title>
165
+ <term id="_">
166
+ <preferred>Term1</preferred>
167
+ </term>
168
+ </terms>
169
+ <clause id="_" obligation="normative"><title>Terms and definitions</title><terms id="_" obligation="normative">
170
+ <title>Normal Terms</title>
171
+ <term id="_">
172
+ <preferred>Term2</preferred>
173
+ </term>
174
+ </clause>
175
+ <definitions id="_"/></terms>
176
+ <definitions id="_"/>
177
+ <clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
178
+ <title>Introduction</title>
179
+ </clause>
180
+ <clause id="_" inline-header="false" obligation="normative">
181
+ <title>Clause 4.2</title>
182
+ </clause></clause>
183
+
184
+ </sections><annex id="_" inline-header="false" obligation="normative">
185
+ <title>Annex</title>
186
+ <clause id="_" inline-header="false" obligation="normative">
187
+ <title>Annex A.1</title>
188
+ </clause>
189
+ </annex><bibliography><references id="_" obligation="informative">
190
+ <title>Normative References</title>
191
+ </references><clause id="_" obligation="informative">
192
+ <title>Bibliography</title>
193
+ <references id="_" obligation="informative">
194
+ <title>Bibliography Subsection</title>
195
+ </references>
196
+ </clause>
197
+ </bibliography>
198
+ </standard-document>
199
+ OUTPUT
200
+ end
201
+
202
+ it "processes section obligations" do
203
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
204
+ #{ASCIIDOC_BLANK_HDR}
205
+ [obligation=informative]
206
+ == Clause 1
207
+
208
+ === Clause 1a
209
+
210
+ [obligation=normative]
211
+ == Clause 2
212
+
213
+ [appendix,obligation=informative]
214
+ == Annex
215
+ INPUT
216
+ #{BLANK_HDR}
217
+ <sections><clause id="_" inline-header="false" obligation="informative">
218
+ <title>Clause 1</title>
219
+ <clause id="_" inline-header="false" obligation="informative">
220
+ <title>Clause 1a</title>
221
+ </clause>
222
+ </clause>
223
+ <clause id="_" inline-header="false" obligation="normative">
224
+ <title>Clause 2</title>
225
+ </clause>
226
+ </sections><annex id="_" inline-header="false" obligation="informative">
227
+ <title>Annex</title>
228
+ </annex>
229
+ </standard-document>
230
+ OUTPUT
231
+ end
232
+
233
+ it "processes inline headers" do
234
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
235
+ #{ASCIIDOC_BLANK_HDR}
236
+ == Clause 1
237
+
238
+ [%inline-header]
239
+ === Clause 1a
240
+
241
+ [appendix]
242
+ == Annex A
243
+
244
+ [%inline-header]
245
+ === Clause Aa
246
+ INPUT
247
+ #{BLANK_HDR}
248
+ <sections><clause id="_" inline-header="false" obligation="normative">
249
+ <title>Clause 1</title>
250
+ <clause id="_" inline-header="true" obligation="normative">
251
+ <title>Clause 1a</title>
252
+ </clause>
253
+ </clause>
254
+ </sections><annex id="_" inline-header="false" obligation="normative">
255
+ <title>Annex A</title>
256
+ <clause id="_" inline-header="true" obligation="normative">
257
+ <title>Clause Aa</title>
258
+ </clause>
259
+ </annex>
260
+ </standard-document>
261
+ OUTPUT
262
+ end
263
+
264
+ it "processes blank headers" do
265
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
266
+ #{ASCIIDOC_BLANK_HDR}
267
+ == Clause 1
268
+
269
+ === {blank}
270
+
271
+ INPUT
272
+ #{BLANK_HDR}
273
+ <sections>
274
+ <clause id="_" inline-header="false" obligation="normative">
275
+ <title>Clause 1</title>
276
+ <clause id="_" inline-header="false" obligation="normative">
277
+ </clause>
278
+ </clause>
279
+ </sections>
280
+ </standard-document>
281
+ OUTPUT
282
+ end
283
+
284
+ it "processes term document sources" do
285
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
286
+ #{ASCIIDOC_BLANK_HDR}
287
+
288
+ Foreword
289
+
290
+ [source="iso1234,iso5678"]
291
+ == Terms and Definitions
292
+
293
+ INPUT
294
+ #{BLANK_HDR}
295
+ <termdocsource bibitemid="iso1234" type="inline"/><termdocsource bibitemid="iso5678" type="inline"/>
296
+ <preface><foreword obligation="informative">
297
+ <title>Foreword</title>
298
+ <p id="_">Foreword</p>
299
+ </foreword></preface><sections>
300
+ <terms id="_" obligation="normative">
301
+ <title>Terms and definitions</title>
302
+
303
+
304
+ </terms></sections>
305
+ </standard-document>
306
+
307
+ OUTPUT
308
+ end
309
+
310
+ end
@@ -0,0 +1,307 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe Asciidoctor::Standoc do
4
+ it "processes basic tables" do
5
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, 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
+ </standard-document>
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: :standoc, 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
+ </standard-document>
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: :standoc, 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
+ </standard-document>
111
+ OUTPUT
112
+ end
113
+
114
+ it "processes complex tables" do
115
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, 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
+ </standard-document>
304
+ OUTPUT
305
+ end
306
+ end
307
+