isodoc 1.0.22 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +12 -5
  3. data/.github/workflows/ubuntu.yml +27 -6
  4. data/.github/workflows/windows.yml +13 -7
  5. data/README.adoc +3 -2
  6. data/lib/isodoc-yaml/i18n-en.yaml +18 -1
  7. data/lib/isodoc-yaml/i18n-fr.yaml +18 -1
  8. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +18 -1
  9. data/lib/isodoc/base_style/bands.scss +6 -3
  10. data/lib/isodoc/base_style/reset.scss +1 -1
  11. data/lib/isodoc/convert.rb +1 -0
  12. data/lib/isodoc/function/blocks.rb +5 -0
  13. data/lib/isodoc/function/cleanup.rb +12 -1
  14. data/lib/isodoc/function/i18n.rb +5 -5
  15. data/lib/isodoc/function/inline.rb +47 -12
  16. data/lib/isodoc/function/references.rb +47 -33
  17. data/lib/isodoc/function/reqt.rb +21 -6
  18. data/lib/isodoc/function/section.rb +18 -8
  19. data/lib/isodoc/function/table.rb +0 -1
  20. data/lib/isodoc/function/to_word_html.rb +4 -2
  21. data/lib/isodoc/function/utils.rb +10 -4
  22. data/lib/isodoc/function/xref_gen.rb +2 -1
  23. data/lib/isodoc/function/xref_sect_gen.rb +24 -24
  24. data/lib/isodoc/headlesshtml_convert.rb +5 -0
  25. data/lib/isodoc/html_convert.rb +5 -0
  26. data/lib/isodoc/html_function/footnotes.rb +2 -2
  27. data/lib/isodoc/html_function/html.rb +3 -0
  28. data/lib/isodoc/html_function/postprocess.rb +3 -2
  29. data/lib/isodoc/metadata.rb +30 -7
  30. data/lib/isodoc/metadata_date.rb +39 -0
  31. data/lib/isodoc/pdf_convert.rb +5 -0
  32. data/lib/isodoc/version.rb +1 -1
  33. data/lib/isodoc/word_convert.rb +5 -0
  34. data/lib/isodoc/word_function/body.rb +0 -4
  35. data/lib/isodoc/word_function/footnotes.rb +2 -2
  36. data/lib/isodoc/word_function/postprocess.rb +13 -2
  37. data/lib/isodoc/word_function/table.rb +1 -3
  38. data/lib/isodoc/xslfo_convert.rb +5 -0
  39. data/spec/isodoc/blocks_spec.rb +188 -8
  40. data/spec/isodoc/cleanup_spec.rb +181 -18
  41. data/spec/isodoc/i18n_spec.rb +12 -12
  42. data/spec/isodoc/inline_spec.rb +65 -5
  43. data/spec/isodoc/metadata_spec.rb +77 -2
  44. data/spec/isodoc/postproc_spec.rb +33 -11
  45. data/spec/isodoc/ref_spec.rb +12 -6
  46. data/spec/isodoc/section_spec.rb +220 -205
  47. data/spec/isodoc/table_spec.rb +24 -24
  48. data/spec/isodoc/terms_spec.rb +50 -6
  49. data/spec/isodoc/xref_spec.rb +64 -26
  50. metadata +3 -2
@@ -30,6 +30,8 @@ RSpec.describe IsoDoc do
30
30
  <date type="updated"><on>2018</on></date>
31
31
  <date type="unchanged"><on>2019</on></date>
32
32
  <date type="transmitted"><on>2020</on></date>
33
+ <date type="vote-started"><on>2021</on></date>
34
+ <date type="vote-ended"><on>2022</on></date>
33
35
  <edition>2</edition>
34
36
  <version>
35
37
  <revision-date>2016-05-01</revision-date>
@@ -92,7 +94,7 @@ RSpec.describe IsoDoc do
92
94
  </bibdata>
93
95
  </iso-standard>
94
96
  INPUT
95
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>["Barney Rubble", "Fred Flintstone"], :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]}, :circulateddate=>"2015", :confirmeddate=>"2017", :copieddate=>"2016", :createddate=>"2010&ndash;2011", :doc=>"URL E", :docnumber=>"17301-1", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :html=>"URL B", :implementeddate=>"XXX", :issueddate=>"XXX", :iteration=>"2", :obsoleteddate=>"2014", :pdf=>"URL D", :publisheddate=>"2011", :receiveddate=>"XXX", :revdate=>"2016-05-01", :stage=>"Committee draft", :stageabbr=>"CD", :substage=>"Withdrawn", :transmitteddate=>"2020", :unchangeddate=>"2019", :unpublished=>true, :updateddate=>"2018", :url=>"URL A", :xml=>"URL C"}
97
+ {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>["Barney Rubble", "Fred Flintstone"], :authors_affiliations=>{"Slate Inc., Bedrock"=>["Barney Rubble"], ""=>["Fred Flintstone"]}, :circulateddate=>"2015", :confirmeddate=>"2017", :copieddate=>"2016", :createddate=>"2010&ndash;2011", :doc=>"URL E", :docnumber=>"17301-1", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :html=>"URL B", :implementeddate=>"XXX", :issueddate=>"XXX", :iteration=>"2", :obsoleteddate=>"2014", :pdf=>"URL D", :publisheddate=>"2011", :publisher=>"", :receiveddate=>"XXX", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :stage=>"Committee draft", :stageabbr=>"CD", :substage=>"Withdrawn", :transmitteddate=>"2020", :unchangeddate=>"2019", :unpublished=>true, :updateddate=>"2018", :url=>"URL A", :vote_endeddate=>"2022", :vote_starteddate=>"2021", :xml=>"URL C"}
96
98
  OUTPUT
97
99
  end
98
100
 
@@ -108,6 +110,10 @@ OUTPUT
108
110
  <title language="en" format="text/plain">Cereals and pulses</title>
109
111
  <docidentifier>17301-1-3</docidentifier>
110
112
  <docnumber>17301</docnumber>
113
+ <date type="published"><on>2011-01</on></date>
114
+ <version>
115
+ <revision-date>2016-05</revision-date>
116
+ </version>
111
117
  <contributor>
112
118
  <role type="author"/>
113
119
  <organization>
@@ -117,14 +123,23 @@ OUTPUT
117
123
  <contributor>
118
124
  <role type="publisher"/>
119
125
  <organization>
126
+ <name>International Organization for Standardization</name>
120
127
  <abbreviation>ISO</abbreviation>
121
128
  </organization>
122
129
  </contributor>
123
130
  <contributor>
124
131
  <role type="publisher"/>
125
132
  <organization>
133
+ <name>International Electrotechnical Commission</name>
126
134
  <abbreviation>IEC</abbreviation>
127
135
  </organization>
136
+ </contributor>
137
+ <contributor>
138
+ <role type="publisher"/>
139
+ <organization>
140
+ <name>Institute of Electrical and Electronics Engineers</name>
141
+ <abbreviation>IEEE</abbreviation>
142
+ </organization>
128
143
  </contributor>
129
144
  <language>en</language>
130
145
  <script>Latn</script>
@@ -153,8 +168,68 @@ OUTPUT
153
168
  </version>
154
169
  </iso-standard>
155
170
  INPUT
156
- {:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05-01)", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :partof=>"IEC 8122", :publisheddate=>"XXX", :receiveddate=>"XXX", :revdate=>"2016-05-01", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX"}
171
+ {:accesseddate=>"XXX", :agency=>"ISO/IEC/IEEE", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :doctype=>"International Standard", :docyear=>"2016", :draft=>"12", :draftinfo=>" (draft 12, 2016-05)", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :partof=>"IEC 8122", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization, International Electrotechnical Commission and Institute of Electrical and Electronics Engineers", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"May 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX", :vote_endeddate=>"XXX", :vote_starteddate=>"XXX"}
157
172
  OUTPUT
158
173
  end
159
174
 
175
+ it "processes IsoXML metadata in French" do
176
+ c = IsoDoc::Convert.new({})
177
+ arr = c.convert_init(<<~"INPUT", "test", false)
178
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
179
+ <bibdata type="standard">
180
+ <language>fr</language>
181
+ <script>Latn</script>
182
+ </bibdata>
183
+ </iso-standard>
184
+ INPUT
185
+ expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
186
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
187
+ <bibdata type="standard">
188
+ <title language="fr" format="text/plain">Céréales et légumineuses</ti>
189
+ <title language="en" format="text/plain">Cereals and pulses</title>
190
+ <docidentifier>17301-1-3</docidentifier>
191
+ <docnumber>17301</docnumber>
192
+ <date type="published"><on>2011-01</on></date>
193
+ <version>
194
+ <revision-date>2016-05</revision-date>
195
+ </version>
196
+ <contributor>
197
+ <role type="author"/>
198
+ <organization>
199
+ <name>ISO</name>
200
+ </organization>
201
+ </contributor>
202
+ <contributor>
203
+ <role type="publisher"/>
204
+ <organization>
205
+ <name>International Organization for Standardization</name>
206
+ <abbreviation>ISO</abbreviation>
207
+ </organization>
208
+ </contributor>
209
+ <contributor>
210
+ <role type="publisher"/>
211
+ <organization>
212
+ <name>International Electrotechnical Commission</name>
213
+ <abbreviation>IEC</abbreviation>
214
+ </organization>
215
+ </contributor>
216
+ <language>fr</language>
217
+ <script>Latn</script>
218
+ <status><stage>Published</stage></status>
219
+ <copyright>
220
+ <from>2016</from>
221
+ <owner>
222
+ <organization>
223
+ <name>International Organization for Standardization</name>
224
+ </organization>
225
+ </owner>
226
+ </copyright>
227
+ </bibdata>
228
+ </iso-standard>
229
+ INPUT
230
+ {:accesseddate=>"XXX", :agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :circulateddate=>"XXX", :confirmeddate=>"XXX", :copieddate=>"XXX", :createddate=>"XXX", :docnumber=>"17301-1-3", :docnumeric=>"17301", :doctitle=>"Cereals and pulses", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :implementeddate=>"XXX", :issueddate=>"XXX", :obsoleteddate=>"XXX", :publisheddate=>"2011-01", :publisher=>"International Organization for Standardization et International Electrotechnical Commission", :receiveddate=>"XXX", :revdate=>"2016-05", :revdate_monthyear=>"Mai 2016", :stage=>"Published", :transmitteddate=>"XXX", :unchangeddate=>"XXX", :unpublished=>false, :updateddate=>"XXX", :vote_endeddate=>"XXX", :vote_starteddate=>"XXX"}
231
+ OUTPUT
232
+ end
233
+
234
+
160
235
  end
@@ -299,7 +299,7 @@ expect(File.exist?("test.doc")).to be true
299
299
  expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
300
300
  <div class="WordSection3">
301
301
  <p class="zzSTDTitle1"></p>
302
- <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1.<span style="mso-tab-count:1">&#xA0; </span>Terms and definitions</h1>
302
+ <div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1.<span style="mso-tab-count:1">&#xA0; </span>Terms and Definitions</h1>
303
303
  <p class="TermNum"><a name="paddy1" id="paddy1"></a>1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
304
304
  <p class="MsoNormal"><a name="_eb29b35e-123e-4d1c-b50b-2714d41e747f" id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"></a>rice retaining its husk after threshing</p>
305
305
  <p class="MsoNormal">[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified &#x2014; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p></div>
@@ -1095,7 +1095,7 @@ word = File.read("test.doc").sub(/^.*
  <div>
1096
1096
  <h1 class="ForewordTitle">Foreword</h1>
1097
1097
  <div align="center" class="table_container">
1098
- <table class="MsoISOTable" style="mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1098
+ <table class="MsoISOTable" style="mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;"><a name="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7" id="_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7"></a>
1099
1099
  <thead>
1100
1100
  <tr>
1101
1101
  <td rowspan="2" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;mso-border-bottom-alt:solid windowtext 1.0pt;">
@@ -1149,7 +1149,7 @@ word = File.read("test.doc").sub(/^.*
  <div>
1150
1150
  <h1 class='ForewordTitle'>Foreword</h1>
1151
1151
  <div align='center' class="table_container">
1152
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1152
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1153
1153
  <a name='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7' id='_fe12b8f8-6858-4cd6-af7d-d4b6f3ebd1a7'/>
1154
1154
  <thead>
1155
1155
  <tr>
@@ -1316,7 +1316,11 @@ OUTPUT
1316
1316
  <pagebreak orientation="portrait"/>
1317
1317
  <p>And up</p>
1318
1318
  </note>
1319
+ <pagebreak orientation="portrait"/>
1319
1320
  </clause></sections>
1321
+ <annex id="_level_1" inline-header="false" obligation="normative">
1322
+ <title>Annex 1</title>
1323
+ </annex>
1320
1324
  </standard-document>
1321
1325
  INPUT
1322
1326
  expect(File.exist?("test.doc")).to be true
@@ -1324,7 +1328,9 @@ OUTPUT
1324
1328
  expect(html).to include "div.WordSection2_0 {page:WordSection2P;}"
1325
1329
  expect(html).to include "div.WordSection2_1 {page:WordSection2L;}"
1326
1330
  expect(html).to include "div.WordSection3_0 {page:WordSection3P;}"
1327
- expect(html).to include "div.WordSection3_1 {page:WordSection3L;}"
1331
+ expect(html).to include "div.WordSection3_1 {page:WordSection3P;}"
1332
+ expect(html).to include "div.WordSection3_2 {page:WordSection3L;}"
1333
+
1328
1334
 
1329
1335
  expect(xmlpp(html.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1330
1336
  <body lang='EN-US' xml:lang='EN-US' link='blue' vlink='#954F72'>
@@ -1335,9 +1341,9 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1335
1341
  <br clear='all' class='section'/>
1336
1342
  </p>
1337
1343
  <div class='WordSection2'>
1338
- <p class='MsoNormal'>
1339
- <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1340
- </p>
1344
+ <p class='MsoNormal'>
1345
+ <br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
1346
+ </p>
1341
1347
  <div class='Section3' id=''>
1342
1348
  <h1 class='IntroTitle'>Introduction</h1>
1343
1349
  <p align='center' style='text-align:center' class='MsoNormal'>
@@ -1351,7 +1357,7 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1351
1357
  </div>
1352
1358
  <div class='WordSection2_1'>
1353
1359
  <div align='center' class='table_container'>
1354
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1360
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1355
1361
  <tbody>
1356
1362
  <tr>
1357
1363
  <td style='border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;'>A</td>
@@ -1396,10 +1402,10 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1396
1402
  </div>
1397
1403
  </div>
1398
1404
  </div>
1399
- <div class='WordSection3_1'>
1405
+ <div class='WordSection3_2'>
1400
1406
  <p class='TableTitle' style='text-align:center;'>Table 1</p>
1401
1407
  <div align='center' class='table_container'>
1402
- <table class='MsoISOTable' style='mso-table-lspace:15.0cm;margin-left:423.0pt;mso-table-rspace:15.0cm;margin-right:423.0pt;mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1408
+ <table class='MsoISOTable' style='mso-table-anchor-horizontal:column;mso-table-overlap:never;border-spacing:0;border-width:1px;'>
1403
1409
  <a name='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249' id='_c09a7e60-b0c7-4418-9bfc-2ef0bc09a249'/>
1404
1410
  <thead>
1405
1411
  <tr>
@@ -1433,8 +1439,24 @@ expect(xmlpp(html.sub(/^.*.*$}m, ""))).
1433
1439
  <br clear='all' class='section'/>
1434
1440
  </p>
1435
1441
  </div>
1436
- <div class='WordSection3_0'>
1442
+ <div class='WordSection3_1'>
1437
1443
  <p class='Note'>And up</p>
1444
+ <p class='MsoNormal'>
1445
+ <br clear='all' class='section'/>
1446
+ </p>
1447
+ </div>
1448
+ <div class='WordSection3_0'>
1449
+ <div class='Section3'>
1450
+ <a name='_level_1' id='_level_1'/>
1451
+ <h1 class='Annex'>
1452
+ <b>Annex A</b>
1453
+ <br/>
1454
+ (normative)
1455
+ <br/>
1456
+ <br/>
1457
+ <b>Annex 1</b>
1458
+ </h1>
1459
+ </div>
1438
1460
  </div>
1439
1461
  <div style='mso-element:footnote-list'/>
1440
1462
  </body>
@@ -16,14 +16,16 @@ RSpec.describe IsoDoc do
16
16
  <eref bibitemid="ref1"/>
17
17
  <eref bibitemid="ref10"/>
18
18
  <eref bibitemid="ref12"/>
19
+ <eref bibitemid="zip_ffs"/>
19
20
  </p>
20
21
  </foreword></preface>
21
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
22
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
22
23
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
23
24
  <bibitem id="ISO712" type="standard">
24
25
  <title format="text/plain">Cereals or cereal products</title>
25
26
  <title type="main" format="text/plain">Cereals and cereal products</title>
26
27
  <docidentifier type="ISO">ISO 712</docidentifier>
28
+ <docidentifier type="metanorma">[110]</docidentifier>
27
29
  <contributor>
28
30
  <role type="publisher"/>
29
31
  <organization>
@@ -64,8 +66,10 @@ RSpec.describe IsoDoc do
64
66
  <docidentifier type="ICC">167</docidentifier>
65
67
  </bibitem>
66
68
  <note><p>This is an annotation of ISO 20483:2013-2014</p></note>
69
+ <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
67
70
 
68
- </references><references id="_bibliography" obligation="informative">
71
+
72
+ </references><references id="_bibliography" obligation="informative" normative="false">
69
73
  <title>Bibliography</title>
70
74
  <bibitem id="ISBN" type="ISBN">
71
75
  <title format="text/plain">Chemicals for analytical laboratory use</title>
@@ -125,26 +129,28 @@ RSpec.describe IsoDoc do
125
129
  <div>
126
130
  <h1 class="ForewordTitle">Foreword</h1>
127
131
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
128
- <a href="#ISO712">ISO 712</a>
132
+ <a href="#ISO712">[110]</a>
129
133
  <a href="#ISBN">[1]</a>
130
134
  <a href="#ISSN">[2]</a>
131
135
  <a href="#ISO16634">ISO 16634:-- (all parts)</a>
132
136
  <a href="#ref1">ICC 167</a>
133
137
  <a href="#ref10">[10]</a>
134
- <a href="#ref12">[Citn]</a>
138
+ <a href="#ref12">Citn</a>
139
+ <a href='#zip_ffs'>[5]</a>
135
140
  </p>
136
141
  </div>
137
142
  <p class="zzSTDTitle1"/>
138
143
  <div>
139
144
  <h1>1.&#160; Normative references</h1>
140
145
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
141
- <p id="ISO712" class="NormRef">ISO 712, <i>Cereals and cereal products</i></p>
146
+ <p id="ISO712" class="NormRef">[110], ISO 712, <i>Cereals and cereal products</i></p>
142
147
  <p id="ISO16634" class="NormRef">ISO 16634:-- (all parts)<a rel="footnote" href="#fn:1" epub:type="footnote"><sup>1</sup></a>, <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i></p>
143
148
  <p id="ISO20483" class="NormRef">ISO 20483:2013-2014, <i>Cereals and pulses</i></p>
144
149
  <p id="ref1" class="NormRef">ICC 167, <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
145
150
  <div id="" class="Note">
146
151
  <p><span class="note_label">NOTE</span>&#160; This is an annotation of ISO 20483:2013-2014</p>
147
152
  </div>
153
+ <p id='zip_ffs' class='NormRef'>[5], Title 5</p>
148
154
  </div>
149
155
  <br/>
150
156
  <div>
@@ -160,7 +166,7 @@ RSpec.describe IsoDoc do
160
166
  <p id="ISO3696" class="Biblio">[3]&#160; ISO 3696, <i>Water for analytical laboratory use</i></p>
161
167
  <p id="ref10" class="Biblio">[10]&#160; <span style="font-variant:small-caps;">Standard No I.C.C 167</span>. <i>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</i> (see <a href="http://www.icc.or.at">http://www.icc.or.at</a>)</p>
162
168
  <p id="ref11" class="Biblio">[5]&#160; IETF RFC 10, <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i></p>
163
- <p id="ref12" class="Biblio">[6]&#160; Citn, CitationWorks. 2019. <i>How to cite a reference</i>.</p>
169
+ <p id="ref12" class="Biblio">[6]&#160; Citn, IETF RFC 20, CitationWorks. 2019. <i>How to cite a reference</i>.</p>
164
170
  </div>
165
171
  <aside id="fn:1" class="footnote">
166
172
  <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
@@ -112,16 +112,16 @@ RSpec.describe IsoDoc do
112
112
  <clause id="Q1" inline-header="false" obligation="normative">
113
113
  <title>Annex A.1a</title>
114
114
  </clause>
115
- <references id="Q2"><title>Annex Bibliography</title></references>
115
+ <references id="Q2" normative="false"><title>Annex Bibliography</title></references>
116
116
  </clause>
117
117
  </annex>
118
118
  <annex id="P1" inline-header="false" obligation="normative">
119
119
  </annex>
120
- <bibliography><references id="R" obligation="informative">
120
+ <bibliography><references id="R" obligation="informative" normative="true">
121
121
  <title>Normative References</title>
122
122
  </references><clause id="S" obligation="informative">
123
123
  <title>Bibliography</title>
124
- <references id="T" obligation="informative">
124
+ <references id="T" obligation="informative" normative="false">
125
125
  <title>Bibliography Subsection</title>
126
126
  </references>
127
127
  </clause>
@@ -188,7 +188,7 @@ RSpec.describe IsoDoc do
188
188
  <div>
189
189
  <h1>2.&#160; Normative references</h1>
190
190
  </div>
191
- <div id="H"><h1>3.&#160; Terms, definitions, symbols and abbreviated terms</h1>
191
+ <div id="H"><h1>3.&#160; Terms, Definitions, Symbols and Abbreviated Terms</h1>
192
192
  <div id="I">
193
193
  <h2>3.1.&#160; Normal Terms</h2>
194
194
  <p class="TermNum" id="J">3.1.1.</p>
@@ -342,11 +342,11 @@ OUTPUT
342
342
  </annex>
343
343
  <annex id="P1" inline-header="false" obligation="normative">
344
344
  </annex>
345
- <bibliography><references id="R" obligation="informative">
345
+ <bibliography><references id="R" obligation="informative" normative="true">
346
346
  <title>Normative References</title>
347
347
  </references><clause id="S" obligation="informative">
348
348
  <title>Bibliography</title>
349
- <references id="T" obligation="informative">
349
+ <references id="T" obligation="informative" normative="false">
350
350
  <title>Bibliography Subsection</title>
351
351
  </references>
352
352
  </clause>
@@ -429,7 +429,7 @@ OUTPUT
429
429
  <div>
430
430
  <h1>2.<span style="mso-tab-count:1">&#160; </span>Normative references</h1>
431
431
  </div>
432
- <div id="H"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms, definitions, symbols and abbreviated terms</h1>
432
+ <div id="H"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms, Definitions, Symbols and Abbreviated Terms</h1>
433
433
  <div id="I">
434
434
  <h2>3.1.<span style="mso-tab-count:1">&#160; </span>Normal Terms</h2>
435
435
  <p class="TermNum" id="J">3.1.1.</p>
@@ -579,210 +579,225 @@ OUTPUT
579
579
  <clause id="Q1" inline-header="false" obligation="normative">
580
580
  <title>Annex A.1a<fn reference="17"><p>A</p></fn></title>
581
581
  </clause>
582
- <references id="Q2"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
582
+ <references id="Q2" normative="false"><title>Annex Bibliography<fn reference="18"><p>A</p></fn></title></references>
583
583
  </clause>
584
- </annex><bibliography><references id="R" obligation="informative">
584
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
585
585
  <title>Normative References<fn reference="19"><p>A</p></fn></title>
586
586
  </references><clause id="S" obligation="informative">
587
587
  <title>Bibliography<fn reference="20"><p>A</p></fn></title>
588
- <references id="T" obligation="informative">
588
+ <references id="T" obligation="informative" normative="false">
589
589
  <title>Bibliography Subsection<fn reference="21"><p>A</p></fn></title>
590
590
  </references>
591
591
  </clause>
592
592
  </bibliography>
593
593
  </iso-standard>
594
594
  INPUT
595
- <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
596
- <head/>
597
- <body lang='en'>
598
- <div class='title-section'>
599
- <p>&#160;</p>
600
- </div>
601
- <br/>
602
- <div class='prefatory-section'>
603
- <p>&#160;</p>
604
- </div>
605
- <br/>
606
- <div class='main-section'>
607
- <div class='authority'>
608
- <div class='boilerplate-copyright'>
609
- <div>
610
- <h1>
611
- Copyright
612
- <a rel='footnote' href='#fn:1' epub:type='footnote'>
613
- <sup>1</sup>
614
- </a>
615
- </h1>
616
- </div>
617
- </div>
618
- <div class='boilerplate-license'>
619
- <div>
620
- <h1>
621
- License
622
- <a rel='footnote' href='#fn:2' epub:type='footnote'>
623
- <sup>2</sup>
624
- </a>
625
- </h1>
626
- </div>
627
- </div>
628
- <div class='boilerplate-legal'>
629
- <div>
630
- <h1>
631
- Legal
632
- <a rel='footnote' href='#fn:3' epub:type='footnote'>
633
- <sup>3</sup>
634
- </a>
635
- </h1>
636
- </div>
637
- </div>
638
- <div class='boilerplate-feedback'>
639
- <div>
640
- <h1>
641
- Feedback
642
- <a rel='footnote' href='#fn:4' epub:type='footnote'>
643
- <sup>4</sup>
644
- </a>
645
- </h1>
646
- </div>
647
- </div>
648
- </div>
649
- <br/>
650
- <div>
651
- <h1 class='AbstractTitle'>Abstract</h1>
652
- </div>
653
- <br/>
654
- <div>
655
- <h1 class='ForewordTitle'>Foreword</h1>
656
- <p id='A'>This is a preamble</p>
657
- </div>
658
- <br/>
659
- <div class='Section3' id='B'>
660
- <h1 class='IntroTitle'>Introduction</h1>
661
- <div id='C'>
662
- <h2>
663
- Introduction Subsection
664
- <a rel='footnote' href='#fn:8' epub:type='footnote'>
665
- <sup>8</sup>
666
- </a>
667
- </h2>
668
- </div>
669
- </div>
670
- <p class='zzSTDTitle1'/>
671
- <div id='H'>
672
- <h1>1.&#160; Terms, definitions, symbols and abbreviated terms</h1>
673
- <div id='I'>
674
- <h2>
675
- 1.1.&#160; Normal Terms
676
- <a rel='footnote' href='#fn:11' epub:type='footnote'>
677
- <sup>11</sup>
678
- </a>
679
- </h2>
680
- <p class='TermNum' id='J'>1.1.1.</p>
681
- <p class='Terms' style='text-align:left;'>Term2</p>
682
- </div>
683
- <div id='K'>
684
- <h2>
685
- 1.2.&#160; Definitions
686
- <a rel='footnote' href='#fn:12' epub:type='footnote'>
687
- <sup>12</sup>
688
- </a>
689
- </h2>
690
- <dl>
691
- <dt>
692
- <p>Symbol</p>
693
- </dt>
694
- <dd>Definition</dd>
695
- </dl>
696
- </div>
697
- </div>
698
- <div id='L' class='Symbols'>
699
- <h1>2.&#160; Symbols and abbreviated terms</h1>
700
- <dl>
701
- <dt>
702
- <p>Symbol</p>
703
- </dt>
704
- <dd>Definition</dd>
705
- </dl>
706
- </div>
707
- <div id='D'>
708
- <h1>
709
- 3.&#160; Scope
710
- <a rel='footnote' href='#fn:9' epub:type='footnote'>
711
- <sup>9</sup>
712
- </a>
713
- </h1>
714
- <p id='E'>Text</p>
715
- </div>
716
- <div id='M'>
717
- <h1>
718
- 4.&#160; Clause 4
719
- <a rel='footnote' href='#fn:13' epub:type='footnote'>
720
- <sup>13</sup>
721
- </a>
722
- </h1>
723
- <div id='N'>
724
- <h2>
725
- 4.1.&#160; Introduction
726
- <a rel='footnote' href='#fn:1' epub:type='footnote'>
727
- <sup>1</sup>
728
- </a>
729
- </h2>
730
- </div>
731
- <div id='O'>
732
- <h2>
733
- 4.2.&#160; Clause 4.2
734
- <a rel='footnote' href='#fn:14' epub:type='footnote'>
735
- <sup>14</sup>
736
- </a>
737
- </h2>
738
- </div>
739
- <div id='O1'>
740
- <h2>4.3.&#160; </h2>
741
- </div>
742
- </div>
743
- <br/>
744
- <div id='P' class='Section3'>
745
- <h1 class='Annex'>
746
- <b>Annex A</b>
747
- <br/>
748
- (normative)
749
- <br/>
750
- <br/>
751
- <b>
752
- Annex
753
- <a rel='footnote' href='#fn:15' epub:type='footnote'>
754
- <sup>15</sup>
755
- </a>
756
- </b>
757
- </h1>
758
- <div id='Q'>
759
- <h2>
760
- A.1.&#160; Annex A.1
761
- <a rel='footnote' href='#fn:16' epub:type='footnote'>
762
- <sup>16</sup>
763
- </a>
764
- </h2>
765
- <div id='Q1'>
766
- <h3>
767
- A.1.1.&#160; Annex A.1a
768
- <a rel='footnote' href='#fn:17' epub:type='footnote'>
769
- <sup>17</sup>
770
- </a>
771
- </h3>
772
- </div>
773
- <div>
774
- <h3>
775
- A.1.2.&#160; Annex Bibliography
776
- <a rel='footnote' href='#fn:18' epub:type='footnote'>
777
- <sup>18</sup>
778
- </a>
779
- </h3>
780
- </div>
781
- </div>
782
- </div>
783
- </div>
784
- </body>
785
- </html>
595
+ <html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
596
+ <head/>
597
+ <body lang='en'>
598
+ <div class='title-section'>
599
+ <p>&#160;</p>
600
+ </div>
601
+ <br/>
602
+ <div class='prefatory-section'>
603
+ <p>&#160;</p>
604
+ </div>
605
+ <br/>
606
+ <div class='main-section'>
607
+ <div class='authority'>
608
+ <div class='boilerplate-copyright'>
609
+ <div>
610
+ <h1>
611
+ Copyright
612
+ <a rel='footnote' href='#fn:1' epub:type='footnote'>
613
+ <sup>1</sup>
614
+ </a>
615
+ </h1>
616
+ </div>
617
+ </div>
618
+ <div class='boilerplate-license'>
619
+ <div>
620
+ <h1>
621
+ License
622
+ <a rel='footnote' href='#fn:2' epub:type='footnote'>
623
+ <sup>2</sup>
624
+ </a>
625
+ </h1>
626
+ </div>
627
+ </div>
628
+ <div class='boilerplate-legal'>
629
+ <div>
630
+ <h1>
631
+ Legal
632
+ <a rel='footnote' href='#fn:3' epub:type='footnote'>
633
+ <sup>3</sup>
634
+ </a>
635
+ </h1>
636
+ </div>
637
+ </div>
638
+ <div class='boilerplate-feedback'>
639
+ <div>
640
+ <h1>
641
+ Feedback
642
+ <a rel='footnote' href='#fn:4' epub:type='footnote'>
643
+ <sup>4</sup>
644
+ </a>
645
+ </h1>
646
+ </div>
647
+ </div>
648
+ </div>
649
+ <br/>
650
+ <div>
651
+ <h1 class='AbstractTitle'>Abstract</h1>
652
+ </div>
653
+ <br/>
654
+ <div>
655
+ <h1 class='ForewordTitle'>Foreword</h1>
656
+ <p id='A'>This is a preamble</p>
657
+ </div>
658
+ <br/>
659
+ <div class='Section3' id='B'>
660
+ <h1 class='IntroTitle'>Introduction</h1>
661
+ <div id='C'>
662
+ <h2>
663
+ Introduction Subsection
664
+ <a rel='footnote' href='#fn:8' epub:type='footnote'>
665
+ <sup>8</sup>
666
+ </a>
667
+ </h2>
668
+ </div>
669
+ </div>
670
+ <p class='zzSTDTitle1'/>
671
+ <div>
672
+ <h1>1.&#160; Normative references</h1>
673
+ </div>
674
+ <div id='H'>
675
+ <h1>
676
+ 2.&#160; Terms, Definitions, Symbols and Abbreviated Terms
677
+ <a rel='footnote' href='#fn:10' epub:type='footnote'>
678
+ <sup>10</sup>
679
+ </a>
680
+ </h1>
681
+ <div id='I'>
682
+ <h2>
683
+ 2.1.&#160; Normal Terms
684
+ <a rel='footnote' href='#fn:11' epub:type='footnote'>
685
+ <sup>11</sup>
686
+ </a>
687
+ </h2>
688
+ <p class='TermNum' id='J'>2.1.1.</p>
689
+ <p class='Terms' style='text-align:left;'>Term2</p>
690
+ </div>
691
+ <div id='K'>
692
+ <h2>
693
+ 2.2.&#160; Definitions
694
+ <a rel='footnote' href='#fn:12' epub:type='footnote'>
695
+ <sup>12</sup>
696
+ </a>
697
+ </h2>
698
+ <dl>
699
+ <dt>
700
+ <p>Symbol</p>
701
+ </dt>
702
+ <dd>Definition</dd>
703
+ </dl>
704
+ </div>
705
+ </div>
706
+ <div id='L' class='Symbols'>
707
+ <h1>3.&#160; Symbols and abbreviated terms</h1>
708
+ <dl>
709
+ <dt>
710
+ <p>Symbol</p>
711
+ </dt>
712
+ <dd>Definition</dd>
713
+ </dl>
714
+ </div>
715
+ <div id='D'>
716
+ <h1>
717
+ 4.&#160; Scope
718
+ <a rel='footnote' href='#fn:9' epub:type='footnote'>
719
+ <sup>9</sup>
720
+ </a>
721
+ </h1>
722
+ <p id='E'>Text</p>
723
+ </div>
724
+ <div id='M'>
725
+ <h1>
726
+ 5.&#160; Clause 4
727
+ <a rel='footnote' href='#fn:13' epub:type='footnote'>
728
+ <sup>13</sup>
729
+ </a>
730
+ </h1>
731
+ <div id='N'>
732
+ <h2>
733
+ 5.1.&#160; Introduction
734
+ <a rel='footnote' href='#fn:1' epub:type='footnote'>
735
+ <sup>1</sup>
736
+ </a>
737
+ </h2>
738
+ </div>
739
+ <div id='O'>
740
+ <h2>
741
+ 5.2.&#160; Clause 4.2
742
+ <a rel='footnote' href='#fn:14' epub:type='footnote'>
743
+ <sup>14</sup>
744
+ </a>
745
+ </h2>
746
+ </div>
747
+ <div id='O1'>
748
+ <h2>5.3.&#160; </h2>
749
+ </div>
750
+ </div>
751
+ <br/>
752
+ <div id='P' class='Section3'>
753
+ <h1 class='Annex'>
754
+ <b>Annex A</b>
755
+ <br/>
756
+ (normative)
757
+ <br/>
758
+ <br/>
759
+ <b>
760
+ Annex
761
+ <a rel='footnote' href='#fn:15' epub:type='footnote'>
762
+ <sup>15</sup>
763
+ </a>
764
+ </b>
765
+ </h1>
766
+ <div id='Q'>
767
+ <h2>
768
+ A.1.&#160; Annex A.1
769
+ <a rel='footnote' href='#fn:16' epub:type='footnote'>
770
+ <sup>16</sup>
771
+ </a>
772
+ </h2>
773
+ <div id='Q1'>
774
+ <h3>
775
+ A.1.1.&#160; Annex A.1a
776
+ <a rel='footnote' href='#fn:17' epub:type='footnote'>
777
+ <sup>17</sup>
778
+ </a>
779
+ </h3>
780
+ </div>
781
+ <div>
782
+ <h3>
783
+ A.1.2.&#160; Annex Bibliography
784
+ <a rel='footnote' href='#fn:18' epub:type='footnote'>
785
+ <sup>18</sup>
786
+ </a>
787
+ </h3>
788
+ </div>
789
+ </div>
790
+ </div>
791
+ <br/>
792
+ <div>
793
+ <h1 class='Section3'>Bibliography</h1>
794
+ <div>
795
+ <h2 class='Section3'>Bibliography SubsectionA</h2>
796
+ </div>
797
+ </div>
798
+ </div>
799
+ </body>
800
+ </html>
786
801
  OUTPUT
787
802
  end
788
803
 
@@ -840,11 +855,11 @@ OUTPUT
840
855
  <title>Annex A.1a</title>
841
856
  </clause>
842
857
  </clause>
843
- </annex><bibliography><references id="R" obligation="informative">
858
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
844
859
  <title>Normative References</title>
845
860
  </references><clause id="S" obligation="informative">
846
861
  <title>Bibliography</title>
847
- <references id="T" obligation="informative">
862
+ <references id="T" obligation="informative" normative="false">
848
863
  <title>Bibliography Subsection</title>
849
864
  </references>
850
865
  </clause>
@@ -872,7 +887,7 @@ OUTPUT
872
887
  <div>
873
888
  <h1>Normative references</h1>
874
889
  </div>
875
- <div id="H"><h1>Terms, definitions, symbols and abbreviated terms</h1>
890
+ <div id="H"><h1>Terms, Definitions, Symbols and Abbreviated Terms</h1>
876
891
  <div id="I"><h2>Normal Terms</h2>
877
892
 
878
893
  <p class="TermNum" id="J">3.1.1.</p>
@@ -964,7 +979,7 @@ OUTPUT
964
979
  INPUT
965
980
  #{HTML_HDR}
966
981
  <p class="zzSTDTitle1"/>
967
- <div id="H"><h1>1.&#160; Terms and definitions</h1>
982
+ <div id="H"><h1>1.&#160; Terms, Definitions, Symbols and Abbreviated Terms</h1>
968
983
  <p class="TermNum" id="J">1.1.</p>
969
984
  <p class="Terms" style="text-align:left;">Term2</p>
970
985
  </div>