metanorma-iso 1.5.3 → 1.5.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,31 @@
1
+ require "isodoc"
2
+ require "mn2sts"
3
+
4
+ module IsoDoc
5
+ module Iso
6
+
7
+ # A {Converter} implementation that generates HTML output, and a document
8
+ # schema encapsulation of the document for validation
9
+ #
10
+ class IsoStsConvert < IsoDoc::XslfoPdfConvert
11
+ def initialize(options)
12
+ @libdir = File.dirname(__FILE__)
13
+ @format = :isosts
14
+ @suffix = "isosts.xml"
15
+ end
16
+
17
+ def convert(input_filename, file = nil, debug = false, output_filename = nil)
18
+ file = File.read(input_filename, encoding: "utf-8") if file.nil?
19
+ docxml, filename, dir = convert_init(file, input_filename, debug)
20
+ /\.xml$/.match(input_filename) or
21
+ input_filename = Tempfile.open([filename, ".xml"], encoding: "utf-8") do |f|
22
+ f.write file
23
+ f.path
24
+ end
25
+ FileUtils.rm_rf dir
26
+ Mn2sts.convert(input_filename, output_filename || "#{filename}.#{@suffix}", iso: true)
27
+ end
28
+ end
29
+ end
30
+ end
31
+
@@ -8,15 +8,19 @@ module IsoDoc
8
8
  def initialize(options)
9
9
  @libdir = File.dirname(__FILE__)
10
10
  super
11
+ @wordToClevels = options[:doctoclevels].to_i
12
+ @wordToClevels = 3 if @wordToClevels.zero?
13
+ @htmlToClevels = options[:htmltoclevels].to_i
14
+ @htmlToClevels = 3 if @htmlToClevels.zero?
11
15
  end
12
16
 
13
17
  def default_fonts(options)
14
18
  {
15
19
  bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
16
20
  '"Cambria",serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
18
- '"Cambria",serif'),
19
- monospacefont: '"Courier New",monospace',
21
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
22
+ '"Cambria",serif'),
23
+ monospacefont: '"Courier New",monospace',
20
24
  }
21
25
  end
22
26
 
@@ -24,16 +28,16 @@ module IsoDoc
24
28
  {
25
29
  htmlstylesheet: (options[:alt] ? html_doc_path("style-human.scss") :
26
30
  html_doc_path("style-iso.scss")),
27
- htmlcoverpage: html_doc_path("html_iso_titlepage.html"),
28
- htmlintropage: html_doc_path("html_iso_intro.html"),
29
- scripts: html_doc_path("scripts.html"),
30
- wordstylesheet: html_doc_path("wordstyle.scss"),
31
- standardstylesheet: html_doc_path("isodoc.scss"),
32
- header: html_doc_path("header.html"),
33
- wordcoverpage: html_doc_path("word_iso_titlepage.html"),
34
- wordintropage: html_doc_path("word_iso_intro.html"),
35
- ulstyle: "l3",
36
- olstyle: "l2",
31
+ htmlcoverpage: html_doc_path("html_iso_titlepage.html"),
32
+ htmlintropage: html_doc_path("html_iso_intro.html"),
33
+ scripts: html_doc_path("scripts.html"),
34
+ wordstylesheet: html_doc_path("wordstyle.scss"),
35
+ standardstylesheet: html_doc_path("isodoc.scss"),
36
+ header: html_doc_path("header.html"),
37
+ wordcoverpage: html_doc_path("word_iso_titlepage.html"),
38
+ wordintropage: html_doc_path("word_iso_intro.html"),
39
+ ulstyle: "l3",
40
+ olstyle: "l2",
37
41
  }
38
42
  end
39
43
 
@@ -1,20 +1,16 @@
1
1
  module IsoDoc
2
2
  module Iso
3
3
  class Xref < IsoDoc::Xref
4
- def parse(docxml)
5
- if @klass.amd(docxml)
6
- back_anchor_names(docxml)
7
- note_anchor_names(docxml.xpath(ns("//annex//table | //annex//figure")))
8
- note_anchor_names(docxml.xpath(ns("//annex")))
9
- example_anchor_names(docxml.xpath(ns("//annex")))
10
- list_anchor_names(docxml.xpath(ns("//annex")))
4
+ def initial_anchor_names(d)
5
+ if @klass.amd(d)
6
+ d.xpath(ns("//preface/*")).each { |c| c.element? and preface_names(c) }
7
+ sequential_asset_names(d.xpath(ns("//preface/*")))
8
+ middle_section_asset_names(d)
9
+ termnote_anchor_names(d)
10
+ termexample_anchor_names(d)
11
11
  else
12
12
  super
13
13
  end
14
- end
15
-
16
- def initial_anchor_names(d)
17
- super
18
14
  introduction_names(d.at(ns("//introduction")))
19
15
  end
20
16
 
@@ -5,6 +5,7 @@ require_relative "isodoc/iso/html_convert"
5
5
  require_relative "isodoc/iso/word_convert"
6
6
  require_relative "isodoc/iso/pdf_convert"
7
7
  require_relative "isodoc/iso/sts_convert"
8
+ require_relative "isodoc/iso/isosts_convert"
8
9
  require_relative "isodoc/iso/presentation_xml_convert"
9
10
  require "asciidoctor/extensions"
10
11
 
@@ -25,7 +25,8 @@ module Metanorma
25
25
  html_alt: "alt.html",
26
26
  doc: "doc",
27
27
  pdf: "pdf",
28
- sts: "sts.xml"
28
+ sts: "sts.xml",
29
+ isosts: "iso.sts.xml"
29
30
  )
30
31
  end
31
32
 
@@ -50,6 +51,8 @@ module Metanorma
50
51
  IsoDoc::Iso::PdfConvert.new(options).convert(inname, isodoc_node, nil, outname)
51
52
  when :sts
52
53
  IsoDoc::Iso::StsConvert.new(options).convert(inname, isodoc_node, nil, outname)
54
+ when :isosts
55
+ IsoDoc::Iso::IsoStsConvert.new(options).convert(inname, isodoc_node, nil, outname)
53
56
  when :presentation
54
57
  IsoDoc::Iso::PresentationXMLConvert.new(options).convert(inname, isodoc_node, nil, outname)
55
58
  else
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.5.3".freeze
3
+ VERSION = "1.5.8".freeze
4
4
  end
5
5
  end
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "metanorma-standoc", "~> 1.5.0"
35
35
  spec.add_dependency "tokenizer", "~> 0.3.0"
36
36
  spec.add_dependency "twitter_cldr"
37
- spec.add_dependency "mn2sts", "~> 1.2.0"
37
+ spec.add_dependency "mn2sts", "~> 1.5.0"
38
38
 
39
39
  spec.add_development_dependency "byebug"
40
40
  spec.add_development_dependency "sassc", "2.4.0"
@@ -2,22 +2,6 @@ require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
4
  RSpec.describe Asciidoctor::ISO do
5
- it "validates amendment document against distinct ISO XML schema" do
6
- FileUtils.rm_f "test.err"
7
- Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)
8
- = Document title
9
- Author
10
- :docfile: test.adoc
11
- :nodoc:
12
- :no-isobib:
13
- :doctype: amendment
14
-
15
- [change=mid-air]
16
- == Para
17
- INPUT
18
- expect(File.read("test.err")).to include 'value of attribute "change" is invalid; must be equal to'
19
- end
20
-
21
5
  it "processes amendment sections" do
22
6
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
23
7
  #{AMD_BLANK_HDR}
@@ -147,22 +131,6 @@ end
147
131
  OUTPUT
148
132
  end
149
133
 
150
- it "processes section attributes" do
151
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
152
- #{AMD_BLANK_HDR}
153
- [change=delete,locality="clause=introduction,paragraph=4-7",inline-header="true"]
154
- == Clause 1
155
-
156
- INPUT
157
- #{BLANK_HDR.sub(%r{<doctype>article</doctype>}, "<doctype>amendment</doctype>")}
158
- <sections><clause id="_" obligation="normative" change="delete" locality="clause=introduction,paragraph=4-7">
159
- <title>Clause 1</title>
160
- </clause>
161
- </sections>
162
- </iso-standard>
163
- OUTPUT
164
- end
165
-
166
134
  it "processes default metadata, amendment" do
167
135
  expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
168
136
  = Document title
@@ -32,7 +32,19 @@ RSpec.describe Asciidoctor::ISO do
32
32
  <terms id="_" obligation="normative">
33
33
  <title>Terms and definitions</title>
34
34
  #{TERM_BOILERPLATE}
35
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
35
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
36
+ <mi>t</mi>
37
+ </mrow>
38
+ <mrow>
39
+ <mn>90</mn>
40
+ </mrow>
41
+ </msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
42
+ <mi>t</mi>
43
+ </mrow>
44
+ <mrow>
45
+ <mn>91</mn>
46
+ </mrow>
47
+ </msub></math></stem></admitted>
36
48
  <definition><p id="_">Time</p></definition></term>
37
49
  </terms>
38
50
  </sections>
@@ -90,8 +102,20 @@ RSpec.describe Asciidoctor::ISO do
90
102
  <terms id="_" obligation="normative">
91
103
  <title>Terms and definitions</title>
92
104
  #{TERM_BOILERPLATE}
93
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
94
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>A</mi></msub></math></stem>
105
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
106
+ <mi>t</mi>
107
+ </mrow>
108
+ <mrow>
109
+ <mn>90</mn>
110
+ </mrow>
111
+ </msub></math></stem></preferred><definition><formula id="_">
112
+ <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
113
+ <mi>t</mi>
114
+ </mrow>
115
+ <mrow>
116
+ <mi>A</mi>
117
+ </mrow>
118
+ </msub></math></stem>
95
119
  </formula><p id="_">This paragraph is extraneous</p></definition>
96
120
  </term>
97
121
  </terms>
@@ -401,9 +425,9 @@ RSpec.describe Asciidoctor::ISO do
401
425
  <sections><table id="_">
402
426
  <tbody>
403
427
  <tr>
404
- <td align="left">a</td>
405
- <td align="left">b</td>
406
- <td align="left">c</td>
428
+ <td valign="top" align="left">a</td>
429
+ <td valign="top" align="left">b</td>
430
+ <td valign="top" align="left">c</td>
407
431
  </tr>
408
432
  </tbody>
409
433
  <dl id="_">
@@ -432,23 +456,23 @@ RSpec.describe Asciidoctor::ISO do
432
456
  #{BLANK_HDR}
433
457
  <sections>
434
458
  <table id="_"><thead><tr>
435
- <th align="left">a</th>
436
- <th align="left">b</th>
437
- <th align="left">c</th>
459
+ <th valign="top" align="left">a</th>
460
+ <th valign="top" align="left">b</th>
461
+ <th valign="top" align="left">c</th>
438
462
  </tr><tr>
439
- <th align="left">a</th>
440
- <th align="left">b</th>
441
- <th align="left">c</th>
463
+ <th valign="top" align="left">a</th>
464
+ <th valign="top" align="left">b</th>
465
+ <th valign="top" align="left">c</th>
442
466
  </tr><tr>
443
- <th align="left">a</th>
444
- <th align="left">b</th>
445
- <th align="left">c</th>
467
+ <th valign="top" align="left">a</th>
468
+ <th valign="top" align="left">b</th>
469
+ <th valign="top" align="left">c</th>
446
470
  </tr></thead>
447
471
  <tbody>
448
472
  <tr>
449
- <td align="left">a</td>
450
- <td align="left">b</td>
451
- <td align="left">c</td>
473
+ <td valign="top" align="left">a</td>
474
+ <td valign="top" align="left">b</td>
475
+ <td valign="top" align="left">c</td>
452
476
  </tr>
453
477
  </tbody>
454
478
  </table>
@@ -474,26 +498,26 @@ RSpec.describe Asciidoctor::ISO do
474
498
  <table id="_">
475
499
  <thead>
476
500
  <tr>
477
- <th align="left">a</th>
478
- <th align="left">b</th>
479
- <th align="left">c</th>
501
+ <th valign="top" align="left">a</th>
502
+ <th valign="top" align="left">b</th>
503
+ <th valign="top" align="left">c</th>
480
504
  </tr>
481
505
  <tr>
482
- <th align="left">a</th>
483
- <th align="left">b</th>
484
- <th align="left">c</th>
506
+ <th valign="top" align="left">a</th>
507
+ <th valign="top" align="left">b</th>
508
+ <th valign="top" align="left">c</th>
485
509
  </tr><tr>
486
- <th align="left">a</th>
487
- <th align="left">b</th>
488
- <th align="left">c</th>
510
+ <th valign="top" align="left">a</th>
511
+ <th valign="top" align="left">b</th>
512
+ <th valign="top" align="left">c</th>
489
513
  </tr></thead>
490
514
  <tbody>
491
515
 
492
516
 
493
517
  <tr>
494
- <td align="left">a</td>
495
- <td align="left">b</td>
496
- <td align="left">c</td>
518
+ <td valign="top" align="left">a</td>
519
+ <td valign="top" align="left">b</td>
520
+ <td valign="top" align="left">c</td>
497
521
  </tr>
498
522
  </tbody>
499
523
  </table>
@@ -517,9 +541,9 @@ RSpec.describe Asciidoctor::ISO do
517
541
  <sections><table id="_">
518
542
  <tbody>
519
543
  <tr>
520
- <td align="left">a</td>
521
- <td align="left">b</td>
522
- <td align="left">c</td>
544
+ <td valign="top" align="left">a</td>
545
+ <td valign="top" align="left">b</td>
546
+ <td valign="top" align="left">c</td>
523
547
  </tr>
524
548
  </tbody>
525
549
  <note id="_">
@@ -28,7 +28,13 @@ RSpec.describe Asciidoctor::ISO do
28
28
  ‘single quote’
29
29
  super<sup>script</sup>
30
30
  sub<sub>script</sub>
31
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>a</mi><mn>90</mn></msub></math></stem>
31
+ <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
32
+ <mi>a</mi>
33
+ </mrow>
34
+ <mrow>
35
+ <mn>90</mn>
36
+ </mrow>
37
+ </msub></math></stem>
32
38
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
33
39
  <admitted>alt</admitted>
34
40
  <deprecates>deprecated</deprecates>
@@ -17,16 +17,16 @@ RSpec.describe Asciidoctor::ISO do
17
17
  <name>Table Name</name>
18
18
  <thead>
19
19
  <tr>
20
- <th align="left">A</th>
21
- <th align="left">B</th>
22
- <th align="left">C</th>
20
+ <th valign="top" align="left">A</th>
21
+ <th valign="top" align="left">B</th>
22
+ <th valign="top" align="left">C</th>
23
23
  </tr>
24
24
  </thead>
25
25
  <tbody>
26
26
  <tr>
27
- <th align="left">1</th>
28
- <td align="left">2</td>
29
- <td align="left">3</td>
27
+ <th valign="top" align="left">1</th>
28
+ <td valign="top" align="left">2</td>
29
+ <td valign="top" align="left">3</td>
30
30
  </tr>
31
31
  </tbody>
32
32
  </table>
@@ -51,21 +51,21 @@ RSpec.describe Asciidoctor::ISO do
51
51
  <table id="_">
52
52
  <name>Table Name</name>
53
53
  <thead><tr>
54
- <th align="left">A</th>
55
- <th align="left">B</th>
56
- <th align="left">C</th>
54
+ <th valign="top" align="left">A</th>
55
+ <th valign="top" align="left">B</th>
56
+ <th valign="top" align="left">C</th>
57
57
  </tr><tr>
58
- <th align="left">1</th>
59
- <th align="left">2</th>
60
- <th align="left">3</th>
58
+ <th valign="top" align="left">1</th>
59
+ <th valign="top" align="left">2</th>
60
+ <th valign="top" align="left">3</th>
61
61
  </tr></thead>
62
62
  <tbody>
63
63
 
64
64
 
65
65
  <tr>
66
- <th align="left">1</th>
67
- <td align="left">2</td>
68
- <td align="left">3</td>
66
+ <th valign="top" align="left">1</th>
67
+ <td valign="top" align="left">2</td>
68
+ <td valign="top" align="left">3</td>
69
69
  </tr>
70
70
  </tbody>
71
71
  </table>
@@ -88,21 +88,21 @@ RSpec.describe Asciidoctor::ISO do
88
88
  #{BLANK_HDR}
89
89
  <sections>
90
90
  <table id="_"><thead><tr>
91
- <th align="left">A</th>
92
- <th align="left">B</th>
93
- <th align="left">C</th>
91
+ <th valign="top" align="left">A</th>
92
+ <th valign="top" align="left">B</th>
93
+ <th valign="top" align="left">C</th>
94
94
  </tr><tr>
95
- <th align="left">1</th>
96
- <th align="left">2</th>
97
- <th align="left">3</th>
95
+ <th valign="top" align="left">1</th>
96
+ <th valign="top" align="left">2</th>
97
+ <th valign="top" align="left">3</th>
98
98
  </tr></thead>
99
99
  <tbody>
100
100
 
101
101
 
102
102
  <tr>
103
- <th align="left">1</th>
104
- <td align="left">2</td>
105
- <td align="left">3</td>
103
+ <th valign="top" align="left">1</th>
104
+ <td valign="top" align="left">2</td>
105
+ <td valign="top" align="left">3</td>
106
106
  </tr>
107
107
  </tbody>
108
108
  </table>
@@ -148,152 +148,158 @@ RSpec.describe Asciidoctor::ISO do
148
148
  <name>Maximum permissible mass fraction of defects</name>
149
149
  <thead>
150
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="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>w</mi><mo>max</mo></msub></math></stem></th>
151
+ <th rowspan="2" valign="top" align="left">Defect</th>
152
+ <th colspan="4" valign="top" align="center">Maximum permissible mass fraction of defects in husked rice<br/>
153
+ <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
154
+ <mi>w</mi>
155
+ </mrow>
156
+ <mrow>
157
+ <mo>max</mo>
158
+ </mrow>
159
+ </msub></math></stem></th>
154
160
  </tr>
155
161
  <tr>
156
- <th align="left">in husked rice</th>
157
- <th align="center">in milled rice (non-glutinous)</th>
158
- <th align="center">in husked parboiled rice</th>
159
- <th align="center">in milled parboiled rice</th>
162
+ <th valign="top" align="left">in husked rice</th>
163
+ <th valign="top" align="center">in milled rice (non-glutinous)</th>
164
+ <th valign="top" align="center">in husked parboiled rice</th>
165
+ <th valign="top" align="center">in milled parboiled rice</th>
160
166
  </tr></thead>
161
167
  <tbody>
162
168
 
163
169
  <tr>
164
- <td align="left">Extraneous matter: organic<fn reference="a">
170
+ <td valign="top" align="left">Extraneous matter: organic<fn reference="a">
165
171
  <p id="_">Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.</p>
166
172
  </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>
173
+ <td valign="top" align="center">1,0</td>
174
+ <td valign="top" align="center">0,5</td>
175
+ <td valign="top" align="center">1,0</td>
176
+ <td valign="top" align="center">0,5</td>
171
177
  </tr>
172
178
  <tr>
173
- <td align="left">Extraneous matter: inorganic<fn reference="b">
179
+ <td valign="top" align="left">Extraneous matter: inorganic<fn reference="b">
174
180
  <p id="_">Inorganic extraneous matter includes stones, sand, dust, etc.</p>
175
181
  </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>
182
+ <td valign="top" align="center">0,5</td>
183
+ <td valign="top" align="center">0,5</td>
184
+ <td valign="top" align="center">0,5</td>
185
+ <td valign="top" align="center">0,5</td>
180
186
  </tr>
181
187
  <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>
188
+ <td valign="top" align="left">Paddy</td>
189
+ <td valign="top" align="center">2,5</td>
190
+ <td valign="top" align="center">0,3</td>
191
+ <td valign="top" align="center">2,5</td>
192
+ <td valign="top" align="center">0,3</td>
187
193
  </tr>
188
194
  <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>
195
+ <td valign="top" align="left">Husked rice, non-parboiled</td>
196
+ <td valign="top" align="center">Not applicable</td>
197
+ <td valign="top" align="center">1,0</td>
198
+ <td valign="top" align="center">1,0</td>
199
+ <td valign="top" align="center">1,0</td>
194
200
  </tr>
195
201
  <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>
202
+ <td valign="top" align="left">Milled rice, non-parboiled</td>
203
+ <td valign="top" align="center">1,0</td>
204
+ <td valign="top" align="center">Not applicable</td>
205
+ <td valign="top" align="center">1,0</td>
206
+ <td valign="top" align="center">1,0</td>
201
207
  </tr>
202
208
  <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>
209
+ <td valign="top" align="left">Husked rice, parboiled</td>
210
+ <td valign="top" align="center">1,0</td>
211
+ <td valign="top" align="center">1,0</td>
212
+ <td valign="top" align="center">Not applicable</td>
213
+ <td valign="top" align="center">1,0</td>
208
214
  </tr>
209
215
  <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>
216
+ <td valign="top" align="left">Milled rice, parboiled</td>
217
+ <td valign="top" align="center">1,0</td>
218
+ <td valign="top" align="center">1,0</td>
219
+ <td valign="top" align="center">1,0</td>
220
+ <td valign="top" align="center">Not applicable</td>
215
221
  </tr>
216
222
  <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>
223
+ <td valign="top" align="left">Chips</td>
224
+ <td valign="top" align="center">0,1</td>
225
+ <td valign="top" align="center">0,1</td>
226
+ <td valign="top" align="center">0,1</td>
227
+ <td valign="top" align="center">0,1</td>
222
228
  </tr>
223
229
  <tr>
224
- <td align="left">HDK</td>
225
- <td align="center">2,0<fn reference="c">
230
+ <td valign="top" align="left">HDK</td>
231
+ <td valign="top" align="center">2,0<fn reference="c">
226
232
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
227
233
  </fn></td>
228
- <td align="center">2,0</td>
229
- <td align="center">2,0<fn reference="c">
234
+ <td valign="top" align="center">2,0</td>
235
+ <td valign="top" align="center">2,0<fn reference="c">
230
236
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
231
237
  </fn></td>
232
- <td align="center">2,0</td>
238
+ <td valign="top" align="center">2,0</td>
233
239
  </tr>
234
240
  <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>
241
+ <td valign="top" align="left">Damaged kernels</td>
242
+ <td valign="top" align="center">4,0</td>
243
+ <td valign="top" align="center">3,0</td>
244
+ <td valign="top" align="center">4,0</td>
245
+ <td valign="top" align="center">3,0</td>
240
246
  </tr>
241
247
  <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>
248
+ <td valign="top" align="left">Immature and/or malformed kernels</td>
249
+ <td valign="top" align="center">8,0</td>
250
+ <td valign="top" align="center">2,0</td>
251
+ <td valign="top" align="center">8,0</td>
252
+ <td valign="top" align="center">2,0</td>
247
253
  </tr>
248
254
  <tr>
249
- <td align="left">Chalky kernels</td>
250
- <td align="center">5,0<fn reference="c">
255
+ <td valign="top" align="left">Chalky kernels</td>
256
+ <td valign="top" align="center">5,0<fn reference="c">
251
257
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
252
258
  </fn></td>
253
- <td align="center">5,0</td>
254
- <td align="center">Not applicable</td>
255
- <td align="center">Not applicable</td>
259
+ <td valign="top" align="center">5,0</td>
260
+ <td valign="top" align="center">Not applicable</td>
261
+ <td valign="top" align="center">Not applicable</td>
256
262
  </tr>
257
263
  <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">
264
+ <td valign="top" align="left">Red kernels and red-streaked kernels</td>
265
+ <td valign="top" align="center">12,0</td>
266
+ <td valign="top" align="center">12,0</td>
267
+ <td valign="top" align="center">12,0<fn reference="c">
262
268
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
263
269
  </fn></td>
264
- <td align="center">12,0</td>
270
+ <td valign="top" align="center">12,0</td>
265
271
  </tr>
266
272
  <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">
273
+ <td valign="top" align="left">Partly gelatinized kernels</td>
274
+ <td valign="top" align="center">Not applicable</td>
275
+ <td valign="top" align="center">Not applicable</td>
276
+ <td valign="top" align="center">11,0<fn reference="c">
271
277
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
272
278
  </fn></td>
273
- <td align="center">11,0</td>
279
+ <td valign="top" align="center">11,0</td>
274
280
  </tr>
275
281
  <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>
282
+ <td valign="top" align="left">Pecks</td>
283
+ <td valign="top" align="center">Not applicable</td>
284
+ <td valign="top" align="center">Not applicable</td>
285
+ <td valign="top" align="center">4,0</td>
286
+ <td valign="top" align="center">2,0</td>
281
287
  </tr>
282
288
  <tr>
283
- <td align="left">Waxy rice</td>
284
- <td align="center">1,0<fn reference="c">
289
+ <td valign="top" align="left">Waxy rice</td>
290
+ <td valign="top" align="center">1,0<fn reference="c">
285
291
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
286
292
  </fn></td>
287
- <td align="center">1,0</td>
288
- <td align="center">1,0<fn reference="c">
293
+ <td valign="top" align="center">1,0</td>
294
+ <td valign="top" align="center">1,0<fn reference="c">
289
295
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
290
296
  </fn></td>
291
- <td align="center">1,0</td>
297
+ <td valign="top" align="center">1,0</td>
292
298
  </tr>
293
299
  </tbody>
294
300
  <tfoot>
295
301
  <tr>
296
- <td colspan="5" align="left">
302
+ <td colspan="5" valign="top" align="left">
297
303
  <p id="_">Live insects shall not be present. Dead insects shall be included in extraneous matter.</p>
298
304
  </td>
299
305
  </tr>