metanorma-iec 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,273 +5,247 @@ RSpec.describe IsoDoc::Iec::Metadata do
5
5
  it "processes IsoXML metadata" do
6
6
  c = IsoDoc::Iec::HtmlConvert.new({})
7
7
  arr = c.convert_init(<<~"INPUT", "test", false)
8
- <iec-standard xmlns="http://riboseinc.com/isoxml">
8
+ <iec-standard xmlns="http://riboseinc.com/isoxml">
9
9
  INPUT
10
- expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil)).to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
11
- <iso-standard xmlns="http://riboseinc.com/isoxml">
12
- <bibdata type="standard">
13
- <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
14
- <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
15
- <title type="title-part" language="en" format="text/plain">Rice</title>
16
- <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
17
- <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
18
- <title type="title-part" language="fr" format="text/plain">Riz</title>
19
- <docidentifier type="ISO">ISO/PreCD3 17301-1</docidentifier>
20
- <docidentifier type="iso-tc">17301</docidentifier>
21
- <docnumber>1730</docnumber>
22
- <date type="published"><on>2011</on></date>
23
- <date type="accessed"><on>2012</on></date>
24
- <date type="created"><from>2010</from><to>2011</to></date>
25
- <date type="activated"><on>2013</on></date>
26
- <date type="obsoleted"><on>2014</on></date>
27
- <edition>2</edition>
28
- <version>
29
- <revision-date>2016-05-01</revision-date>
30
- <draft>0.4</draft>
31
- </version>
32
- <contributor>
33
- <role type="author"/>
34
- <organization>
35
- <name>International Organization for Standardization</name>
36
- <abbreviation>ISO</abbreviation>
37
- </organization>
38
- </contributor>
39
- <contributor>
40
- <role type="publisher"/>
41
- <organization>
42
- <name>International Organization for Standardization</name>
43
- <abbreviation>ISO</abbreviation>
44
- </organization>
45
- </contributor>
46
- <language>en</language>
47
- <script>Latn</script>
48
- <status>
49
- <stage abbreviation="CD">35</stage>
50
- <substage abbreviation="3CD">20</substage>
51
- <iteration>3</iteration>
52
- </status>
53
- <copyright>
54
- <from>2016</from>
55
- <owner>
56
- <organization>
57
- <abbreviation>ISO</abbreviation>
58
- </organization>
59
- </owner>
60
- </copyright>
61
- <ext>
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>
71
- <editorialgroup>
72
- <technical-committee number="34">Food products</technical-committee>
73
- <subcommittee number="4">Cereals and pulses</subcommittee>
74
- <workgroup number="3">Rice Group</workgroup>
75
- <secretariat>GB</secretariat>
76
- </editorialgroup>
77
- <structuredidentifier>
78
- <project-number part="1">ISO/PreCD3 17301</project-number>
79
- </structuredidentifier>
80
- </ext>
81
- </bibdata>
82
- </iso-standard>
83
- INPUT
84
- {:accesseddate=>"2012",
85
- :activateddate=>"2013",
86
- :agency=>"ISO",
87
- :circulateddate=>"XXX",
88
- :confirmeddate=>"XXX",
89
- :copieddate=>"XXX",
90
- :createddate=>"2010&#x2013;2011",
91
- :docnumber=>"ISO/PreCD3 17301-1",
92
- :docnumeric=>"1730",
93
- :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&#xa0;&#x2014; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&#xa0;&#x2014; Partie&#xa0;1: Riz",
94
- :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
95
- :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
96
- :docsubtitlepart=>"Riz",
97
- :docsubtitlepartlabel=>"Partie&#xa0;1",
98
- :doctitle=>"Cereals and pulses&#xa0;&#x2014; Specifications and test methods&#xa0;&#x2014; Part&#xa0;1: Rice",
99
- :doctitleintro=>"Cereals and pulses",
100
- :doctitlemain=>"Specifications and test methods",
101
- :doctitlepart=>"Rice",
102
- :doctitlepartlabel=>"Part&#xa0;1",
103
- :doctype=>"International Standard",
104
- :doctype_display=>"International Standard",
105
- :doctype_en=>"International Standard",
106
- :doctype_fr=>"Norme International",
107
- :docyear=>"2016",
108
- :draft=>"0.4",
109
- :draftinfo=>" (draft 0.4, 2016-05-01)",
110
- :edition=>"2",
111
- :editorialgroup=>["TC 34", "SC 4", "WG 3"],
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",
123
- :obsoleteddate=>"2014",
124
- :publisheddate=>"2011",
125
- :publisher=>"International Organization for Standardization",
126
- :receiveddate=>"XXX",
127
- :revdate=>"2016-05-01",
128
- :revdate_monthyear=>"May 2016",
129
- :sc=>"SC 4",
130
- :script=>"Latn",
131
- :secretariat=>"GB",
132
- :stage=>"35",
133
- :stage_int=>35,
134
- :stageabbr=>"CD",
135
- :statusabbr=>"3CD",
136
- :tc=>"TC 34",
137
- :tc_docnumber=>["17301"],
138
- :transmitteddate=>"XXX",
139
- :unchangeddate=>"XXX",
140
- :unpublished=>true,
141
- :updateddate=>"XXX",
142
- :vote_endeddate=>"XXX",
143
- :vote_starteddate=>"XXX",
144
- :wg=>"WG 3"}
145
- OUTPUT
10
+ input = <<~INPUT
11
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
12
+ <bibdata type="standard">
13
+ <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
14
+ <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
15
+ <title type="title-part" language="en" format="text/plain">Rice</title>
16
+ <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
17
+ <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
18
+ <title type="title-part" language="fr" format="text/plain">Riz</title>
19
+ <docidentifier type="ISO">ISO/PreCD3 17301-1</docidentifier>
20
+ <docidentifier type="iso-tc">17301</docidentifier>
21
+ <docnumber>1730</docnumber>
22
+ <date type="published"><on>2011</on></date>
23
+ <date type="accessed"><on>2012</on></date>
24
+ <date type="created"><from>2010</from><to>2011</to></date>
25
+ <date type="activated"><on>2013</on></date>
26
+ <date type="obsoleted"><on>2014</on></date>
27
+ <edition>2</edition>
28
+ <version>
29
+ <revision-date>2016-05-01</revision-date>
30
+ <draft>0.4</draft>
31
+ </version>
32
+ <contributor>
33
+ <role type="author"/>
34
+ <organization>
35
+ <name>International Organization for Standardization</name>
36
+ <abbreviation>ISO</abbreviation>
37
+ </organization>
38
+ </contributor>
39
+ <contributor>
40
+ <role type="publisher"/>
41
+ <organization>
42
+ <name>International Organization for Standardization</name>
43
+ <abbreviation>ISO</abbreviation>
44
+ </organization>
45
+ </contributor>
46
+ <language>en</language>
47
+ <script>Latn</script>
48
+ <status>
49
+ <stage abbreviation="CD">35</stage>
50
+ <substage abbreviation="3CD">20</substage>
51
+ <iteration>3</iteration>
52
+ </status>
53
+ <copyright>
54
+ <from>2016</from>
55
+ <owner>
56
+ <organization>
57
+ <abbreviation>ISO</abbreviation>
58
+ </organization>
59
+ </owner>
60
+ </copyright>
61
+ <ext>
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>
71
+ <editorialgroup>
72
+ <technical-committee number="34">Food products</technical-committee>
73
+ <subcommittee number="4">Cereals and pulses</subcommittee>
74
+ <workgroup number="3">Rice Group</workgroup>
75
+ <secretariat>GB</secretariat>
76
+ </editorialgroup>
77
+ <structuredidentifier>
78
+ <project-number part="1">ISO/PreCD3 17301</project-number>
79
+ </structuredidentifier>
80
+ </ext>
81
+ </bibdata>
82
+ </iso-standard>
83
+ INPUT
84
+ output = <<~OUTPUT
85
+ {:accesseddate=>"2012",
86
+ :activateddate=>"2013",
87
+ :agency=>"ISO",
88
+ :createddate=>"2010&#x2013;2011",
89
+ :docnumber=>"ISO/PreCD3 17301-1",
90
+ :docnumeric=>"1730",
91
+ :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&#xa0;&#x2014; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&#xa0;&#x2014; Partie&#xa0;1: Riz",
92
+ :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
93
+ :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
94
+ :docsubtitlepart=>"Riz",
95
+ :docsubtitlepartlabel=>"Partie&#xa0;1",
96
+ :doctitle=>"Cereals and pulses&#xa0;&#x2014; Specifications and test methods&#xa0;&#x2014; Part&#xa0;1: Rice",
97
+ :doctitleintro=>"Cereals and pulses",
98
+ :doctitlemain=>"Specifications and test methods",
99
+ :doctitlepart=>"Rice",
100
+ :doctitlepartlabel=>"Part&#xa0;1",
101
+ :doctype=>"International Standard",
102
+ :doctype_display=>"International Standard",
103
+ :doctype_en=>"International Standard",
104
+ :doctype_fr=>"Norme International",
105
+ :docyear=>"2016",
106
+ :draft=>"0.4",
107
+ :draftinfo=>" (draft 0.4, 2016-05-01)",
108
+ :edition=>"2",
109
+ :editorialgroup=>["TC 34", "SC 4", "WG 3"],
110
+ :function=>"Emc",
111
+ :function_display=>"Basic Emc Publication",
112
+ :function_en=>"Basic Emc Publication",
113
+ :function_fr=>"Publication Fondamentale En Cem",
114
+ :horizontal=>"True",
115
+ :horizontal_display=>"Horizontal Standard",
116
+ :horizontal_en=>"Horizontal Standard",
117
+ :horizontal_fr=>"Norme Horizontale",
118
+ :lang=>"en",
119
+ :obsoleteddate=>"2014",
120
+ :publisheddate=>"2011",
121
+ :publisher=>"International Organization for Standardization",
122
+ :revdate=>"2016-05-01",
123
+ :revdate_monthyear=>"May 2016",
124
+ :sc=>"SC 4",
125
+ :script=>"Latn",
126
+ :secretariat=>"GB",
127
+ :stage=>"35",
128
+ :stage_int=>35,
129
+ :stageabbr=>"CD",
130
+ :statusabbr=>"3CD",
131
+ :tc=>"TC 34",
132
+ :tc_docnumber=>["17301"],
133
+ :unpublished=>true,
134
+ :wg=>"WG 3"}
135
+ OUTPUT
136
+ expect(metadata(c.info(Nokogiri::XML(input), nil))
137
+ .to_s.gsub(/, :/, ",\n:")).to be_equivalent_to output
146
138
  end
147
139
 
148
140
  it "processes IsoXML metadata" do
149
141
  c = IsoDoc::Iec::HtmlConvert.new({})
150
142
  arr = c.convert_init(<<~"INPUT", "test", false)
151
- <iso-standard xmlns="http://riboseinc.com/isoxml">
143
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
144
+ INPUT
145
+ input = <<~INPUT
146
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
147
+ <bibdata type="standard">
148
+ <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
149
+ <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
150
+ <title type="title-part" language="en" format="text/plain">Rice</title>
151
+ <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
152
+ <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
153
+ <title type="title-part" language="fr" format="text/plain">Riz</title>
154
+ <docidentifier type="ISO">ISO/IEC/CD 17301-1-3</docidentifier>
155
+ <docidentifier type="iso-tc">17301</docidentifier>
156
+ <contributor>
157
+ <role type="author"/>
158
+ <organization>
159
+ <name>International Organization for Standardization</name>
160
+ <abbreviation>ISO</abbreviation>
161
+ </organization>
162
+ </contributor>
163
+ <contributor>
164
+ <role type="publisher"/>
165
+ <organization>
166
+ <name>International Organization for Standardization</name>
167
+ <abbreviation>ISO</abbreviation>
168
+ </organization>
169
+ </contributor>
170
+ <contributor>
171
+ <role type="publisher"/>
172
+ <organization>
173
+ <name>International Electrotechnical Commission</name>
174
+ <abbreviation>IEC</abbreviation>
175
+ </organization>
176
+ </contributor>
177
+ <language>en</language>
178
+ <script>Latn</script>
179
+ <status>
180
+ <stage abbreviation="FDIS">50</stage>
181
+ <substage abbreviation="CFDIS">20</substage>
182
+ </status>
183
+ <copyright>
184
+ <from>2016</from>
185
+ <owner>
186
+ <organization>
187
+ <name>International Organization for Standardization</name>
188
+ </organization>
189
+ </owner>
190
+ </copyright>
191
+ <relation type="obsoletes">
192
+ <locality type="clause"><referenceFrom>3.1</referenceFrom></locality>
193
+ <docidentifier>IEC 8121</docidentifier>
194
+ </relation>
195
+ <ext>
196
+ <doctype>technical-report</doctype>
197
+ <horizontal>false</horizontal>
198
+ <editorialgroup>
199
+ <technical-committee number="34" type="ABC">Food products</technical-committee>
200
+ <subcommittee number="4" type="DEF">Cereals and pulses</subcommittee>
201
+ <workgroup number="3" type="GHI">Rice Group</workgroup>
202
+ </editorialgroup>
203
+ <ics><code>1.2.3</code></ics>
204
+ <ics><code>1.2.3</code></ics>
205
+ <structuredidentifier>
206
+ <project-number part="1" subpart="3">ISO/IEC/CD 17301</project-number>
207
+ </strucuredidentifier>
208
+ </ext>
209
+ </bibdata>
210
+ </iso-standard>
152
211
  INPUT
153
- expect(metadata(c.info(Nokogiri::XML(<<~"INPUT"), nil)).to_s.gsub(/, :/, ",\n:")).to be_equivalent_to <<~"OUTPUT"
154
- <iso-standard xmlns="http://riboseinc.com/isoxml">
155
- <bibdata type="standard">
156
- <title>
157
- <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
158
- <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
159
- <title type="title-part" language="en" format="text/plain">Rice</title>
160
- </title>
161
- <title>
162
- <title type="title-intro" language="fr" format="text/plain">Céréales et légumineuses</title>
163
- <title type="title-main" language="fr" format="text/plain">Spécification et méthodes d'essai</title>
164
- <title type="title-part" language="fr" format="text/plain">Riz</title>
165
- </title>
166
- <docidentifier type="ISO">ISO/IEC/CD 17301-1-3</docidentifier>
167
- <docidentifier type="iso-tc">17301</docidentifier>
168
- <contributor>
169
- <role type="author"/>
170
- <organization>
171
- <name>International Organization for Standardization</name>
172
- <abbreviation>ISO</abbreviation>
173
- </organization>
174
- </contributor>
175
- <contributor>
176
- <role type="publisher"/>
177
- <organization>
178
- <name>International Organization for Standardization</name>
179
- <abbreviation>ISO</abbreviation>
180
- </organization>
181
- </contributor>
182
- <contributor>
183
- <role type="publisher"/>
184
- <organization>
185
- <name>International Electrotechnical Commission</name>
186
- <abbreviation>IEC</abbreviation>
187
- </organization>
188
- </contributor>
189
- <language>en</language>
190
- <script>Latn</script>
191
- <status>
192
- <stage abbreviation="FDIS">50</stage>
193
- <substage abbreviation="CFDIS">20</substage>
194
- </status>
195
- <copyright>
196
- <from>2016</from>
197
- <owner>
198
- <organization>
199
- <name>International Organization for Standardization</name>
200
- </organization>
201
- </owner>
202
- </copyright>
203
- <relation type="obsoletes">
204
- <locality type="clause"><referenceFrom>3.1</referenceFrom></locality>
205
- <docidentifier>IEC 8121</docidentifier>
206
- </relation>
207
- <ext>
208
- <doctype>technical-report</doctype>
209
- <horizontal>false</horizontal>
210
- <editorialgroup>
211
- <technical-committee number="34" type="ABC">Food products</technical-committee>
212
- <subcommittee number="4" type="DEF">Cereals and pulses</subcommittee>
213
- <workgroup number="3" type="GHI">Rice Group</workgroup>
214
- </editorialgroup>
215
- <ics><code>1.2.3</code></ics>
216
- <ics><code>1.2.3</code></ics>
217
- <structuredidentifier>
218
- <project-number part="1" subpart="3">ISO/IEC/CD 17301</project-number>
219
- </strucuredidentifier>
220
- </ext>
221
- </bibdata>
222
- </iso-standard>
223
- INPUT
224
- {:accesseddate=>"XXX",
225
- :agency=>"ISO/IEC",
226
- :circulateddate=>"XXX",
227
- :confirmeddate=>"XXX",
228
- :copieddate=>"XXX",
229
- :createddate=>"XXX",
230
- :docnumber=>"ISO/IEC/CD 17301-1-3",
231
- :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&#xa0;&#x2014; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&#xa0;&#x2014; Partie&#xa0;1&#x2013;3: Riz",
232
- :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
233
- :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
234
- :docsubtitlepart=>"Riz",
235
- :docsubtitlepartlabel=>"Partie&#xa0;1&#x2013;3",
236
- :doctitle=>"Cereals and pulses&#xa0;&#x2014; Specifications and test methods&#xa0;&#x2014; Part&#xa0;1&#x2013;3: Rice",
237
- :doctitleintro=>"Cereals and pulses",
238
- :doctitlemain=>"Specifications and test methods",
239
- :doctitlepart=>"Rice",
240
- :doctitlepartlabel=>"Part&#xa0;1&#x2013;3",
241
- :doctype=>"Technical Report",
242
- :doctype_display=>"Technical Report",
243
- :doctype_en=>"Technical Report",
244
- :doctype_fr=>"Technical Report",
245
- :docyear=>"2016",
246
- :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
247
- :horizontal=>"False",
248
- :ics=>"1.2.3, 1.2.3",
249
- :implementeddate=>"XXX",
250
- :issueddate=>"XXX",
251
- :lang=>"en",
252
- :obsoleteddate=>"XXX",
253
- :obsoletes=>"IEC 8121",
254
- :obsoletes_part=>"3.1",
255
- :publisheddate=>"XXX",
256
- :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
257
- :receiveddate=>"XXX",
258
- :sc=>"DEF 4",
259
- :script=>"Latn",
260
- :secretariat=>"XXX",
261
- :stage=>"50",
262
- :stage_int=>50,
263
- :stageabbr=>"FDIS",
264
- :statusabbr=>"CFDIS",
265
- :tc=>"ABC 34",
266
- :tc_docnumber=>["17301"],
267
- :transmitteddate=>"XXX",
268
- :unchangeddate=>"XXX",
269
- :unpublished=>true,
270
- :updateddate=>"XXX",
271
- :vote_endeddate=>"XXX",
272
- :vote_starteddate=>"XXX",
273
- :wg=>"GHI 3"}
274
- OUTPUT
212
+ output = <<~OUTPUT
213
+ {:agency=>"ISO/IEC",
214
+ :docnumber=>"ISO/IEC/CD 17301-1-3",
215
+ :docsubtitle=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses&#xa0;&#x2014; Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai&#xa0;&#x2014; Partie&#xa0;1&#x2013;3: Riz",
216
+ :docsubtitleintro=>"C&#xe9;r&#xe9;ales et l&#xe9;gumineuses",
217
+ :docsubtitlemain=>"Sp&#xe9;cification et m&#xe9;thodes d&#x27;essai",
218
+ :docsubtitlepart=>"Riz",
219
+ :docsubtitlepartlabel=>"Partie&#xa0;1&#x2013;3",
220
+ :doctitle=>"Cereals and pulses&#xa0;&#x2014; Specifications and test methods&#xa0;&#x2014; Part&#xa0;1&#x2013;3: Rice",
221
+ :doctitleintro=>"Cereals and pulses",
222
+ :doctitlemain=>"Specifications and test methods",
223
+ :doctitlepart=>"Rice",
224
+ :doctitlepartlabel=>"Part&#xa0;1&#x2013;3",
225
+ :doctype=>"Technical Report",
226
+ :doctype_display=>"Technical Report",
227
+ :doctype_en=>"Technical Report",
228
+ :doctype_fr=>"Technical Report",
229
+ :docyear=>"2016",
230
+ :editorialgroup=>["ABC 34", "DEF 4", "GHI 3"],
231
+ :horizontal=>"False",
232
+ :ics=>"1.2.3, 1.2.3",
233
+ :lang=>"en",
234
+ :obsoletes=>"IEC 8121",
235
+ :obsoletes_part=>"3.1",
236
+ :publisher=>"International Organization for Standardization and International Electrotechnical Commission",
237
+ :sc=>"DEF 4",
238
+ :script=>"Latn",
239
+ :stage=>"50",
240
+ :stage_int=>50,
241
+ :stageabbr=>"FDIS",
242
+ :statusabbr=>"CFDIS",
243
+ :tc=>"ABC 34",
244
+ :tc_docnumber=>["17301"],
245
+ :unpublished=>true,
246
+ :wg=>"GHI 3"}
247
+ OUTPUT
248
+ expect(metadata(c.info(Nokogiri::XML(input), nil))
249
+ .to_s.gsub(/, :/, ",\n:")).to be_equivalent_to output
275
250
  end
276
-
277
251
  end
@@ -8,11 +8,9 @@ RSpec.describe IsoDoc do
8
8
  input = <<~INPUT
9
9
  <iso-standard xmlns="http://riboseinc.com/isoxml">
10
10
  <bibdata>
11
- <title>
12
11
  <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
13
12
  <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
14
13
  <title type="title-part" language="en" format="text/plain">Rice</title>
15
- </title>
16
14
  </bibdata>
17
15
  <preface><foreword>
18
16
  <note>
@@ -38,11 +36,9 @@ RSpec.describe IsoDoc do
38
36
  input = <<~INPUT
39
37
  <iso-standard xmlns="http://riboseinc.com/isoxml">
40
38
  <bibdata>
41
- <title>
42
39
  <title type="title-intro" language="en" format="text/plain">Cereals and pulses</title>
43
40
  <title type="title-main" language="en" format="text/plain">Specifications and test methods</title>
44
41
  <title type="title-part" language="en" format="text/plain">Rice</title>
45
- </title>
46
42
  </bibdata>
47
43
  <preface><foreword>
48
44
  <note>