isodoc 1.0.22 → 1.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +12 -5
- data/.github/workflows/ubuntu.yml +27 -6
- data/.github/workflows/windows.yml +13 -7
- data/README.adoc +3 -2
- data/lib/isodoc-yaml/i18n-en.yaml +18 -1
- data/lib/isodoc-yaml/i18n-fr.yaml +18 -1
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +18 -1
- data/lib/isodoc/base_style/bands.scss +6 -3
- data/lib/isodoc/base_style/reset.scss +1 -1
- data/lib/isodoc/convert.rb +1 -0
- data/lib/isodoc/function/blocks.rb +5 -0
- data/lib/isodoc/function/cleanup.rb +12 -1
- data/lib/isodoc/function/i18n.rb +5 -5
- data/lib/isodoc/function/inline.rb +47 -12
- data/lib/isodoc/function/references.rb +47 -33
- data/lib/isodoc/function/reqt.rb +21 -6
- data/lib/isodoc/function/section.rb +18 -8
- data/lib/isodoc/function/table.rb +0 -1
- data/lib/isodoc/function/to_word_html.rb +4 -2
- data/lib/isodoc/function/utils.rb +10 -4
- data/lib/isodoc/function/xref_gen.rb +2 -1
- data/lib/isodoc/function/xref_sect_gen.rb +24 -24
- data/lib/isodoc/headlesshtml_convert.rb +5 -0
- data/lib/isodoc/html_convert.rb +5 -0
- data/lib/isodoc/html_function/footnotes.rb +2 -2
- data/lib/isodoc/html_function/html.rb +3 -0
- data/lib/isodoc/html_function/postprocess.rb +3 -2
- data/lib/isodoc/metadata.rb +30 -7
- data/lib/isodoc/metadata_date.rb +39 -0
- data/lib/isodoc/pdf_convert.rb +5 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_convert.rb +5 -0
- data/lib/isodoc/word_function/body.rb +0 -4
- data/lib/isodoc/word_function/footnotes.rb +2 -2
- data/lib/isodoc/word_function/postprocess.rb +13 -2
- data/lib/isodoc/word_function/table.rb +1 -3
- data/lib/isodoc/xslfo_convert.rb +5 -0
- data/spec/isodoc/blocks_spec.rb +188 -8
- data/spec/isodoc/cleanup_spec.rb +181 -18
- data/spec/isodoc/i18n_spec.rb +12 -12
- data/spec/isodoc/inline_spec.rb +65 -5
- data/spec/isodoc/metadata_spec.rb +77 -2
- data/spec/isodoc/postproc_spec.rb +33 -11
- data/spec/isodoc/ref_spec.rb +12 -6
- data/spec/isodoc/section_spec.rb +220 -205
- data/spec/isodoc/table_spec.rb +24 -24
- data/spec/isodoc/terms_spec.rb +50 -6
- data/spec/isodoc/xref_spec.rb +64 -26
- 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–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–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
|
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">  </span>Terms and
|
|
302
|
+
<div><a name="_terms_and_definitions" id="_terms_and_definitions"></a><h1>1.<span style="mso-tab-count:1">  </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 — 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(/^.* /m, ' |
<div>
|
|
1096
1096
|
<h1 class="ForewordTitle">Foreword</h1>
|
|
1097
1097
|
<div align="center" class="table_container">
|
|
1098
|
-
<table class="MsoISOTable" style="mso-table-
|
|
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(/^.* /m, ' |
<div>
|
|
1150
1150
|
<h1 class='ForewordTitle'>Foreword</h1>
|
|
1151
1151
|
<div align='center' class="table_container">
|
|
1152
|
-
<table class='MsoISOTable' style='mso-table-
|
|
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:
|
|
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
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
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-
|
|
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='
|
|
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-
|
|
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='
|
|
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>
|
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -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
|
-
|
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">
|
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">
|
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.  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>  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]  ISO 3696, <i>Water for analytical laboratory use</i></p>
|
161
167
|
<p id="ref10" class="Biblio">[10]  <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]  IETF RFC 10, <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i></p>
|
163
|
-
<p id="ref12" class="Biblio">[6]  Citn, CitationWorks. 2019. <i>How to cite a reference</i>.</p>
|
169
|
+
<p id="ref12" class="Biblio">[6]  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>
|
data/spec/isodoc/section_spec.rb
CHANGED
@@ -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.  Normative references</h1>
|
190
190
|
</div>
|
191
|
-
<div id="H"><h1>3.  Terms,
|
191
|
+
<div id="H"><h1>3.  Terms, Definitions, Symbols and Abbreviated Terms</h1>
|
192
192
|
<div id="I">
|
193
193
|
<h2>3.1.  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">  </span>Normative references</h1>
|
431
431
|
</div>
|
432
|
-
<div id="H"><h1>3.<span style="mso-tab-count:1">  </span>Terms,
|
432
|
+
<div id="H"><h1>3.<span style="mso-tab-count:1">  </span>Terms, Definitions, Symbols and Abbreviated Terms</h1>
|
433
433
|
<div id="I">
|
434
434
|
<h2>3.1.<span style="mso-tab-count:1">  </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
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
</
|
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> </p>
|
600
|
+
</div>
|
601
|
+
<br/>
|
602
|
+
<div class='prefatory-section'>
|
603
|
+
<p> </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.  Normative references</h1>
|
673
|
+
</div>
|
674
|
+
<div id='H'>
|
675
|
+
<h1>
|
676
|
+
2.  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.  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.  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.  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.  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.  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.  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.  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.  </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.  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.  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.  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,
|
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.  Terms and
|
982
|
+
<div id="H"><h1>1.  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>
|