metanorma-iso 1.5.4 → 1.5.9

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.
@@ -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
+
@@ -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.4".freeze
3
+ VERSION = "1.5.9".freeze
4
4
  end
5
5
  end
@@ -31,10 +31,10 @@ Gem::Specification.new do |spec|
31
31
 
32
32
  spec.add_dependency "ruby-jing"
33
33
  spec.add_dependency "isodoc", "~> 1.2.0"
34
- spec.add_dependency "metanorma-standoc", "~> 1.5.0"
34
+ spec.add_dependency "metanorma-standoc", "~> 1.6.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
@@ -215,7 +183,7 @@ OUTPUT
215
183
  :doctype: amendment
216
184
  :updates-document-type: international-standard
217
185
  INPUT
218
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
186
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
219
187
  <bibdata type='standard'>
220
188
  <title language='en' format='text/plain' type='main'>Introduction — Main Title — Title — Title Part — Mass fraction of
221
189
  extraneous matter, milled rice (nonglutinous), sample dividers and
@@ -330,7 +298,7 @@ Author
330
298
  :updates: ISO 17301-1:2030
331
299
  :amendment-number: 1
332
300
  INPUT
333
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
301
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
334
302
  <bibdata type='standard'>
335
303
  <docidentifier type='ISO'>ISO 17301-1:2030/CD Amd 1</docidentifier>
336
304
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Amd 1(E)</docidentifier>
@@ -398,7 +366,7 @@ Author
398
366
  :updates: ISO 17301-1:2030
399
367
  :amendment-number: 1
400
368
  INPUT
401
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
369
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
402
370
  <bibdata type='standard'>
403
371
  <docidentifier type='ISO'>ISO 17301-1:2030/DAmd 1</docidentifier>
404
372
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/DAmd 1(E)</docidentifier>
@@ -465,7 +433,7 @@ Author
465
433
  :updates: ISO 17301-1:2030
466
434
  :amendment-number: 1
467
435
  INPUT
468
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
436
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
469
437
  <bibdata type='standard'>
470
438
  <docidentifier type='ISO'>ISO 17301-1:2030/Amd 1</docidentifier>
471
439
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Amd 1(E)</docidentifier>
@@ -533,7 +501,7 @@ Author
533
501
  :updates: ISO 17301-1:2030
534
502
  :corrigendum-number: 3
535
503
  INPUT
536
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
504
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
537
505
  <bibdata type='standard'>
538
506
  <docidentifier type='ISO'>ISO 17301-1:2030/CD Cor.3</docidentifier>
539
507
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/CD Cor.3(E)</docidentifier>
@@ -601,7 +569,7 @@ Author
601
569
  :updates: ISO 17301-1:2030
602
570
  :corrigendum-number: 3
603
571
  INPUT
604
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
572
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
605
573
  <bibdata type='standard'>
606
574
  <docidentifier type='ISO'>ISO 17301-1:2030/FDCor.3</docidentifier>
607
575
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/FDCor.3(E)</docidentifier>
@@ -668,7 +636,7 @@ Author
668
636
  :updates: ISO 17301-1:2030
669
637
  :corrigendum-number: 3
670
638
  INPUT
671
- <iso-standard xmlns='https://www.metanorma.org/ns/iso'>
639
+ <iso-standard xmlns='https://www.metanorma.org/ns/iso' type="semantic" version="#{Metanorma::ISO::VERSION}">
672
640
  <bibdata type='standard'>
673
641
  <docidentifier type='ISO'>ISO 17301-1:2030/Cor.3</docidentifier>
674
642
  <docidentifier type='iso-with-lang'>ISO 17301-1:2030/Cor.3(E)</docidentifier>
@@ -91,7 +91,7 @@ RSpec.describe Asciidoctor::ISO do
91
91
  :copyright-year: 2000
92
92
  INPUT
93
93
  <?xml version="1.0" encoding="UTF-8"?>
94
- <iso-standard xmlns="https://www.metanorma.org/ns/iso">
94
+ <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
95
95
  <bibdata type="standard">
96
96
  <title language="en" format="text/plain" type="main">Introduction — Main Title — Title — Title Part</title>
97
97
  <title language="en" format="text/plain" type="title-intro">Introduction</title>
@@ -173,7 +173,7 @@ RSpec.describe Asciidoctor::ISO do
173
173
 
174
174
 
175
175
  it "processes complex metadata" do
176
- expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~'OUTPUT')
176
+ expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
177
177
  = Document title
178
178
  Author
179
179
  :docfile: test.adoc
@@ -191,7 +191,7 @@ RSpec.describe Asciidoctor::ISO do
191
191
  :doctype: technical-report
192
192
  INPUT
193
193
  <?xml version="1.0" encoding="UTF-8"?>
194
- <iso-standard xmlns="https://www.metanorma.org/ns/iso">
194
+ <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
195
195
  <bibdata type="standard">
196
196
  <docidentifier type="ISO">ISO/IEC/IETF/TR 1000-1-1:2001</docidentifier>
197
197
  <docidentifier type='iso-with-lang'>ISO/IEC/IETF/TR 1000-1-1:2001(X)</docidentifier>
@@ -294,7 +294,7 @@ RSpec.describe Asciidoctor::ISO do
294
294
  :doctype: technical-specification
295
295
  :iteration: 2
296
296
  INPUT
297
- <iso-standard xmlns="https://www.metanorma.org/ns/iso">
297
+ <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
298
298
  <bibdata type="standard">
299
299
  <docidentifier type="ISO">ISO/DTS 1000.2</docidentifier>
300
300
  <docidentifier type='iso-with-lang'>ISO/DTS 1000.2(F)</docidentifier>
@@ -360,7 +360,7 @@ OUTPUT
360
360
  :docnumber: 1000
361
361
  :docstage: 60
362
362
  INPUT
363
- <iso-standard xmlns="https://www.metanorma.org/ns/iso">
363
+ <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
364
364
  <bibdata type="standard">
365
365
  <docidentifier type="ISO">ISO 1000</docidentifier>
366
366
  <docidentifier type='iso-with-lang'>ISO 1000(E)</docidentifier>
@@ -426,7 +426,7 @@ OUTPUT
426
426
  :docstage: 60
427
427
  :docsubstage: 00
428
428
  INPUT
429
- <iso-standard xmlns="https://www.metanorma.org/ns/iso">
429
+ <iso-standard xmlns="https://www.metanorma.org/ns/iso" type="semantic" version="#{Metanorma::ISO::VERSION}">
430
430
  <bibdata type="standard">
431
431
  <docidentifier type="ISO">ISO 1000</docidentifier>
432
432
  <docidentifier type='iso-with-lang'>ISO 1000(E)</docidentifier>
@@ -425,9 +425,9 @@ RSpec.describe Asciidoctor::ISO do
425
425
  <sections><table id="_">
426
426
  <tbody>
427
427
  <tr>
428
- <td align="left">a</td>
429
- <td align="left">b</td>
430
- <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>
431
431
  </tr>
432
432
  </tbody>
433
433
  <dl id="_">
@@ -456,23 +456,23 @@ RSpec.describe Asciidoctor::ISO do
456
456
  #{BLANK_HDR}
457
457
  <sections>
458
458
  <table id="_"><thead><tr>
459
- <th align="left">a</th>
460
- <th align="left">b</th>
461
- <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>
462
462
  </tr><tr>
463
- <th align="left">a</th>
464
- <th align="left">b</th>
465
- <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>
466
466
  </tr><tr>
467
- <th align="left">a</th>
468
- <th align="left">b</th>
469
- <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>
470
470
  </tr></thead>
471
471
  <tbody>
472
472
  <tr>
473
- <td align="left">a</td>
474
- <td align="left">b</td>
475
- <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>
476
476
  </tr>
477
477
  </tbody>
478
478
  </table>
@@ -498,26 +498,26 @@ RSpec.describe Asciidoctor::ISO do
498
498
  <table id="_">
499
499
  <thead>
500
500
  <tr>
501
- <th align="left">a</th>
502
- <th align="left">b</th>
503
- <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>
504
504
  </tr>
505
505
  <tr>
506
- <th align="left">a</th>
507
- <th align="left">b</th>
508
- <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>
509
509
  </tr><tr>
510
- <th align="left">a</th>
511
- <th align="left">b</th>
512
- <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>
513
513
  </tr></thead>
514
514
  <tbody>
515
515
 
516
516
 
517
517
  <tr>
518
- <td align="left">a</td>
519
- <td align="left">b</td>
520
- <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>
521
521
  </tr>
522
522
  </tbody>
523
523
  </table>
@@ -541,9 +541,9 @@ RSpec.describe Asciidoctor::ISO do
541
541
  <sections><table id="_">
542
542
  <tbody>
543
543
  <tr>
544
- <td align="left">a</td>
545
- <td align="left">b</td>
546
- <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>
547
547
  </tr>
548
548
  </tbody>
549
549
  <note id="_">
@@ -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,8 +148,8 @@ 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/>
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
153
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow>
154
154
  <mi>w</mi>
155
155
  </mrow>
@@ -159,147 +159,147 @@ RSpec.describe Asciidoctor::ISO do
159
159
  </msub></math></stem></th>
160
160
  </tr>
161
161
  <tr>
162
- <th align="left">in husked rice</th>
163
- <th align="center">in milled rice (non-glutinous)</th>
164
- <th align="center">in husked parboiled rice</th>
165
- <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>
166
166
  </tr></thead>
167
167
  <tbody>
168
168
 
169
169
  <tr>
170
- <td align="left">Extraneous matter: organic<fn reference="a">
170
+ <td valign="top" align="left">Extraneous matter: organic<fn reference="a">
171
171
  <p id="_">Organic extraneous matter includes foreign seeds, husks, bran, parts of straw, etc.</p>
172
172
  </fn></td>
173
- <td align="center">1,0</td>
174
- <td align="center">0,5</td>
175
- <td align="center">1,0</td>
176
- <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>
177
177
  </tr>
178
178
  <tr>
179
- <td align="left">Extraneous matter: inorganic<fn reference="b">
179
+ <td valign="top" align="left">Extraneous matter: inorganic<fn reference="b">
180
180
  <p id="_">Inorganic extraneous matter includes stones, sand, dust, etc.</p>
181
181
  </fn></td>
182
- <td align="center">0,5</td>
183
- <td align="center">0,5</td>
184
- <td align="center">0,5</td>
185
- <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>
186
186
  </tr>
187
187
  <tr>
188
- <td align="left">Paddy</td>
189
- <td align="center">2,5</td>
190
- <td align="center">0,3</td>
191
- <td align="center">2,5</td>
192
- <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>
193
193
  </tr>
194
194
  <tr>
195
- <td align="left">Husked rice, non-parboiled</td>
196
- <td align="center">Not applicable</td>
197
- <td align="center">1,0</td>
198
- <td align="center">1,0</td>
199
- <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>
200
200
  </tr>
201
201
  <tr>
202
- <td align="left">Milled rice, non-parboiled</td>
203
- <td align="center">1,0</td>
204
- <td align="center">Not applicable</td>
205
- <td align="center">1,0</td>
206
- <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>
207
207
  </tr>
208
208
  <tr>
209
- <td align="left">Husked rice, parboiled</td>
210
- <td align="center">1,0</td>
211
- <td align="center">1,0</td>
212
- <td align="center">Not applicable</td>
213
- <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>
214
214
  </tr>
215
215
  <tr>
216
- <td align="left">Milled rice, parboiled</td>
217
- <td align="center">1,0</td>
218
- <td align="center">1,0</td>
219
- <td align="center">1,0</td>
220
- <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>
221
221
  </tr>
222
222
  <tr>
223
- <td align="left">Chips</td>
224
- <td align="center">0,1</td>
225
- <td align="center">0,1</td>
226
- <td align="center">0,1</td>
227
- <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>
228
228
  </tr>
229
229
  <tr>
230
- <td align="left">HDK</td>
231
- <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">
232
232
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
233
233
  </fn></td>
234
- <td align="center">2,0</td>
235
- <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">
236
236
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
237
237
  </fn></td>
238
- <td align="center">2,0</td>
238
+ <td valign="top" align="center">2,0</td>
239
239
  </tr>
240
240
  <tr>
241
- <td align="left">Damaged kernels</td>
242
- <td align="center">4,0</td>
243
- <td align="center">3,0</td>
244
- <td align="center">4,0</td>
245
- <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>
246
246
  </tr>
247
247
  <tr>
248
- <td align="left">Immature and/or malformed kernels</td>
249
- <td align="center">8,0</td>
250
- <td align="center">2,0</td>
251
- <td align="center">8,0</td>
252
- <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>
253
253
  </tr>
254
254
  <tr>
255
- <td align="left">Chalky kernels</td>
256
- <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">
257
257
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
258
258
  </fn></td>
259
- <td align="center">5,0</td>
260
- <td align="center">Not applicable</td>
261
- <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>
262
262
  </tr>
263
263
  <tr>
264
- <td align="left">Red kernels and red-streaked kernels</td>
265
- <td align="center">12,0</td>
266
- <td align="center">12,0</td>
267
- <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">
268
268
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
269
269
  </fn></td>
270
- <td align="center">12,0</td>
270
+ <td valign="top" align="center">12,0</td>
271
271
  </tr>
272
272
  <tr>
273
- <td align="left">Partly gelatinized kernels</td>
274
- <td align="center">Not applicable</td>
275
- <td align="center">Not applicable</td>
276
- <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">
277
277
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
278
278
  </fn></td>
279
- <td align="center">11,0</td>
279
+ <td valign="top" align="center">11,0</td>
280
280
  </tr>
281
281
  <tr>
282
- <td align="left">Pecks</td>
283
- <td align="center">Not applicable</td>
284
- <td align="center">Not applicable</td>
285
- <td align="center">4,0</td>
286
- <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>
287
287
  </tr>
288
288
  <tr>
289
- <td align="left">Waxy rice</td>
290
- <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">
291
291
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
292
292
  </fn></td>
293
- <td align="center">1,0</td>
294
- <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">
295
295
  <p id="_">The maximum permissible mass fraction of defects shall be determined with respect to the mass fraction obtained after milling.</p>
296
296
  </fn></td>
297
- <td align="center">1,0</td>
297
+ <td valign="top" align="center">1,0</td>
298
298
  </tr>
299
299
  </tbody>
300
300
  <tfoot>
301
301
  <tr>
302
- <td colspan="5" align="left">
302
+ <td colspan="5" valign="top" align="left">
303
303
  <p id="_">Live insects shall not be present. Dead insects shall be included in extraneous matter.</p>
304
304
  </td>
305
305
  </tr>