metanorma-iec 1.2.4 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +62 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/iec/basicdoc.rng +4 -11
- data/lib/asciidoctor/iec/converter.rb +6 -1
- data/lib/asciidoctor/iec/front.rb +11 -3
- data/lib/asciidoctor/iec/iec.rng +43 -1
- data/lib/asciidoctor/iec/iec_intro_en.xml +82 -53
- data/lib/asciidoctor/iec/iec_intro_fr.xml +44 -20
- data/lib/asciidoctor/iec/isodoc.rng +27 -50
- data/lib/asciidoctor/iec/isostandard.rng +16 -1
- data/lib/isodoc/iec/html/htmlstyle.css +10 -6
- data/lib/isodoc/iec/html/htmlstyle.scss +4 -4
- data/lib/isodoc/iec/html/isodoc.css +79 -79
- data/lib/isodoc/iec/html/isodoc.scss +79 -79
- data/lib/isodoc/iec/html/wordstyle.css +120 -120
- data/lib/isodoc/iec/html/wordstyle.scss +120 -120
- data/lib/isodoc/iec/html_convert.rb +8 -0
- data/lib/isodoc/iec/i18n-en.yaml +16 -0
- data/lib/isodoc/iec/i18n-fr.yaml +17 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +926 -330
- data/lib/isodoc/iec/metadata.rb +33 -0
- data/lib/isodoc/iec/presentation_xml_convert.rb +12 -0
- data/lib/isodoc/iec/word_convert.rb +10 -0
- data/lib/metanorma/iec/fonts_manifest.yaml +5 -0
- data/lib/metanorma/iec/processor.rb +0 -8
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -2
- data/spec/asciidoctor-iec/base_spec.rb +22 -5
- data/spec/asciidoctor-iec/blocks_spec.rb +1 -1
- data/spec/asciidoctor-iec/cleanup_spec.rb +0 -84
- data/spec/asciidoctor-iec/iev_spec.rb +6 -3
- data/spec/asciidoctor-iec/lists_spec.rb +6 -6
- data/spec/asciidoctor-iec/validate_spec.rb +36 -1
- data/spec/assets/xref_error.adoc +7 -0
- data/spec/isodoc/blocks_spec.rb +1 -1
- data/spec/isodoc/i18n_spec.rb +39 -9
- data/spec/isodoc/iev_spec.rb +13 -13
- data/spec/isodoc/inline_spec.rb +1 -1
- data/spec/isodoc/iso_spec.rb +2 -2
- data/spec/isodoc/metadata_spec.rb +59 -24
- data/spec/isodoc/ref_spec.rb +5 -5
- data/spec/isodoc/section_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/spec_helper.rb +9 -2
- metadata +7 -21
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -2,10 +2,30 @@ require "spec_helper"
|
|
2
2
|
require "fileutils"
|
3
3
|
|
4
4
|
RSpec.describe Asciidoctor::Iec do
|
5
|
+
context "when xref_error.adoc compilation" do
|
6
|
+
around do |example|
|
7
|
+
FileUtils.rm_f "spec/assets/xref_error.err"
|
8
|
+
example.run
|
9
|
+
Dir["spec/assets/xref_error*"].each do |file|
|
10
|
+
next if file.match?(/adoc$/)
|
11
|
+
|
12
|
+
FileUtils.rm_f(file)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
it "generates error file" do
|
17
|
+
expect do
|
18
|
+
Metanorma::Compile
|
19
|
+
.new
|
20
|
+
.compile("spec/assets/xref_error.adoc", type: "iec")
|
21
|
+
end.to(change { File.exist?("spec/assets/xref_error.err") }
|
22
|
+
.from(false).to(true))
|
23
|
+
end
|
24
|
+
end
|
5
25
|
|
6
26
|
it "Warns of illegal doctype" do
|
7
27
|
FileUtils.rm_f "test.err"
|
8
|
-
Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)
|
28
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)
|
9
29
|
= Document title
|
10
30
|
Author
|
11
31
|
:docfile: test.adoc
|
@@ -17,4 +37,19 @@ it "Warns of illegal doctype" do
|
|
17
37
|
INPUT
|
18
38
|
expect(File.read("test.err")).to include "pizza is not a recognised document type"
|
19
39
|
end
|
40
|
+
|
41
|
+
it "Warns of illegal function" do
|
42
|
+
FileUtils.rm_f "test.err"
|
43
|
+
Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)
|
44
|
+
= Document title
|
45
|
+
Author
|
46
|
+
:docfile: test.adoc
|
47
|
+
:nodoc:
|
48
|
+
:no-isobib:
|
49
|
+
:function: pizza
|
50
|
+
|
51
|
+
text
|
52
|
+
INPUT
|
53
|
+
expect(File.read("test.err")).to include "pizza is not a recognised document function"
|
54
|
+
end
|
20
55
|
end
|
data/spec/isodoc/blocks_spec.rb
CHANGED
data/spec/isodoc/i18n_spec.rb
CHANGED
@@ -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">
|
@@ -73,10 +78,21 @@ RSpec.describe IsoDoc do
|
|
73
78
|
INPUT
|
74
79
|
|
75
80
|
presxml = <<~OUTPUT
|
76
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
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
97
|
<preface>
|
82
98
|
<foreword obligation="informative">
|
@@ -216,12 +232,12 @@ RSpec.describe IsoDoc do
|
|
216
232
|
</body>
|
217
233
|
</html>
|
218
234
|
OUTPUT
|
219
|
-
|
235
|
+
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
|
220
236
|
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
221
237
|
end
|
222
238
|
|
223
239
|
it "defaults to English" do
|
224
|
-
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")
|
225
241
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
226
242
|
<bibdata>
|
227
243
|
<language>tlh</language>
|
@@ -289,9 +305,9 @@ RSpec.describe IsoDoc do
|
|
289
305
|
</bibliography>
|
290
306
|
</iso-standard>
|
291
307
|
INPUT
|
292
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
308
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
293
309
|
<bibdata>
|
294
|
-
<language>tlh</language>
|
310
|
+
<language current="true">tlh</language>
|
295
311
|
</bibdata>
|
296
312
|
<preface>
|
297
313
|
<foreword obligation='informative'>
|
@@ -432,6 +448,11 @@ RSpec.describe IsoDoc do
|
|
432
448
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
433
449
|
<bibdata>
|
434
450
|
<language>fr</language>
|
451
|
+
<ext>
|
452
|
+
<doctype>international-standard</doctype>
|
453
|
+
<horizontal>false</horizontal>
|
454
|
+
<function>emc</function>
|
455
|
+
</ext>
|
435
456
|
</bibdata>
|
436
457
|
<preface>
|
437
458
|
<foreword obligation="informative">
|
@@ -498,9 +519,18 @@ RSpec.describe IsoDoc do
|
|
498
519
|
INPUT
|
499
520
|
|
500
521
|
presxml = <<~OUTPUT
|
501
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
522
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
502
523
|
<bibdata>
|
503
|
-
<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>
|
504
534
|
</bibdata>
|
505
535
|
<preface>
|
506
536
|
<foreword obligation="informative">
|
@@ -641,7 +671,7 @@ RSpec.describe IsoDoc do
|
|
641
671
|
</body>
|
642
672
|
</html>
|
643
673
|
OUTPUT
|
644
|
-
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)
|
645
675
|
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
646
676
|
end
|
647
677
|
|
data/spec/isodoc/iev_spec.rb
CHANGED
@@ -22,7 +22,7 @@ RSpec.describe IsoDoc do
|
|
22
22
|
INPUT
|
23
23
|
|
24
24
|
presxml = <<~OUTPUT
|
25
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
25
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
26
26
|
<bibdata>
|
27
27
|
<docidentifier type='iso'>IEC/PWI 60050-871 ED 2</docidentifier>
|
28
28
|
<docnumber>60050</docnumber>
|
@@ -64,7 +64,7 @@ OUTPUT
|
|
64
64
|
</body>
|
65
65
|
</html>
|
66
66
|
OUTPUT
|
67
|
-
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)
|
68
68
|
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
69
69
|
end
|
70
70
|
|
@@ -142,7 +142,7 @@ OUTPUT
|
|
142
142
|
</iec-standard>
|
143
143
|
INPUT
|
144
144
|
presxml = <<~OUTPUT
|
145
|
-
<iec-standard xmlns='https://www.metanorma.org/ns/iec'>
|
145
|
+
<iec-standard xmlns='https://www.metanorma.org/ns/iec' type="presentation">
|
146
146
|
<bibdata type='standard'>
|
147
147
|
<docidentifier type='iso'>IEC 60050 ED 1</docidentifier>
|
148
148
|
<docnumber>60050</docnumber>
|
@@ -160,11 +160,11 @@ OUTPUT
|
|
160
160
|
<abbreviation>IEC</abbreviation>
|
161
161
|
</organization>
|
162
162
|
</contributor>
|
163
|
-
<language>en</language>
|
164
|
-
<script>Latn</script>
|
163
|
+
<language current="true">en</language>
|
164
|
+
<script current="true">Latn</script>
|
165
165
|
<status>
|
166
|
-
<stage>60</stage>
|
167
|
-
<substage>60</substage>
|
166
|
+
<stage language="">60</stage>
|
167
|
+
<substage language="">60</substage>
|
168
168
|
</status>
|
169
169
|
<copyright>
|
170
170
|
<from>2020</from>
|
@@ -176,7 +176,7 @@ OUTPUT
|
|
176
176
|
</owner>
|
177
177
|
</copyright>
|
178
178
|
<ext>
|
179
|
-
<doctype>article</doctype>
|
179
|
+
<doctype language="">article</doctype>
|
180
180
|
<editorialgroup>
|
181
181
|
<technical-committee/>
|
182
182
|
<subcommittee/>
|
@@ -227,7 +227,7 @@ OUTPUT
|
|
227
227
|
</body>
|
228
228
|
</html>
|
229
229
|
OUTPUT
|
230
|
-
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)
|
231
231
|
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
232
232
|
end
|
233
233
|
|
@@ -290,7 +290,7 @@ OUTPUT
|
|
290
290
|
INPUT
|
291
291
|
|
292
292
|
presxml = <<~INPUT
|
293
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
293
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
294
294
|
<bibdata type='standard'>
|
295
295
|
<docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
|
296
296
|
<docnumber>60050</docnumber>
|
@@ -441,7 +441,7 @@ html = <<~OUTPUT
|
|
441
441
|
</body>
|
442
442
|
</html>
|
443
443
|
OUTPUT
|
444
|
-
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)
|
445
445
|
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
446
446
|
end
|
447
447
|
|
@@ -473,7 +473,7 @@ end
|
|
473
473
|
</iso-standard>
|
474
474
|
INPUT
|
475
475
|
presxml = <<~OUTPUT
|
476
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
476
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
477
477
|
<bibdata type='standard'>
|
478
478
|
<docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
|
479
479
|
<docnumber>60050</docnumber>
|
@@ -509,7 +509,7 @@ end
|
|
509
509
|
</sections>
|
510
510
|
</iso-standard>
|
511
511
|
OUTPUT
|
512
|
-
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)
|
513
513
|
IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, false)
|
514
514
|
word = File.read("test.doc").sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">').
|
515
515
|
sub(%r{<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>.*$}m, "")
|
data/spec/isodoc/inline_spec.rb
CHANGED
@@ -185,7 +185,7 @@ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", <<~"INP
|
|
185
185
|
</iso-standard>
|
186
186
|
INPUT
|
187
187
|
<?xml version='1.0'?>
|
188
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
188
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
189
189
|
<preface>
|
190
190
|
<foreword>
|
191
191
|
<p>
|
data/spec/isodoc/iso_spec.rb
CHANGED
@@ -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(
|
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
|
-
:
|
80
|
-
:
|
87
|
+
:circulateddate=>"XXX",
|
88
|
+
:confirmeddate=>"XXX",
|
89
|
+
:copieddate=>"XXX",
|
81
90
|
:createddate=>"2010–2011",
|
82
91
|
:docnumber=>"ISO/PreCD3 17301-1",
|
83
|
-
:docnumber_lang=>nil,
|
84
|
-
:docnumber_reference=>nil,
|
85
92
|
:docnumeric=>"1730",
|
86
93
|
:docsubtitle=>"Céréales et légumineuses — Spécification et méthodes d'essai — Partie 1: Riz",
|
87
94
|
:docsubtitleintro=>"Céréales et légumineuses",
|
@@ -94,21 +101,33 @@ INPUT
|
|
94
101
|
:doctitlepart=>"Rice",
|
95
102
|
:doctitlepartlabel=>"Part 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
|
-
:
|
103
|
-
:
|
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(
|
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
|
-
{:
|
200
|
-
:
|
201
|
-
:
|
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éréales et légumineuses — Spécification et méthodes d'essai — Partie 1–3: Riz",
|
207
232
|
:docsubtitleintro=>"Céréales et légumineuses",
|
208
233
|
:docsubtitlemain=>"Spécification et méthodes d'essai",
|
@@ -214,27 +239,37 @@ INPUT
|
|
214
239
|
:doctitlepart=>"Rice",
|
215
240
|
:doctitlepartlabel=>"Part 1–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
|
-
:
|
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
|
-
:
|
228
|
-
:revdate_monthyear=>nil,
|
257
|
+
:receiveddate=>"XXX",
|
229
258
|
:sc=>"DEF 4",
|
230
|
-
:
|
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
|