metanorma-iso 1.5.7 → 1.5.12

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 +9 -1
  3. data/.github/workflows/rake.yml +66 -0
  4. data/.github/workflows/ubuntu.yml +8 -0
  5. data/.github/workflows/windows.yml +7 -0
  6. data/README.adoc +5 -6
  7. data/lib/asciidoctor/iso/basicdoc.rng +4 -11
  8. data/lib/asciidoctor/iso/boilerplate-fr.xml +40 -0
  9. data/lib/asciidoctor/iso/boilerplate.xml +1 -0
  10. data/lib/asciidoctor/iso/cleanup.rb +38 -0
  11. data/lib/asciidoctor/iso/front.rb +9 -15
  12. data/lib/asciidoctor/iso/isodoc.rng +27 -50
  13. data/lib/asciidoctor/iso/isostandard.rng +8 -1
  14. data/lib/asciidoctor/iso/validate.rb +1 -1
  15. data/lib/asciidoctor/iso/validate_section.rb +9 -0
  16. data/lib/isodoc/iso/html/header.html +12 -24
  17. data/lib/isodoc/iso/html/style-human.css +5 -1
  18. data/lib/isodoc/iso/html/style-iso.css +5 -1
  19. data/lib/isodoc/iso/i18n-en.yaml +4 -0
  20. data/lib/isodoc/iso/i18n-fr.yaml +5 -0
  21. data/lib/isodoc/iso/i18n-zh-Hans.yaml +5 -0
  22. data/lib/isodoc/iso/i18n.rb +10 -11
  23. data/lib/isodoc/iso/iso.amendment.xsl +732 -138
  24. data/lib/isodoc/iso/iso.international-standard.xsl +732 -138
  25. data/lib/isodoc/iso/metadata.rb +19 -19
  26. data/lib/metanorma-iso.rb +1 -0
  27. data/lib/metanorma/iso/processor.rb +1 -1
  28. data/lib/metanorma/iso/version.rb +1 -1
  29. data/metanorma-iso.gemspec +1 -1
  30. data/spec/asciidoctor-iso/amd_spec.rb +7 -7
  31. data/spec/asciidoctor-iso/base_spec.rb +144 -18
  32. data/spec/asciidoctor-iso/cleanup_spec.rb +4 -4
  33. data/spec/asciidoctor-iso/refs_spec.rb +174 -143
  34. data/spec/asciidoctor-iso/validate_spec.rb +52 -15
  35. data/spec/assets/xref_error.adoc +7 -0
  36. data/spec/isodoc/amd_spec.rb +191 -17
  37. data/spec/isodoc/blocks_spec.rb +2 -1
  38. data/spec/isodoc/i18n_spec.rb +13 -13
  39. data/spec/isodoc/inline_spec.rb +2 -2
  40. data/spec/isodoc/iso_spec.rb +2 -2
  41. data/spec/isodoc/metadata_spec.rb +170 -19
  42. data/spec/isodoc/postproc_spec.rb +3 -3
  43. data/spec/isodoc/ref_spec.rb +5 -5
  44. data/spec/isodoc/section_spec.rb +2 -2
  45. data/spec/isodoc/table_spec.rb +1 -1
  46. data/spec/isodoc/terms_spec.rb +1 -1
  47. data/spec/isodoc/xref_spec.rb +11 -11
  48. data/spec/metanorma/processor_spec.rb +1 -1
  49. data/spec/spec_helper.rb +22 -2
  50. metadata +7 -4
@@ -272,7 +272,7 @@ RSpec.describe IsoDoc do
272
272
  </iso-standard>
273
273
  INPUT
274
274
  <?xml version='1.0'?>
275
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
275
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
276
276
  <preface>
277
277
  <foreword>
278
278
  <formula id='_be9158af-7e93-4ee2-90c5-26d31c181934' unnumbered='true'>
@@ -436,6 +436,7 @@ OUTPUT
436
436
  <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
437
437
  <p>
438
438
  <span class='stem'>(#(r = 1 %)#)</span>
439
+ <span style='mso-tab-count:1'>&#160; </span>
439
440
  </p>
440
441
  </div>
441
442
  <p>where</p>
@@ -72,9 +72,9 @@ RSpec.describe IsoDoc do
72
72
  INPUT
73
73
 
74
74
  presxml = <<~OUTPUT
75
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
75
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
76
76
  <bibdata>
77
- <language>en</language>
77
+ <language current="true">en</language>
78
78
  </bibdata>
79
79
  <preface>
80
80
  <foreword obligation='informative'>
@@ -238,12 +238,12 @@ RSpec.describe IsoDoc do
238
238
  </body>
239
239
  </html>
240
240
  OUTPUT
241
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
241
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
242
242
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
243
243
  end
244
244
 
245
245
  it "defaults to English" do
246
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
246
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(<<~"OUTPUT")
247
247
  <iso-standard xmlns="http://riboseinc.com/isoxml">
248
248
  <bibdata>
249
249
  <language>tlh</language>
@@ -311,9 +311,9 @@ RSpec.describe IsoDoc do
311
311
  </bibliography>
312
312
  </iso-standard>
313
313
  INPUT
314
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
314
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
315
315
  <bibdata>
316
- <language>tlh</language>
316
+ <language current="true">tlh</language>
317
317
  </bibdata>
318
318
  <preface>
319
319
  <foreword obligation='informative'>
@@ -520,9 +520,9 @@ RSpec.describe IsoDoc do
520
520
  INPUT
521
521
 
522
522
  presxml = <<~OUTPUT
523
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
523
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
524
524
  <bibdata>
525
- <language>fr</language>
525
+ <language current="true">fr</language>
526
526
  </bibdata>
527
527
  <preface>
528
528
  <foreword obligation='informative'>
@@ -685,7 +685,7 @@ OUTPUT
685
685
  </body>
686
686
  </html>
687
687
  OUTPUT
688
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
688
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
689
689
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
690
690
  end
691
691
 
@@ -770,10 +770,10 @@ OUTPUT
770
770
  </iso-standard>
771
771
  INPUT
772
772
  presxml = <<~OUTPUT
773
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
773
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
774
774
  <bibdata>
775
- <language>zh</language>
776
- <script>Hans</script>
775
+ <language current="true">zh</language>
776
+ <script current="true">Hans</script>
777
777
  </bibdata>
778
778
  <preface>
779
779
  <foreword obligation='informative'>
@@ -947,7 +947,7 @@ OUTPUT
947
947
  </body>
948
948
  </html>
949
949
  OUTPUT
950
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
950
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
951
951
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
952
952
  end
953
953
 
@@ -194,7 +194,7 @@ RSpec.describe IsoDoc do
194
194
  end
195
195
 
196
196
  it "processes eref content" do
197
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
197
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)).sub(%r{<i18nyaml>.*</i18nyaml>}m, "")).to be_equivalent_to xmlpp(<<~"OUTPUT")
198
198
  <iso-standard xmlns="http://riboseinc.com/isoxml">
199
199
  <preface><foreword>
200
200
  <p>
@@ -229,7 +229,7 @@ RSpec.describe IsoDoc do
229
229
  </iso-standard>
230
230
  INPUT
231
231
  <?xml version='1.0'?>
232
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
232
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
233
233
  <preface>
234
234
  <foreword>
235
235
  <p>
@@ -175,7 +175,7 @@ end
175
175
  </iso-standard>
176
176
  INPUT
177
177
  <?xml version='1.0'?>
178
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
178
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
179
179
  <preface>
180
180
  <foreword>
181
181
  <example id='samplecode'>
@@ -231,7 +231,7 @@ OUTPUT
231
231
  </iso-standard>
232
232
  INPUT
233
233
  <?xml version='1.0'?>
234
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
234
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
235
235
  <preface>
236
236
  <foreword>
237
237
  <example id='samplecode'>
@@ -7,7 +7,7 @@ RSpec.describe IsoDoc::Iso::Metadata do
7
7
  arr = c.convert_init(<<~"INPUT", "test", false)
8
8
  <iso-standard xmlns="http://riboseinc.com/isoxml">
9
9
  INPUT
10
- expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
10
+ expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil))).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>
@@ -81,8 +81,9 @@ INPUT
81
81
  {:accesseddate=>"2012",
82
82
  :activateddate=>"2013",
83
83
  :agency=>"ISO",
84
- :authors=>[],
85
- :authors_affiliations=>{},
84
+ :circulateddate=>"XXX",
85
+ :confirmeddate=>"XXX",
86
+ :copieddate=>"XXX",
86
87
  :createddate=>"2010&ndash;2011",
87
88
  :docnumber=>"ISO/PreCD3 17301-1",
88
89
  :docnumber_lang=>"ISO/PreCD3 17301-1 (E)",
@@ -99,21 +100,24 @@ INPUT
99
100
  :doctitlepart=>"Rice",
100
101
  :doctitlepartlabel=>"Part&nbsp;1",
101
102
  :doctype=>"International Standard",
103
+ :doctype_display=>"International Standard",
102
104
  :docyear=>"2016",
103
105
  :draft=>"0.4",
104
106
  :draftinfo=>" (draft 0.4, 2016-05-01)",
105
107
  :edition=>"2",
106
108
  :editorialgroup=>["TC 34", "SC 4", "WG 3"],
107
- :ics=>nil,
109
+ :implementeddate=>"XXX",
110
+ :issueddate=>"XXX",
108
111
  :keywords=>["kw2", "kw1"],
112
+ :lang=>"en",
109
113
  :obsoleteddate=>"2014",
110
- :obsoletes=>nil,
111
- :obsoletes_part=>nil,
112
114
  :publisheddate=>"2011",
113
115
  :publisher=>"International Organization for Standardization",
116
+ :receiveddate=>"XXX",
114
117
  :revdate=>"2016-05-01",
115
118
  :revdate_monthyear=>"May 2016",
116
119
  :sc=>"SC 4",
120
+ :script=>"Latn",
117
121
  :secretariat=>"GB",
118
122
  :stage=>"30",
119
123
  :stage_int=>30,
@@ -121,17 +125,22 @@ INPUT
121
125
  :statusabbr=>"PreCD3",
122
126
  :tc=>"TC 34",
123
127
  :tc_docnumber=>["17301", "17302"],
128
+ :transmitteddate=>"XXX",
129
+ :unchangeddate=>"XXX",
124
130
  :unpublished=>true,
131
+ :updateddate=>"XXX",
132
+ :vote_endeddate=>"XXX",
133
+ :vote_starteddate=>"XXX",
125
134
  :wg=>"WG 3"}
126
135
  OUTPUT
127
136
  end
128
137
 
129
- it "processes IsoXML metadata" do
138
+ it "processes IsoXML metadata #2" do
130
139
  c = IsoDoc::Iso::HtmlConvert.new({})
131
140
  arr = c.convert_init(<<~"INPUT", "test", false)
132
141
  <iso-standard xmlns="http://riboseinc.com/isoxml">
133
142
  INPUT
134
- expect(Hash[c.info(Nokogiri::XML(<<~"INPUT"), nil).sort]).to be_equivalent_to <<~"OUTPUT"
143
+ expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil))).to be_equivalent_to <<~"OUTPUT"
135
144
  <iso-standard xmlns="http://riboseinc.com/isoxml">
136
145
  <bibdata type="standard">
137
146
  <title>
@@ -203,13 +212,15 @@ OUTPUT
203
212
  </bibdata>
204
213
  </iso-standard>
205
214
  INPUT
206
- {:agency=>"ISO/IEC",
207
- :authors=>[],
208
- :authors_affiliations=>{},
215
+ {:accesseddate=>"XXX",
216
+ :agency=>"ISO/IEC",
217
+ :circulateddate=>"XXX",
218
+ :confirmeddate=>"XXX",
219
+ :copieddate=>"XXX",
220
+ :createddate=>"XXX",
209
221
  :docnumber=>"ISO/IEC/CD 17301-1-3",
210
222
  :docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
211
223
  :docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
212
- :docnumeric=>nil,
213
224
  :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",
214
225
  :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
215
226
  :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
@@ -221,26 +232,166 @@ INPUT
221
232
  :doctitlepart=>"Rice",
222
233
  :doctitlepartlabel=>"Part&nbsp;1&ndash;3",
223
234
  :doctype=>"International Standard",
235
+ :doctype_display=>"International Standard",
224
236
  :docyear=>"2016",
225
- :draft=>nil,
226
- :draftinfo=>"",
227
- :edition=>nil,
228
237
  :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
229
238
  :ics=>"1.2.3, 1.2.3",
230
- :keywords=>[],
239
+ :implementeddate=>"XXX",
240
+ :issueddate=>"XXX",
241
+ :lang=>"en",
242
+ :obsoleteddate=>"XXX",
231
243
  :obsoletes=>"IEC 8121",
232
244
  :obsoletes_part=>"3.1",
245
+ :publisheddate=>"XXX",
233
246
  :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
234
- :revdate=>nil,
235
- :revdate_monthyear=>nil,
247
+ :receiveddate=>"XXX",
248
+ :sc=>"DEF 4",
249
+ :script=>"Latn",
250
+ :secretariat=>"XXX",
251
+ :stage=>"60",
252
+ :stage_int=>60,
253
+ :statusabbr=>"IS",
254
+ :tc=>"ABC 34",
255
+ :tc_docnumber=>["17301"],
256
+ :transmitteddate=>"XXX",
257
+ :unchangeddate=>"XXX",
258
+ :unpublished=>false,
259
+ :updateddate=>"XXX",
260
+ :vote_endeddate=>"XXX",
261
+ :vote_starteddate=>"XXX",
262
+ :wg=>"GHI 3"}
263
+ OUTPUT
264
+ end
265
+
266
+ it "processes IsoXML metadata in French" do
267
+ c = IsoDoc::Iso::HtmlConvert.new({})
268
+ arr = c.convert_init(<<~"INPUT", "test", false)
269
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
270
+ <bibdata>
271
+ <language>fr</language>
272
+ </bibdata>
273
+ </iso-standard>
274
+ INPUT
275
+ expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil))).to be_equivalent_to <<~"OUTPUT"
276
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
277
+ <bibdata type="standard">
278
+ <title>
279
+ <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
280
+ <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
281
+ <title type="title-part" language="en" format="text/plain">Rice</title>
282
+ </title>
283
+ <title>
284
+ <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
285
+ <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
286
+ <title type="title-part" language="fr" format="text/plain">Riz</title>
287
+ </title>
288
+ <docidentifier type="ISO">ISO/IEC/CD 17301-1-3</docidentifier>
289
+ <docidentifier type="iso-with-lang">ISO/IEC/CD 17301-1-3 (E)</docidentifier>
290
+ <docidentifier type="iso-reference">ISO/IEC/CD 17301-1-3 (E)</docidentifier>
291
+ <docidentifier type="iso-tc">17301</docidentifier>
292
+ <contributor>
293
+ <role type="author"/>
294
+ <organization>
295
+ <name>ISO</name>
296
+ </organization>
297
+ </contributor>
298
+ <contributor>
299
+ <role type="publisher"/>
300
+ <organization>
301
+ <name>International Organization for Standardization</name>
302
+ <abbreviation>ISO</abbreviation>
303
+ </organization>
304
+ </contributor>
305
+ <contributor>
306
+ <role type="publisher"/>
307
+ <organization>
308
+ <name>International Electrotechnical Commission</name>
309
+ <abbreviation>IEC</abbreviation>
310
+ </organization>
311
+ </contributor>
312
+ <language>fr</language>
313
+ <script>Latn</script>
314
+ <status>
315
+ <stage abbreviation="IS">60</stage>
316
+ <substage>92</substage>
317
+ </status>
318
+ <copyright>
319
+ <from>2016</from>
320
+ <owner>
321
+ <organization>
322
+ <name>International Organization for Standardization</name>
323
+ </organization>
324
+ </owner>
325
+ </copyright>
326
+ <relation type="obsoletes">
327
+ <locality type="clause"><referenceFrom>3.1</referenceFrom></locality>
328
+ <docidentifier>IEC 8121</docidentifier>
329
+ </relation>
330
+ <ext>
331
+ <doctype language="">international-standard</doctype>
332
+ <doctype language="fr">Standard International</doctype>
333
+ <editorialgroup>
334
+ <technical-committee number="34" type="ABC">Food products</technical-committee>
335
+ <subcommittee number="4" type="DEF">Cereals and pulses</subcommittee>
336
+ <workgroup number="3" type="GHI">Rice Group</workgroup>
337
+ </editorialgroup>
338
+ <ics><code>1.2.3</code></ics>
339
+ <ics><code>1.2.3</code></ics>
340
+ <structuredidentifier>
341
+ <project-number part="1" subpart="3">ISO/IEC/CD 17301</project-number>
342
+ </strucuredidentifier>
343
+ <stagename>International standard</stagename>
344
+ </ext>
345
+ </bibdata>
346
+ </iso-standard>
347
+ INPUT
348
+ {:accesseddate=>"XXX",
349
+ :agency=>"ISO/IEC",
350
+ :circulateddate=>"XXX",
351
+ :confirmeddate=>"XXX",
352
+ :copieddate=>"XXX",
353
+ :createddate=>"XXX",
354
+ :docnumber=>"ISO/IEC/CD 17301-1-3",
355
+ :docnumber_lang=>"ISO/IEC/CD 17301-1-3 (E)",
356
+ :docnumber_reference=>"ISO/IEC/CD 17301-1-3 (E)",
357
+ :docsubtitle=>"Cereals and pulses&nbsp;&mdash; Specifications and test methods&nbsp;&mdash; Part&nbsp;1&ndash;3: Rice",
358
+ :docsubtitleintro=>"Cereals and pulses",
359
+ :docsubtitlemain=>"Specifications and test methods",
360
+ :docsubtitlepart=>"Rice",
361
+ :docsubtitlepartlabel=>"Part&nbsp;1&ndash;3",
362
+ :doctitle=>"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",
363
+ :doctitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
364
+ :doctitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
365
+ :doctitlepart=>"Riz",
366
+ :doctitlepartlabel=>"Partie&nbsp;1&ndash;3",
367
+ :doctype=>"International Standard",
368
+ :doctype_display=>"Standard International",
369
+ :docyear=>"2016",
370
+ :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
371
+ :ics=>"1.2.3, 1.2.3",
372
+ :implementeddate=>"XXX",
373
+ :issueddate=>"XXX",
374
+ :lang=>"fr",
375
+ :obsoleteddate=>"XXX",
376
+ :obsoletes=>"IEC 8121",
377
+ :obsoletes_part=>"3.1",
378
+ :publisheddate=>"XXX",
379
+ :publisher=>"International Organization for Standardization et International Electrotechnical Commission",
380
+ :receiveddate=>"XXX",
236
381
  :sc=>"DEF 4",
237
- :secretariat=>"XXXX",
382
+ :script=>"Latn",
383
+ :secretariat=>"XXX",
238
384
  :stage=>"60",
239
385
  :stage_int=>60,
240
386
  :statusabbr=>"IS",
241
387
  :tc=>"ABC 34",
242
388
  :tc_docnumber=>["17301"],
389
+ :transmitteddate=>"XXX",
390
+ :unchangeddate=>"XXX",
243
391
  :unpublished=>false,
392
+ :updateddate=>"XXX",
393
+ :vote_endeddate=>"XXX",
394
+ :vote_starteddate=>"XXX",
244
395
  :wg=>"GHI 3"}
245
396
  OUTPUT
246
397
  end
@@ -611,9 +611,9 @@ documentation.</p>
611
611
  INPUT
612
612
 
613
613
  presxml = <<~OUTPUT
614
- <iso-standard xmlns="http://riboseinc.com/isoxml">
614
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
615
615
  <bibdata type="standard">
616
- <status><stage>30</stage></status>
616
+ <status><stage language="">30</stage></status>
617
617
  </bibdata>
618
618
  <boilerplate>
619
619
  <copyright-statement>
@@ -661,7 +661,7 @@ documentation.</p>
661
661
 
662
662
  FileUtils.rm_f "test.doc"
663
663
  FileUtils.rm_f "test.html"
664
- expect((IsoDoc::Iso::PresentationXMLConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
664
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
665
665
  IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", presxml, false)
666
666
  word = File.read("test.html", encoding: "UTF-8")
667
667
  expect((word)).to include '<h1 class="IntroTitle">Warning for Stuff</h1>'
@@ -42,7 +42,7 @@ RSpec.describe IsoDoc do
42
42
  <abbreviation>ISO</abbreviation>
43
43
  </organization>
44
44
  </contributor>
45
- <note format="text/plain" reference="1" type="ISO DATE">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
45
+ <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
46
46
  <extent type="part">
47
47
  <referenceFrom>all</referenceFrom>
48
48
  </extent>
@@ -121,9 +121,9 @@ RSpec.describe IsoDoc do
121
121
  </iso-standard>
122
122
  INPUT
123
123
  presxml = <<~OUTPUT
124
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
124
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
125
125
  <bibdata>
126
- <language>en</language>
126
+ <language current="true">en</language>
127
127
  </bibdata>
128
128
  <preface>
129
129
  <foreword>
@@ -175,7 +175,7 @@ RSpec.describe IsoDoc do
175
175
  <abbreviation>ISO</abbreviation>
176
176
  </organization>
177
177
  </contributor>
178
- <note format='text/plain' reference='1' type='ISO DATE'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
178
+ <note format='text/plain' reference='1' type='Unpublished-Status'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
179
179
  <extent type='part'>
180
180
  <referenceFrom>all</referenceFrom>
181
181
  </extent>
@@ -339,7 +339,7 @@ html = <<~OUTPUT
339
339
  </body>
340
340
  </html>
341
341
  OUTPUT
342
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
342
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)).sub(%r{<localized-strings>.*</localized-strings>}m, "")).to be_equivalent_to xmlpp(presxml)
343
343
  expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
344
344
  end
345
345