metanorma-iec 1.2.5 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +62 -0
  3. data/README.adoc +3 -4
  4. data/lib/asciidoctor/iec/basicdoc.rng +32 -0
  5. data/lib/asciidoctor/iec/converter.rb +6 -1
  6. data/lib/asciidoctor/iec/front.rb +17 -3
  7. data/lib/asciidoctor/iec/iec.rng +52 -1
  8. data/lib/asciidoctor/iec/iec_intro_en.xml +82 -53
  9. data/lib/asciidoctor/iec/iec_intro_fr.xml +44 -20
  10. data/lib/asciidoctor/iec/isodoc.rng +29 -44
  11. data/lib/asciidoctor/iec/isostandard.rng +11 -0
  12. data/lib/isodoc/iec/html/htmlstyle.css +10 -6
  13. data/lib/isodoc/iec/html/htmlstyle.scss +4 -4
  14. data/lib/isodoc/iec/html/isodoc.css +79 -79
  15. data/lib/isodoc/iec/html/isodoc.scss +79 -79
  16. data/lib/isodoc/iec/html/wordstyle.css +120 -120
  17. data/lib/isodoc/iec/html/wordstyle.scss +120 -120
  18. data/lib/isodoc/iec/html_convert.rb +8 -0
  19. data/lib/isodoc/iec/i18n-en.yaml +17 -0
  20. data/lib/isodoc/iec/i18n-fr.yaml +18 -0
  21. data/lib/isodoc/iec/iec.international-standard.xsl +782 -301
  22. data/lib/isodoc/iec/metadata.rb +33 -0
  23. data/lib/isodoc/iec/presentation_xml_convert.rb +12 -0
  24. data/lib/isodoc/iec/word_convert.rb +10 -0
  25. data/lib/metanorma/iec/fonts_manifest.yaml +5 -0
  26. data/lib/metanorma/iec/processor.rb +0 -8
  27. data/lib/metanorma/iec/version.rb +1 -1
  28. data/metanorma-iec.gemspec +1 -2
  29. data/spec/asciidoctor-iec/base_spec.rb +21 -0
  30. data/spec/asciidoctor-iec/blocks_spec.rb +1 -1
  31. data/spec/asciidoctor-iec/cleanup_spec.rb +0 -84
  32. data/spec/asciidoctor-iec/iev_spec.rb +3 -0
  33. data/spec/asciidoctor-iec/lists_spec.rb +6 -6
  34. data/spec/asciidoctor-iec/validate_spec.rb +36 -1
  35. data/spec/assets/xref_error.adoc +7 -0
  36. data/spec/isodoc/i18n_spec.rb +36 -16
  37. data/spec/isodoc/iev_spec.rb +9 -65
  38. data/spec/isodoc/iso_spec.rb +2 -2
  39. data/spec/isodoc/metadata_spec.rb +59 -24
  40. data/spec/isodoc/ref_spec.rb +4 -7
  41. data/spec/spec_helper.rb +8 -1
  42. metadata +7 -21
  43. data/.github/workflows/macos.yml +0 -38
  44. data/.github/workflows/ubuntu.yml +0 -56
  45. data/.github/workflows/windows.yml +0 -40
@@ -0,0 +1,7 @@
1
+ = X
2
+ A
3
+
4
+ == Clause
5
+
6
+ <<a,b>>
7
+
@@ -7,6 +7,11 @@ RSpec.describe IsoDoc do
7
7
  <bibdata>
8
8
  <docnumber>1</docnumber>
9
9
  <language>en</language>
10
+ <ext>
11
+ <doctype>international-standard</doctype>
12
+ <horizontal>true</horizontal>
13
+ <function>emc</function>
14
+ </ext>
10
15
  </bibdata>
11
16
  <preface>
12
17
  <foreword obligation="informative">
@@ -76,12 +81,19 @@ RSpec.describe IsoDoc do
76
81
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
77
82
  <bibdata>
78
83
  <docnumber>1</docnumber>
79
- <language>en</language>
84
+ <language current="true">en</language>
85
+ <ext>
86
+ <doctype language=''>international-standard</doctype>
87
+ <doctype language='fr'>Norme international</doctype>
88
+ <doctype language='en'>International Standard</doctype>
89
+ <horizontal language=''>true</horizontal>
90
+ <horizontal language='fr'>Norme horizontale</horizontal>
91
+ <horizontal language='en'>Horizontal Standard</horizontal>
92
+ <function language=''>emc</function>
93
+ <function language='fr'>Publication fondamentale en CEM</function>
94
+ <function language='en'>Basic EMC Publication</function>
95
+ </ext>
80
96
  </bibdata>
81
- <local_bibdata>
82
- <docnumber>1</docnumber>
83
- <language>en</language>
84
- </local_bibdata>
85
97
  <preface>
86
98
  <foreword obligation="informative">
87
99
  <title>Foreword</title>
@@ -220,12 +232,12 @@ RSpec.describe IsoDoc do
220
232
  </body>
221
233
  </html>
222
234
  OUTPUT
223
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
235
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
224
236
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
225
237
  end
226
238
 
227
239
  it "defaults to English" do
228
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
240
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
229
241
  <iso-standard xmlns="http://riboseinc.com/isoxml">
230
242
  <bibdata>
231
243
  <language>tlh</language>
@@ -295,11 +307,8 @@ RSpec.describe IsoDoc do
295
307
  INPUT
296
308
  <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
297
309
  <bibdata>
298
- <language>tlh</language>
310
+ <language current="true">tlh</language>
299
311
  </bibdata>
300
- <local_bibdata>
301
- <language>tlh</language>
302
- </local_bibdata>
303
312
  <preface>
304
313
  <foreword obligation='informative'>
305
314
  <title>Foreword</title>
@@ -439,6 +448,11 @@ RSpec.describe IsoDoc do
439
448
  <iso-standard xmlns="http://riboseinc.com/isoxml">
440
449
  <bibdata>
441
450
  <language>fr</language>
451
+ <ext>
452
+ <doctype>international-standard</doctype>
453
+ <horizontal>false</horizontal>
454
+ <function>emc</function>
455
+ </ext>
442
456
  </bibdata>
443
457
  <preface>
444
458
  <foreword obligation="informative">
@@ -507,11 +521,17 @@ RSpec.describe IsoDoc do
507
521
  presxml = <<~OUTPUT
508
522
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
509
523
  <bibdata>
510
- <language>fr</language>
524
+ <language current="true">fr</language>
525
+ <ext>
526
+ <doctype language=''>international-standard</doctype>
527
+ <doctype language='fr'>Norme international</doctype>
528
+ <doctype language='en'>International Standard</doctype>
529
+ <horizontal language=''>false</horizontal>
530
+ <function language=''>emc</function>
531
+ <function language='fr'>Publication fondamentale en CEM</function>
532
+ <function language='en'>Basic EMC Publication</function>
533
+ </ext>
511
534
  </bibdata>
512
- <local_bibdata>
513
- <language>fr</language>
514
- </local_bibdata>
515
535
  <preface>
516
536
  <foreword obligation="informative">
517
537
  <title>Foreword</title>
@@ -651,7 +671,7 @@ RSpec.describe IsoDoc do
651
671
  </body>
652
672
  </html>
653
673
  OUTPUT
654
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
674
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
655
675
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
656
676
  end
657
677
 
@@ -27,10 +27,6 @@ RSpec.describe IsoDoc do
27
27
  <docidentifier type='iso'>IEC/PWI 60050-871 ED 2</docidentifier>
28
28
  <docnumber>60050</docnumber>
29
29
  </bibdata>
30
- <local_bibdata>
31
- <docidentifier type='iso'>IEC/PWI 60050-871 ED 2</docidentifier>
32
- <docnumber>60050</docnumber>
33
- </local_bibdata>
34
30
  <preface>
35
31
  <foreword obligation='informative'>
36
32
  <title>Foreword</title>
@@ -68,7 +64,7 @@ OUTPUT
68
64
  </body>
69
65
  </html>
70
66
  OUTPUT
71
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
67
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
72
68
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
73
69
  end
74
70
 
@@ -164,11 +160,11 @@ OUTPUT
164
160
  <abbreviation>IEC</abbreviation>
165
161
  </organization>
166
162
  </contributor>
167
- <language>en</language>
168
- <script>Latn</script>
163
+ <language current="true">en</language>
164
+ <script current="true">Latn</script>
169
165
  <status>
170
- <stage>60</stage>
171
- <substage>60</substage>
166
+ <stage language="">60</stage>
167
+ <substage language="">60</substage>
172
168
  </status>
173
169
  <copyright>
174
170
  <from>2020</from>
@@ -180,7 +176,7 @@ OUTPUT
180
176
  </owner>
181
177
  </copyright>
182
178
  <ext>
183
- <doctype>article</doctype>
179
+ <doctype language="">article</doctype>
184
180
  <editorialgroup>
185
181
  <technical-committee/>
186
182
  <subcommittee/>
@@ -191,50 +187,6 @@ OUTPUT
191
187
  </structuredidentifier>
192
188
  </ext>
193
189
  </bibdata>
194
- <local_bibdata type='standard'>
195
- <docidentifier type='iso'>IEC 60050 ED 1</docidentifier>
196
- <docnumber>60050</docnumber>
197
- <contributor>
198
- <role type='author'/>
199
- <organization>
200
- <name>International Electrotechnical Commission</name>
201
- <abbreviation>IEC</abbreviation>
202
- </organization>
203
- </contributor>
204
- <contributor>
205
- <role type='publisher'/>
206
- <organization>
207
- <name>International Electrotechnical Commission</name>
208
- <abbreviation>IEC</abbreviation>
209
- </organization>
210
- </contributor>
211
- <language>en</language>
212
- <script>Latn</script>
213
- <status>
214
- <stage>60</stage>
215
- <substage>60</substage>
216
- </status>
217
- <copyright>
218
- <from>2020</from>
219
- <owner>
220
- <organization>
221
- <name>International Electrotechnical Commission</name>
222
- <abbreviation>IEC</abbreviation>
223
- </organization>
224
- </owner>
225
- </copyright>
226
- <ext>
227
- <doctype>article</doctype>
228
- <editorialgroup>
229
- <technical-committee/>
230
- <subcommittee/>
231
- <workgroup/>
232
- </editorialgroup>
233
- <structuredidentifier>
234
- <project-number>IEC 60050</project-number>
235
- </structuredidentifier>
236
- </ext>
237
- </local_bibdata>
238
190
  <sections> </sections>
239
191
  <bibliography>
240
192
  <references obligation='informative' normative='true' id="X">
@@ -275,7 +227,7 @@ OUTPUT
275
227
  </body>
276
228
  </html>
277
229
  OUTPUT
278
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
230
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
279
231
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
280
232
  end
281
233
 
@@ -343,10 +295,6 @@ presxml = <<~INPUT
343
295
  <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
344
296
  <docnumber>60050</docnumber>
345
297
  </bibdata>
346
- <local_bibdata type='standard'>
347
- <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
348
- <docnumber>60050</docnumber>
349
- </local_bibdata>
350
298
  <sections>
351
299
  <clause id="_terms_and_definitions" obligation="normative"><title depth="1">1<tab/>Terms and definitions</title>
352
300
  <terms id="_general" obligation="normative"><title>192-01 General</title>
@@ -493,7 +441,7 @@ html = <<~OUTPUT
493
441
  </body>
494
442
  </html>
495
443
  OUTPUT
496
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
444
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
497
445
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
498
446
  end
499
447
 
@@ -530,10 +478,6 @@ end
530
478
  <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
531
479
  <docnumber>60050</docnumber>
532
480
  </bibdata>
533
- <local_bibdata type='standard'>
534
- <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
535
- <docnumber>60050</docnumber>
536
- </local_bibdata>
537
481
  <sections>
538
482
  <clause id='_terms_and_definitions' obligation='normative'>
539
483
  <title depth='1'>1<tab/>Terms and definitions</title>
@@ -565,7 +509,7 @@ end
565
509
  </sections>
566
510
  </iso-standard>
567
511
  OUTPUT
568
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
512
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
569
513
  IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, false)
570
514
  word = File.read("test.doc").sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">').
571
515
  sub(%r{<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>.*$}m, "")
@@ -65,9 +65,9 @@ RSpec.describe IsoDoc::Iec do
65
65
  </iso-standard>
66
66
  INPUT
67
67
  html = File.read("test.doc", encoding: "utf-8")
68
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New",monospace;]m)
68
+ expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
69
69
  expect(html).to match(%r[Quote[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
70
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Arial",sans-serif;]m)
70
+ expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Arial", sans-serif;]m)
71
71
  end
72
72
 
73
73
  it "processes examples" do
@@ -7,7 +7,7 @@ RSpec.describe IsoDoc::Iec::Metadata do
7
7
  arr = c.convert_init(<<~"INPUT", "test", false)
8
8
  <iec-standard xmlns="http://riboseinc.com/isoxml">
9
9
  INPUT
10
- expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort].to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
10
+ expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil)).to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
11
11
  <iso-standard xmlns="http://riboseinc.com/isoxml">
12
12
  <bibdata type="standard">
13
13
  <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
@@ -59,7 +59,15 @@ RSpec.describe IsoDoc::Iec::Metadata do
59
59
  </owner>
60
60
  </copyright>
61
61
  <ext>
62
- <doctype>international-standard</doctype>
62
+ <doctype language=''>international-standard</doctype>
63
+ <doctype language='fr'>Norme international</doctype>
64
+ <doctype language='en'>International Standard</doctype>
65
+ <horizontal language=''>true</horizontal>
66
+ <horizontal language='fr'>Norme horizontale</horizontal>
67
+ <horizontal language='en'>Horizontal Standard</horizontal>
68
+ <function language=''>emc</function>
69
+ <function language='fr'>Publication fondamentale en CEM</function>
70
+ <function language='en'>Basic EMC Publication</function>
63
71
  <editorialgroup>
64
72
  <technical-committee number="34">Food products</technical-committee>
65
73
  <subcommittee number="4">Cereals and pulses</subcommittee>
@@ -76,12 +84,11 @@ INPUT
76
84
  {:accesseddate=>"2012",
77
85
  :activateddate=>"2013",
78
86
  :agency=>"ISO",
79
- :authors=>[],
80
- :authors_affiliations=>{},
87
+ :circulateddate=>"XXX",
88
+ :confirmeddate=>"XXX",
89
+ :copieddate=>"XXX",
81
90
  :createddate=>"2010&ndash;2011",
82
91
  :docnumber=>"ISO/PreCD3 17301-1",
83
- :docnumber_lang=>nil,
84
- :docnumber_reference=>nil,
85
92
  :docnumeric=>"1730",
86
93
  :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",
87
94
  :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
@@ -94,21 +101,33 @@ INPUT
94
101
  :doctitlepart=>"Rice",
95
102
  :doctitlepartlabel=>"Part&nbsp;1",
96
103
  :doctype=>"International Standard",
104
+ :doctype_display=>"International Standard",
105
+ :doctype_en=>"International Standard",
106
+ :doctype_fr=>"Norme International",
97
107
  :docyear=>"2016",
98
108
  :draft=>"0.4",
99
109
  :draftinfo=>" (draft 0.4, 2016-05-01)",
100
110
  :edition=>"2",
101
111
  :editorialgroup=>["TC 34", "SC 4", "WG 3"],
102
- :ics=>nil,
103
- :keywords=>[],
112
+ :function=>"Emc",
113
+ :function_display=>"Basic Emc Publication",
114
+ :function_en=>"Basic Emc Publication",
115
+ :function_fr=>"Publication Fondamentale En Cem",
116
+ :horizontal=>"True",
117
+ :horizontal_display=>"Horizontal Standard",
118
+ :horizontal_en=>"Horizontal Standard",
119
+ :horizontal_fr=>"Norme Horizontale",
120
+ :implementeddate=>"XXX",
121
+ :issueddate=>"XXX",
122
+ :lang=>"en",
104
123
  :obsoleteddate=>"2014",
105
- :obsoletes=>nil,
106
- :obsoletes_part=>nil,
107
124
  :publisheddate=>"2011",
108
125
  :publisher=>"International Organization for Standardization",
126
+ :receiveddate=>"XXX",
109
127
  :revdate=>"2016-05-01",
110
128
  :revdate_monthyear=>"May 2016",
111
129
  :sc=>"SC 4",
130
+ :script=>"Latn",
112
131
  :secretariat=>"GB",
113
132
  :stage=>"35",
114
133
  :stage_int=>35,
@@ -116,7 +135,12 @@ INPUT
116
135
  :statusabbr=>"3CD",
117
136
  :tc=>"TC 34",
118
137
  :tc_docnumber=>["17301"],
138
+ :transmitteddate=>"XXX",
139
+ :unchangeddate=>"XXX",
119
140
  :unpublished=>true,
141
+ :updateddate=>"XXX",
142
+ :vote_endeddate=>"XXX",
143
+ :vote_starteddate=>"XXX",
120
144
  :wg=>"WG 3"}
121
145
  OUTPUT
122
146
  end
@@ -126,7 +150,7 @@ OUTPUT
126
150
  arr = c.convert_init(<<~"INPUT", "test", false)
127
151
  <iso-standard xmlns="http://riboseinc.com/isoxml">
128
152
  INPUT
129
- expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort].to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
153
+ expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil)).to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
130
154
  <iso-standard xmlns="http://riboseinc.com/isoxml">
131
155
  <bibdata type="standard">
132
156
  <title>
@@ -182,6 +206,7 @@ OUTPUT
182
206
  </relation>
183
207
  <ext>
184
208
  <doctype>technical-report</doctype>
209
+ <horizontal>false</horizontal>
185
210
  <editorialgroup>
186
211
  <technical-committee number="34" type="ABC">Food products</technical-committee>
187
212
  <subcommittee number="4" type="DEF">Cereals and pulses</subcommittee>
@@ -196,13 +221,13 @@ OUTPUT
196
221
  </bibdata>
197
222
  </iso-standard>
198
223
  INPUT
199
- {:agency=>"ISO/IEC",
200
- :authors=>[],
201
- :authors_affiliations=>{},
224
+ {:accesseddate=>"XXX",
225
+ :agency=>"ISO/IEC",
226
+ :circulateddate=>"XXX",
227
+ :confirmeddate=>"XXX",
228
+ :copieddate=>"XXX",
229
+ :createddate=>"XXX",
202
230
  :docnumber=>"ISO/IEC/CD 17301-1-3",
203
- :docnumber_lang=>nil,
204
- :docnumber_reference=>nil,
205
- :docnumeric=>nil,
206
231
  :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",
207
232
  :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
208
233
  :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
@@ -214,27 +239,37 @@ INPUT
214
239
  :doctitlepart=>"Rice",
215
240
  :doctitlepartlabel=>"Part&nbsp;1&ndash;3",
216
241
  :doctype=>"Technical Report",
242
+ :doctype_display=>"Technical Report",
243
+ :doctype_en=>"Technical Report",
244
+ :doctype_fr=>"Technical Report",
217
245
  :docyear=>"2016",
218
- :draft=>nil,
219
- :draftinfo=>"",
220
- :edition=>nil,
221
246
  :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
247
+ :horizontal=>"False",
222
248
  :ics=>"1.2.3, 1.2.3",
223
- :keywords=>[],
249
+ :implementeddate=>"XXX",
250
+ :issueddate=>"XXX",
251
+ :lang=>"en",
252
+ :obsoleteddate=>"XXX",
224
253
  :obsoletes=>"IEC 8121",
225
254
  :obsoletes_part=>"3.1",
255
+ :publisheddate=>"XXX",
226
256
  :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
227
- :revdate=>nil,
228
- :revdate_monthyear=>nil,
257
+ :receiveddate=>"XXX",
229
258
  :sc=>"DEF 4",
230
- :secretariat=>"XXXX",
259
+ :script=>"Latn",
260
+ :secretariat=>"XXX",
231
261
  :stage=>"50",
232
262
  :stage_int=>50,
233
263
  :stageabbr=>"FDIS",
234
264
  :statusabbr=>"CFDIS",
235
265
  :tc=>"ABC 34",
236
266
  :tc_docnumber=>["17301"],
267
+ :transmitteddate=>"XXX",
268
+ :unchangeddate=>"XXX",
237
269
  :unpublished=>true,
270
+ :updateddate=>"XXX",
271
+ :vote_endeddate=>"XXX",
272
+ :vote_starteddate=>"XXX",
238
273
  :wg=>"GHI 3"}
239
274
  OUTPUT
240
275
  end
@@ -44,7 +44,7 @@ RSpec.describe IsoDoc::Iec do
44
44
  <abbreviation>ISO</abbreviation>
45
45
  </organization>
46
46
  </contributor>
47
- <note format="text/plain" reference="1" type="ISO DATE">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
47
+ <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
48
48
  <extent type="part">
49
49
  <referenceFrom>all</referenceFrom>
50
50
  </extent>
@@ -128,11 +128,8 @@ RSpec.describe IsoDoc::Iec do
128
128
  presxml = <<~OUTPUT
129
129
  <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
130
130
  <bibdata>
131
- <language>en</language>
131
+ <language current="true">en</language>
132
132
  </bibdata>
133
- <local_bibdata>
134
- <language>en</language>
135
- </local_bibdata>
136
133
  <preface><foreword>
137
134
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
138
135
  <eref bibitemid="ISO712">[110]</eref>
@@ -170,7 +167,7 @@ RSpec.describe IsoDoc::Iec do
170
167
  <abbreviation>ISO</abbreviation>
171
168
  </organization>
172
169
  </contributor>
173
- <note format="text/plain" reference="1" type="ISO DATE">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
170
+ <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
174
171
  <extent type="part">
175
172
  <referenceFrom>all</referenceFrom>
176
173
  </extent>
@@ -372,7 +369,7 @@ RSpec.describe IsoDoc::Iec do
372
369
  </html>
373
370
 
374
371
  OUTPUT
375
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
372
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
376
373
  expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
377
374
  end
378
375