metanorma-iec 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,8 @@ require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
4
  module Iec
5
- def self.pdf_fonts
6
- ["Arial", "Times New Roman", "HanSans", "Courier"]
5
+ def self.fonts_used
6
+ ["Arial", "Times New Roman", "HanSans", "Courier New"]
7
7
  end
8
8
 
9
9
  class Processor < Metanorma::Processor
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
5
5
  end
6
6
 
@@ -542,23 +542,8 @@ OUTPUT
542
542
  INPUT
543
543
  html = File.read("test.html", encoding: "utf-8")
544
544
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
545
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
546
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
547
- end
548
-
549
- it "uses default fonts for alt doc" do
550
- FileUtils.rm_f "test_alt.html"
551
- Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)
552
- = Document title
553
- Author
554
- :docfile: test.adoc
555
- :novalid:
556
- :no-isobib:
557
- INPUT
558
- html = File.read("test_alt.html", encoding: "utf-8")
559
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
560
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
561
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
545
+ expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
546
+ expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
562
547
  end
563
548
 
564
549
  it "uses Chinese fonts" do
@@ -113,7 +113,7 @@ RSpec.describe Asciidoctor::Iec do
113
113
  <title>Terms and definitions</title>
114
114
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
115
115
  #{TERMS_BOILERPLATE}
116
- <term id="_">
116
+ <term id="term-term1">
117
117
  <preferred>Term1</preferred>
118
118
  <termnote id="_">
119
119
  <p id="_">This is a note</p>
@@ -224,7 +224,7 @@ RSpec.describe Asciidoctor::Iec do
224
224
  <title>Terms and definitions</title>
225
225
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
226
226
  #{TERMS_BOILERPLATE}
227
- <term id="_">
227
+ <term id="term-term1">
228
228
  <preferred>Term1</preferred>
229
229
  <termexample id="_">
230
230
  <p id="_">This is an example</p>
@@ -426,7 +426,7 @@ RSpec.describe Asciidoctor::Iec do
426
426
  <title>Terms and definitions</title>
427
427
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
428
428
  #{TERMS_BOILERPLATE}
429
- <term id="_">
429
+ <term id="term-term1">
430
430
  <preferred>Term1</preferred>
431
431
  <termsource status="identical">
432
432
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -458,7 +458,7 @@ RSpec.describe Asciidoctor::Iec do
458
458
  <title>Terms and definitions</title>
459
459
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
460
460
  #{TERMS_BOILERPLATE}
461
- <term id="_">
461
+ <term id="term-term1">
462
462
  <preferred>Term1</preferred>
463
463
  <termsource status="modified">
464
464
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -34,7 +34,7 @@ RSpec.describe Asciidoctor::Iec do
34
34
  <p id="_">For the purposes of this document,
35
35
  the following terms and definitions apply.</p>
36
36
  #{TERMS_BOILERPLATE}
37
- <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
37
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
38
38
  <definition><p id="_">Time</p></definition></term>
39
39
  </terms>
40
40
  </sections>
@@ -70,7 +70,7 @@ RSpec.describe Asciidoctor::Iec do
70
70
  <p id="_">For the purposes of this document,
71
71
  the following terms and definitions apply.</p>
72
72
  #{TERMS_BOILERPLATE}
73
- <term id="_"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
73
+ <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
74
74
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>A</mi></msub></math></stem>
75
75
  </formula><p id="_">This paragraph is extraneous</p></definition>
76
76
  </term>
@@ -100,7 +100,7 @@ RSpec.describe Asciidoctor::Iec do
100
100
  the following terms and definitions apply.</p>
101
101
  #{TERMS_BOILERPLATE}
102
102
 
103
- <term id="_">
103
+ <term id="term-time">
104
104
  <preferred>Time</preferred>
105
105
  <definition><p id="_">This paragraph is extraneous</p></definition>
106
106
  </term></terms>
@@ -126,7 +126,7 @@ RSpec.describe Asciidoctor::Iec do
126
126
  <eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
127
127
  </p>
128
128
  </foreword></preface><sections>
129
- </sections><bibliography><references id="_" obligation="informative">
129
+ </sections><bibliography><references id="_" obligation="informative" normative="false">
130
130
  <title>Bibliography</title>
131
131
  <bibitem id="iso216" type="standard">
132
132
  <title format="text/plain">Reference</title>
@@ -161,7 +161,7 @@ RSpec.describe Asciidoctor::Iec do
161
161
  <title>Terms and definitions</title>
162
162
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
163
163
  #{TERMS_BOILERPLATE}
164
- <term id="_">
164
+ <term id="term-term1">
165
165
  <preferred>Term1</preferred>
166
166
  <termsource status="identical">
167
167
  <origin bibitemid="ISO2191" type="inline" citeas="">
@@ -189,7 +189,7 @@ RSpec.describe Asciidoctor::Iec do
189
189
  INPUT
190
190
  #{BLANK_HDR}
191
191
  <sections></sections>
192
- <bibliography><references id="_" obligation="informative"><title>Normative References</title>
192
+ <bibliography><references id="_" obligation="informative" normative="true"><title>Normative References</title>
193
193
  <p id="_">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>
194
194
  <bibitem id="iso216" type="standard">
195
195
  <title format="text/plain">Reference</title>
@@ -67,7 +67,7 @@ RSpec.describe Asciidoctor::Iec do
67
67
  #{BOILERPLATE}
68
68
  <sections> </sections>
69
69
  <bibliography>
70
- <references id='_' obligation='informative'>
70
+ <references id='_' obligation='informative' normative="true">
71
71
  <title>Normative References</title>
72
72
  <p id='_'>There are no normative references in this document.</p>
73
73
  <bibitem id='A'>
@@ -148,7 +148,7 @@ INPUT
148
148
  <title>Terms and definitions</title>
149
149
  <terms id='_' obligation='normative'>
150
150
  <title>General</title>
151
- <term id='_'>
151
+ <term id='term-term-1'>
152
152
  <preferred>Term 1</preferred>
153
153
  </term>
154
154
  </terms>
@@ -127,7 +127,7 @@ RSpec.describe Asciidoctor::Iec do
127
127
  #{BLANK_HDR}
128
128
  <sections>
129
129
 
130
- </sections><bibliography><references id="_" obligation="informative">
130
+ </sections><bibliography><references id="_" obligation="informative" normative="true">
131
131
  <title>Normative References</title>
132
132
  <p id="_">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>
133
133
  <bibitem id="ISO712">
@@ -69,7 +69,7 @@ RSpec.describe Asciidoctor::Iec do
69
69
  <title>Terms and definitions</title>
70
70
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
71
71
  #{TERMS_BOILERPLATE}
72
- <term id="_">
72
+ <term id="term-term1">
73
73
  <preferred>Term1</preferred>
74
74
  </term>
75
75
  </terms>
@@ -94,7 +94,7 @@ RSpec.describe Asciidoctor::Iec do
94
94
  </p>
95
95
  </li>
96
96
  </ul>
97
- <term id="_">
97
+ <term id="term-term2">
98
98
  <preferred>Term2</preferred>
99
99
  </term>
100
100
  </terms>
@@ -118,11 +118,11 @@ RSpec.describe Asciidoctor::Iec do
118
118
  </clause>
119
119
  <appendix id="_" inline-header="false" obligation="normative">
120
120
  <title>Appendix 1</title>
121
- </appendix></annex><bibliography><references id="_" obligation="informative">
121
+ </appendix></annex><bibliography><references id="_" obligation="informative" normative="true">
122
122
  <title>Normative References</title><p id="_">There are no normative references in this document.</p>
123
123
  </references><clause id="_" obligation="informative">
124
124
  <title>Bibliography</title>
125
- <references id="_" obligation="informative">
125
+ <references id="_" obligation="informative" normative="false">
126
126
  <title>Bibliography Subsection</title>
127
127
  </references>
128
128
  </clause>
@@ -209,7 +209,7 @@ RSpec.describe Asciidoctor::Iec do
209
209
  <title>Terms and definitions</title>
210
210
  <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
211
211
  #{TERMS_BOILERPLATE}
212
- <term id="_">
212
+ <term id="term-term1">
213
213
  <preferred>Term1</preferred>
214
214
  </term>
215
215
  </terms>
@@ -236,7 +236,7 @@ RSpec.describe Asciidoctor::Iec do
236
236
  </p>
237
237
  </li>
238
238
  </ul>
239
- <term id='_'>
239
+ <term id='term-term2'>
240
240
  <preferred>Term2</preferred>
241
241
  </term>
242
242
  </terms>
@@ -267,13 +267,13 @@ RSpec.describe Asciidoctor::Iec do
267
267
  </appendix>
268
268
  </annex>
269
269
  <bibliography>
270
- <references id='_' obligation='informative'>
270
+ <references id='_' obligation='informative' normative="true">
271
271
  <title>Normative References</title>
272
272
  <p id="_">There are no normative references in this document.</p>
273
273
  </references>
274
274
  <clause id='_' obligation='informative'>
275
275
  <title>Bibliography</title>
276
- <references id='_' obligation='informative'>
276
+ <references id='_' obligation='informative' normative="false">
277
277
  <title>Bibliography Subsection</title>
278
278
  </references>
279
279
  </clause>
@@ -269,14 +269,14 @@ p.Terms {
269
269
  font-size: 0.9em;
270
270
  overflow: auto;
271
271
  padding: 0 0 0 20px;
272
- background-color: #f7f7f7;
272
+ background-color: #f5faff;
273
273
  line-height: 1.2em; }
274
274
  #toggle {
275
275
  position: fixed;
276
276
  height: 100%;
277
277
  width: 30px;
278
278
  border-right: solid black 1px;
279
- background-color: #f7f7f7;
279
+ background-color: #f5faff;
280
280
  color: black !important;
281
281
  cursor: pointer;
282
282
  margin-left: -4em;
@@ -506,7 +506,7 @@ p.Biblio, p.NormRef {
506
506
  font-variant-ligatures: none; }
507
507
 
508
508
  .figure, .Sourcecode {
509
- background-color: #f7f7f7;
509
+ background-color: #f5faff;
510
510
  line-height: 1.6em;
511
511
  padding: 1.5em;
512
512
  margin: 2em 0 1em 0;
@@ -639,7 +639,7 @@ ol > li > p:before {
639
639
  3.11 Blockquotes
640
640
  */
641
641
  .blockquote, .Quote {
642
- background-color: #f7f7f7;
642
+ background-color: #f5faff;
643
643
  font-style: italic;
644
644
  width: 80%;
645
645
  padding: 1.5em;
@@ -651,7 +651,7 @@ ol > li > p:before {
651
651
  3.12 Formulas
652
652
  */
653
653
  .formula {
654
- background-color: #f7f7f7;
654
+ background-color: #f5faff;
655
655
  padding: 1.5em;
656
656
  margin-top: 2em;
657
657
  text-align: center;
@@ -60,11 +60,11 @@ RSpec.describe IsoDoc do
60
60
  <appendix id="Q2" inline-header="false" obligation="normative">
61
61
  <title>An Appendix</title>
62
62
  </appendix>
63
- </annex><bibliography><references id="R" obligation="informative">
63
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
64
64
  <title>Normative References</title>
65
65
  </references><clause id="S" obligation="informative">
66
66
  <title>Bibliography</title>
67
- <references id="T" obligation="informative">
67
+ <references id="T" obligation="informative" normative="false">
68
68
  <title>Bibliography Subsection</title>
69
69
  </references>
70
70
  </clause>
@@ -204,11 +204,11 @@ RSpec.describe IsoDoc do
204
204
  <appendix id="Q2" inline-header="false" obligation="normative">
205
205
  <title>An Appendix</title>
206
206
  </appendix>
207
- </annex><bibliography><references id="R" obligation="informative">
207
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
208
208
  <title>Normative References</title>
209
209
  </references><clause id="S" obligation="informative">
210
210
  <title>Bibliography</title>
211
- <references id="T" obligation="informative">
211
+ <references id="T" obligation="informative" normative="false">
212
212
  <title>Bibliography Subsection</title>
213
213
  </references>
214
214
  </clause>
@@ -348,11 +348,11 @@ RSpec.describe IsoDoc do
348
348
  <appendix id="Q2" inline-header="false" obligation="normative">
349
349
  <title>An Appendix</title>
350
350
  </appendix>
351
- </annex><bibliography><references id="R" obligation="informative">
351
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
352
352
  <title>Normative References</title>
353
353
  </references><clause id="S" obligation="informative">
354
354
  <title>Bibliography</title>
355
- <references id="T" obligation="informative">
355
+ <references id="T" obligation="informative" normative="false">
356
356
  <title>Bibliography Subsection</title>
357
357
  </references>
358
358
  </clause>
@@ -494,7 +494,7 @@ RSpec.describe IsoDoc do
494
494
  <appendix id="Q2" inline-header="false" obligation="normative">
495
495
  <title>An Appendix</title>
496
496
  </appendix>
497
- </annex><bibliography><references id="R" obligation="informative">
497
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
498
498
  <title>Normative References</title>
499
499
  <bibitem id="ISO712" type="standard">
500
500
  <title format="text/plain">Cereals and cereal products</title>
@@ -508,7 +508,7 @@ RSpec.describe IsoDoc do
508
508
  </bibitem>
509
509
  </references><clause id="S" obligation="informative">
510
510
  <title>Bibliography</title>
511
- <references id="T" obligation="informative">
511
+ <references id="T" obligation="informative" normative="false">
512
512
  <title>Bibliography Subsection</title>
513
513
  </references>
514
514
  </clause>
@@ -93,7 +93,7 @@ RSpec.describe IsoDoc do
93
93
  </bibdata>
94
94
  <sections> </sections>
95
95
  <bibliography>
96
- <references id='_' obligation='informative'>
96
+ <references id='_' obligation='informative' normative="true">
97
97
  <title>Normative References</title>
98
98
  <p id='_'>There are no normative references in this document.</p>
99
99
  <bibitem id='A'>
@@ -103,7 +103,7 @@ RSpec.describe IsoDoc do
103
103
  <docidentifier>B</docidentifier>
104
104
  </bibitem>
105
105
  </references>
106
- <references id='_' obligation='informative'>
106
+ <references id='_' obligation='informative' normative="false">
107
107
  <title>Bibliography</title>
108
108
  <p id='_'>There are no normative references in this document.</p>
109
109
  <bibitem id='A'>
@@ -158,7 +158,7 @@ RSpec.describe IsoDoc do
158
158
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</stem>
159
159
  </p>
160
160
  </foreword></preface>
161
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
161
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
162
162
  <bibitem id="ISO712" type="standard">
163
163
  <title format="text/plain">Cereals and cereal products</title>
164
164
  <docidentifier>ISO 712</docidentifier>
@@ -213,7 +213,7 @@ RSpec.describe IsoDoc do
213
213
  <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
214
214
  </p>
215
215
  </foreword></preface>
216
- <bibliography><references id="_normative_references" obligation="informative"><title>Normative References</title>
216
+ <bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
217
217
  <bibitem id="ISO712" type="standard">
218
218
  <title format="text/plain">Cereals and cereal products</title>
219
219
  <docidentifier>ISO 712</docidentifier>
@@ -15,25 +15,8 @@ RSpec.describe IsoDoc::Iec do
15
15
  INPUT
16
16
  html = File.read("test.html", encoding: "utf-8")
17
17
  expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
18
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
19
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
20
- end
21
-
22
- it "processes isodoc as ISO: alt HTML output" do
23
- FileUtils.rm_f "test.html"
24
- IsoDoc::Iec::HtmlConvert.new({alt: true}).convert("test", <<~"INPUT", false)
25
- <iso-standard xmlns="http://riboseinc.com/isoxml">
26
- <preface><foreword>
27
- <note>
28
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
29
- </note>
30
- </foreword></preface>
31
- </iso-standard>
32
- INPUT
33
- html = File.read("test.html", encoding: "utf-8")
34
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
35
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
36
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
18
+ expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
19
+ expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
37
20
  end
38
21
 
39
22
  it "processes isodoc as ISO: Chinese HTML output" do
@@ -73,7 +73,7 @@ RSpec.describe IsoDoc::Iec::Metadata do
73
73
  </bibdata>
74
74
  </iso-standard>
75
75
  INPUT
76
- {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docnumber_lang=>nil, :docnumeric=>"1730", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :publisher=>"International Organization for Standardization", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :sc=>"SC 4", :secretariat=>"GB", :stage=>"35", :stage_int=>35, :stageabbr=>"CD", :statusabbr=>"3CD", :tc=>"TC 34", :tc_docnumber=>["17301"], :unpublished=>true, :wg=>"WG 3"}
76
+ {:accesseddate=>"2012", :activateddate=>"2013", :agency=>"ISO", :authors=>[], :authors_affiliations=>{}, :createddate=>"2010&ndash;2011", :docnumber=>"ISO/PreCD3 17301-1", :docnumber_lang=>nil, :docnumber_reference=>nil, :docnumeric=>"1730", :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1", :doctype=>"International Standard", :docyear=>"2016", :draft=>"0.4", :draftinfo=>" (draft 0.4, 2016-05-01)", :edition=>"2", :editorialgroup=>["TC 34", "SC 4", "WG 3"], :ics=>"XXX", :obsoleteddate=>"2014", :obsoletes=>nil, :obsoletes_part=>nil, :publisheddate=>"2011", :publisher=>"International Organization for Standardization", :revdate=>"2016-05-01", :revdate_monthyear=>"May 2016", :sc=>"SC 4", :secretariat=>"GB", :stage=>"35", :stage_int=>35, :stageabbr=>"CD", :statusabbr=>"3CD", :tc=>"TC 34", :tc_docnumber=>["17301"], :unpublished=>true, :wg=>"WG 3"}
77
77
  OUTPUT
78
78
  end
79
79
 
@@ -152,7 +152,7 @@ OUTPUT
152
152
  </bibdata>
153
153
  </iso-standard>
154
154
  INPUT
155
- {:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docnumber_lang=>nil, :docnumeric=>nil, :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1&ndash;3", :doctype=>"Technical Report", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisher=>"International Organization for Standardization and International Electrotechnical Commission", :revdate=>nil, :revdate_monthyear=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"50", :stage_int=>50, :stageabbr=>"FDIS", :statusabbr=>"CFDIS", :tc=>"ABC 34", :tc_docnumber=>["17301"], :unpublished=>true, :wg=>"GHI 3"}
155
+ {:agency=>"ISO/IEC", :authors=>[], :authors_affiliations=>{}, :docnumber=>"ISO/IEC/CD 17301-1-3", :docnumber_lang=>nil, :docnumber_reference=>nil, :docnumeric=>nil, :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&nbsp;&mdash; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&nbsp;&mdash; Partie&nbsp;1&ndash;3: Riz", :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses", :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai", :docsubtitlepart=>"Riz", :docsubtitlepartlabel=>"Partie&nbsp;1&ndash;3", :doctitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice", :doctitleintro=>"Cereals and pulses", :doctitlemain=>"Specifications and test methods", :doctitlepart=>"Rice", :doctitlepartlabel=>"Part&nbsp;1&ndash;3", :doctype=>"Technical Report", :docyear=>"2016", :draft=>nil, :draftinfo=>"", :edition=>nil, :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"], :ics=>"1.2.3, 1.2.3", :obsoletes=>"IEC 8121", :obsoletes_part=>"3.1", :publisher=>"International Organization for Standardization and International Electrotechnical Commission", :revdate=>nil, :revdate_monthyear=>nil, :sc=>"DEF 4", :secretariat=>"XXXX", :stage=>"50", :stage_int=>50, :stageabbr=>"FDIS", :statusabbr=>"CFDIS", :tc=>"ABC 34", :tc_docnumber=>["17301"], :unpublished=>true, :wg=>"GHI 3"}
156
156
  OUTPUT
157
157
  end
158
158
 
@@ -56,11 +56,11 @@ RSpec.describe IsoDoc do
56
56
  <appendix id="Q2" inline-header="false" obligation="normative">
57
57
  <title>An Appendix</title>
58
58
  </appendix>
59
- </annex><bibliography><references id="R" obligation="informative">
59
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
60
60
  <title>Normative References</title>
61
61
  </references><clause id="S" obligation="informative">
62
62
  <title>Bibliography</title>
63
- <references id="T" obligation="informative">
63
+ <references id="T" obligation="informative" normative="false">
64
64
  <title>Bibliography Subsection</title>
65
65
  </references>
66
66
  </clause>
@@ -211,11 +211,11 @@ OUTPUT
211
211
  <appendix id="Q2" inline-header="false" obligation="normative">
212
212
  <title>An Appendix</title>
213
213
  </appendix>
214
- </annex><bibliography><references id="R" obligation="informative">
214
+ </annex><bibliography><references id="R" obligation="informative" normative="true">
215
215
  <title>Normative References</title>
216
216
  </references><clause id="S" obligation="informative">
217
217
  <title>Bibliography</title>
218
- <references id="T" obligation="informative">
218
+ <references id="T" obligation="informative" normative="false">
219
219
  <title>Bibliography Subsection</title>
220
220
  </references>
221
221
  </clause>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing