metanorma-standoc 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/automerge.yml +31 -0
- data/lib/isodoc/html/htmlstyle.css +1 -1
- data/lib/metanorma/standoc/base.rb +1 -0
- data/lib/metanorma/standoc/basicdoc.rng +0 -27
- data/lib/metanorma/standoc/biblio-standoc.rng +164 -0
- data/lib/metanorma/standoc/biblio.rng +45 -18
- data/lib/metanorma/standoc/blocks.rb +2 -1
- data/lib/metanorma/standoc/cleanup.rb +1 -0
- data/lib/metanorma/standoc/cleanup_asciibib.rb +110 -0
- data/lib/metanorma/standoc/cleanup_biblio.rb +5 -111
- data/lib/metanorma/standoc/cleanup_block.rb +7 -6
- data/lib/metanorma/standoc/cleanup_boilerplate.rb +6 -6
- data/lib/metanorma/standoc/cleanup_inline.rb +2 -2
- data/lib/metanorma/standoc/cleanup_text.rb +10 -3
- data/lib/metanorma/standoc/inline.rb +3 -1
- data/lib/metanorma/standoc/isodoc-compile.rng +7 -0
- data/lib/metanorma/standoc/isodoc.rng +32 -195
- data/lib/metanorma/standoc/macros_plantuml.rb +23 -10
- data/lib/metanorma/standoc/validate.rb +8 -8
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +0 -1
- data/spec/metanorma/biblio_spec.rb +152 -144
- data/spec/metanorma/blocks_spec.rb +2 -2
- data/spec/metanorma/cleanup_sections_spec.rb +1 -2
- data/spec/metanorma/cleanup_spec.rb +11 -0
- data/spec/metanorma/inline_spec.rb +70 -8
- data/spec/metanorma/isobib_cache_spec.rb +2 -2
- data/spec/metanorma/macros_plantuml_spec.rb +4 -4
- data/spec/metanorma/macros_spec.rb +2 -2
- data/spec/metanorma/refs_spec.rb +25 -25
- data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +3 -3
- data/spec/vcr_cassettes/bsi16341.yml +70 -72
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +82 -82
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +12 -12
- data/spec/vcr_cassettes/hide_refs.yml +58 -58
- data/spec/vcr_cassettes/isobib_get_123.yml +13 -13
- data/spec/vcr_cassettes/isobib_get_123_1.yml +22 -22
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +33 -33
- data/spec/vcr_cassettes/isobib_get_123_2.yml +25 -25
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
- data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +37 -21
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +45 -45
- data/spec/vcr_cassettes/std-link.yml +12 -12
- metadata +6 -16
@@ -12,22 +12,22 @@ RSpec.describe Metanorma::Standoc do
|
|
12
12
|
=== Standard
|
13
13
|
id:: iso123
|
14
14
|
docid::
|
15
|
-
|
16
|
-
|
15
|
+
type::: ISO
|
16
|
+
id::: ISO 123
|
17
17
|
type:: standard
|
18
18
|
contributor::
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
role::: publisher
|
20
|
+
organization:::
|
21
|
+
name:::: ISO
|
22
22
|
contributor::
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
role::: author
|
24
|
+
person:::
|
25
|
+
name::::
|
26
26
|
+
|
27
27
|
--
|
28
28
|
completename::
|
29
|
-
|
30
|
-
|
29
|
+
language::: en
|
30
|
+
content::: Fred
|
31
31
|
--
|
32
32
|
contributor::
|
33
33
|
role::: author
|
@@ -89,118 +89,118 @@ RSpec.describe Metanorma::Standoc do
|
|
89
89
|
=== Other Title
|
90
90
|
fetched:: 2019-06-30
|
91
91
|
title::
|
92
|
-
|
93
|
-
|
92
|
+
type::: main
|
93
|
+
content::: Geographic information
|
94
94
|
title::
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
95
|
+
type::: subtitle
|
96
|
+
content::: Geographic information subtitle
|
97
|
+
language::: en
|
98
|
+
script::: Latn
|
99
|
+
format::: text/plain
|
100
100
|
type:: standard
|
101
101
|
docid::
|
102
|
-
|
103
|
-
|
104
|
-
|
102
|
+
type::: ISO
|
103
|
+
id::: TC211
|
104
|
+
primary::: true
|
105
105
|
docnumber:: 211
|
106
106
|
edition:: 1
|
107
107
|
language::
|
108
|
-
|
109
|
-
|
108
|
+
. en
|
109
|
+
. fr
|
110
110
|
script:: Latn
|
111
111
|
version::
|
112
|
-
|
113
|
-
|
112
|
+
revision_date::: 2019-04-01
|
113
|
+
draft::: draft
|
114
114
|
biblionote::
|
115
|
-
|
116
|
-
|
115
|
+
type::: bibnote
|
116
|
+
content:::
|
117
117
|
+
|
118
118
|
--
|
119
119
|
Mark set a major league
|
120
120
|
home run record in 1998.
|
121
121
|
--
|
122
122
|
docstatus::
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
stage::: stage
|
124
|
+
substage::: substage
|
125
|
+
iteration::: iteration
|
126
126
|
date::
|
127
|
-
|
128
|
-
|
127
|
+
type::: issued
|
128
|
+
value::: 2014
|
129
129
|
date::
|
130
|
-
|
131
|
-
|
132
|
-
|
130
|
+
type::: published
|
131
|
+
from::: 2014-04
|
132
|
+
to::: 2014-05
|
133
133
|
date::
|
134
|
-
|
135
|
-
|
134
|
+
type::: accessed
|
135
|
+
value::: 2015-05-20
|
136
136
|
abstract::
|
137
|
-
|
137
|
+
content:::
|
138
138
|
+
|
139
139
|
--
|
140
140
|
ISO 19115-1:2014 defines the schema required for ...
|
141
141
|
--
|
142
142
|
abstract::
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
content::: L'ISO 19115-1:2014 définit le schéma requis pour ...
|
144
|
+
language::: fr
|
145
|
+
script::: Latn
|
146
|
+
format::: text/plain
|
147
147
|
copyright::
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
148
|
+
owner:::
|
149
|
+
name:::: International Organization for Standardization
|
150
|
+
abbreviation:::: ISO
|
151
|
+
url:::: www.iso.org
|
152
|
+
from::: 2014
|
153
|
+
to::: #{Time.now.year}
|
154
154
|
link::
|
155
|
-
|
156
|
-
|
155
|
+
type::: src
|
156
|
+
content::: https://www.iso.org/standard/53798.html
|
157
157
|
link::
|
158
|
-
|
159
|
-
|
158
|
+
type::: obp
|
159
|
+
content::: https://www.iso.org/obp/ui/#!iso:std:53798:en
|
160
160
|
link::
|
161
|
-
|
162
|
-
|
161
|
+
type::: rss
|
162
|
+
content::: https://www.iso.org/contents/data/standard/05/37/53798.detail.rss
|
163
163
|
medium::
|
164
|
-
|
165
|
-
|
166
|
-
|
164
|
+
form::: medium form
|
165
|
+
size::: medium size
|
166
|
+
scale::: medium scale
|
167
167
|
place:: bib place
|
168
168
|
extent::
|
169
|
-
|
170
|
-
|
171
|
-
|
169
|
+
locality:::
|
170
|
+
type:::: section
|
171
|
+
reference_from:::: 7
|
172
172
|
accesslocation::
|
173
|
-
|
174
|
-
|
173
|
+
. accesslocation1
|
174
|
+
. accesslocation2
|
175
175
|
classification::
|
176
|
-
|
177
|
-
|
176
|
+
type::: type
|
177
|
+
value::: value
|
178
178
|
validity::
|
179
|
-
|
180
|
-
|
179
|
+
begins::: 2010-10-10 12:21
|
180
|
+
ends::: 2011-02-03 18:30
|
181
181
|
|
182
182
|
|
183
183
|
==== Contributor
|
184
184
|
organization::
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
185
|
+
name::: International Organization for Standardization
|
186
|
+
url::: www.iso.org
|
187
|
+
abbreviation::: ISO
|
188
|
+
subdivision::: division
|
189
189
|
role::
|
190
|
-
|
191
|
-
|
190
|
+
type::: publisher
|
191
|
+
description::: Publisher role
|
192
192
|
|
193
193
|
==== Contributor
|
194
194
|
person::
|
195
|
-
|
196
|
-
|
195
|
+
name:::
|
196
|
+
completename::::
|
197
197
|
+
|
198
198
|
--
|
199
199
|
content:: A. Bierman
|
200
200
|
language:: en
|
201
201
|
--
|
202
|
-
|
203
|
-
|
202
|
+
affiliation:::
|
203
|
+
organization::::
|
204
204
|
+
|
205
205
|
--
|
206
206
|
name:: IETF
|
@@ -209,81 +209,81 @@ RSpec.describe Metanorma::Standoc do
|
|
209
209
|
type::: uri
|
210
210
|
id::: www.ietf.org
|
211
211
|
--
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
212
|
+
description:::: Affiliation description
|
213
|
+
contact:::
|
214
|
+
street::::
|
215
|
+
. 8 Street St
|
216
|
+
city:::: City
|
217
|
+
postcode:::: 123456
|
218
|
+
country:::: Country
|
219
|
+
state:::: State
|
220
|
+
contact:::
|
221
|
+
type:::: phone
|
222
|
+
value:::: 223322
|
223
223
|
role:: author
|
224
224
|
|
225
225
|
==== Contributor
|
226
226
|
organization::
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
227
|
+
name::: IETF
|
228
|
+
abbreviation::: IETF
|
229
|
+
identifier:::
|
230
|
+
type:::: uri
|
231
|
+
id:::: www.ietf.org
|
232
232
|
role:: publisher
|
233
233
|
|
234
234
|
==== Contributor
|
235
235
|
person::
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
236
|
+
name:::
|
237
|
+
language:::: en
|
238
|
+
formatted_initials:::: A.
|
239
|
+
surname:::: Bierman
|
240
|
+
affiliation:::
|
241
241
|
+
|
242
242
|
--
|
243
243
|
organization::
|
244
|
-
|
245
|
-
|
244
|
+
name::: IETF
|
245
|
+
abbreviation::: IETF
|
246
246
|
description::
|
247
|
-
|
248
|
-
|
249
|
-
|
247
|
+
content::: Affiliation description
|
248
|
+
language::: en
|
249
|
+
script::: Latn
|
250
250
|
--
|
251
|
-
|
252
|
-
|
253
|
-
|
251
|
+
identifier:::
|
252
|
+
type:::: uri
|
253
|
+
id:::: www.person.com
|
254
254
|
role:: author
|
255
255
|
|
256
256
|
==== Relation
|
257
257
|
type:: updates
|
258
258
|
bibitem::
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
259
|
+
title::: Geographic information
|
260
|
+
formattedref::: ISO 19115:2003
|
261
|
+
bib_locality:::
|
262
|
+
type:::: page
|
263
|
+
reference_from:::: 7
|
264
|
+
reference_to:::: 10
|
265
265
|
|
266
266
|
==== Relation
|
267
267
|
type:: updates
|
268
268
|
bibitem::
|
269
|
-
|
270
|
-
|
271
|
-
|
269
|
+
type::: standard
|
270
|
+
formattedref::: ISO 19115:2003/Cor 1:2006
|
271
|
+
title::: Geographic information
|
272
272
|
|
273
273
|
==== Series
|
274
274
|
type:: main
|
275
275
|
title::
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
276
|
+
type::: original
|
277
|
+
content::: ISO/IEC FDIS 10118-3
|
278
|
+
language::: en
|
279
|
+
script::: Latn
|
280
|
+
format::: text/plain
|
281
281
|
place:: Serie's place
|
282
282
|
organization:: Serie's organization
|
283
283
|
abbreviation::
|
284
|
-
|
285
|
-
|
286
|
-
|
284
|
+
content::: ABVR
|
285
|
+
language::: en
|
286
|
+
script::: Latn
|
287
287
|
from:: 2009-02-01
|
288
288
|
to:: 2010-12-20
|
289
289
|
number:: serie1234
|
@@ -293,9 +293,9 @@ RSpec.describe Metanorma::Standoc do
|
|
293
293
|
type:: alt
|
294
294
|
title:: seriestitle
|
295
295
|
formattedref::
|
296
|
-
|
297
|
-
|
298
|
-
|
296
|
+
content::: serieref
|
297
|
+
language::: en
|
298
|
+
script::: Latn
|
299
299
|
|
300
300
|
INPUT
|
301
301
|
output = <<~OUTPUT
|
@@ -815,28 +815,28 @@ RSpec.describe Metanorma::Standoc do
|
|
815
815
|
==== Standard
|
816
816
|
id:: iso123
|
817
817
|
docid::
|
818
|
-
|
819
|
-
|
818
|
+
type::: ISO
|
819
|
+
id::: ISO 123
|
820
820
|
type:: standard
|
821
821
|
contributor::
|
822
|
-
|
823
|
-
|
824
|
-
|
822
|
+
role::: publisher
|
823
|
+
organization:::
|
824
|
+
name:::: ISO
|
825
825
|
contributor::
|
826
|
-
|
827
|
-
|
828
|
-
|
826
|
+
role::: author
|
827
|
+
person:::
|
828
|
+
name::::
|
829
829
|
+
|
830
830
|
--
|
831
831
|
completename::
|
832
|
-
|
833
|
-
|
832
|
+
language::: en
|
833
|
+
content::: Fred
|
834
834
|
--
|
835
835
|
contributor::
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
836
|
+
role::: author
|
837
|
+
person:::
|
838
|
+
name::::
|
839
|
+
completename::::: Jack
|
840
840
|
|
841
841
|
INPUT
|
842
842
|
output = <<~OUTPUT
|
@@ -980,18 +980,26 @@ RSpec.describe Metanorma::Standoc do
|
|
980
980
|
</bibitem>
|
981
981
|
</relation>
|
982
982
|
<extent type='volume'>
|
983
|
-
<
|
983
|
+
<locality>
|
984
|
+
<referenceFrom>4</referenceFrom>
|
985
|
+
</locality>
|
984
986
|
</extent>
|
985
987
|
<extent type='issue'>
|
986
|
-
<
|
987
|
-
|
988
|
+
<locality>
|
989
|
+
<referenceFrom>2</referenceFrom>
|
990
|
+
<referenceTo>3</referenceTo>
|
991
|
+
</locality>
|
988
992
|
</extent>
|
989
993
|
<extent type='page'>
|
990
|
-
<
|
991
|
-
|
994
|
+
<locality>
|
995
|
+
<referenceFrom>12</referenceFrom>
|
996
|
+
<referenceTo>13</referenceTo>
|
997
|
+
</locality>
|
992
998
|
</extent>
|
993
999
|
<extent type='page'>
|
994
|
-
<
|
1000
|
+
<locality>
|
1001
|
+
<referenceFrom>19</referenceFrom>
|
1002
|
+
</locality>
|
995
1003
|
</extent>
|
996
1004
|
</bibitem>
|
997
1005
|
</references>
|
@@ -1135,7 +1135,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1135
1135
|
#{ASCIIDOC_BLANK_HDR}
|
1136
1136
|
|
1137
1137
|
[[ABC]]
|
1138
|
-
[%unnumbered,number=3]
|
1138
|
+
[%unnumbered,number=3,class=plate]
|
1139
1139
|
.Split-it-right sample divider
|
1140
1140
|
image::spec/examples/rice_images/rice_image1.png[alttext]
|
1141
1141
|
|
@@ -1143,7 +1143,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1143
1143
|
output = <<~OUTPUT
|
1144
1144
|
#{BLANK_HDR}
|
1145
1145
|
<sections>
|
1146
|
-
<figure id="ABC" unnumbered="true" number="3">
|
1146
|
+
<figure id="ABC" unnumbered="true" number="3" class="plate">
|
1147
1147
|
<name>Split-it-right sample divider</name>
|
1148
1148
|
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto" alt="alttext"/>
|
1149
1149
|
</figure>
|
@@ -3,7 +3,6 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Metanorma::Standoc do
|
6
|
-
=begin
|
7
6
|
it "appends any initial user-supplied text to boilerplate in terms and definitions" do
|
8
7
|
input = <<~INPUT
|
9
8
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -1355,7 +1354,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1355
1354
|
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1356
1355
|
.to be_equivalent_to xmlpp(output)
|
1357
1356
|
end
|
1358
|
-
|
1357
|
+
|
1359
1358
|
it "processes section names, internationalisation file" do
|
1360
1359
|
input = <<~INPUT
|
1361
1360
|
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":no-pdf:\n:i18nyaml: spec/assets/i18n.yaml")}
|
@@ -167,6 +167,9 @@ RSpec.describe Metanorma::Standoc do
|
|
167
167
|
|
168
168
|
"((ppm))" 
|
169
169
|
|
170
|
+
"stem:[3]".
|
171
|
+
footnote:[The mole]
|
172
|
+
|
170
173
|
....
|
171
174
|
((ppm))",
|
172
175
|
....
|
@@ -195,6 +198,14 @@ RSpec.describe Metanorma::Standoc do
|
|
195
198
|
<primary>ppm</primary>
|
196
199
|
</index>
|
197
200
|
” 
|
201
|
+
</p>
|
202
|
+
<p id='_'>“<stem type='MathML'>
|
203
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
204
|
+
<mn>3</mn>
|
205
|
+
</math>
|
206
|
+
</stem>”.<fn reference='1'>
|
207
|
+
<p id='_'>The mole</p>
|
208
|
+
</fn>
|
198
209
|
</p>
|
199
210
|
<figure id='_'>
|
200
211
|
<pre id='_'>((ppm))",</pre>
|
@@ -389,8 +389,70 @@ RSpec.describe Metanorma::Standoc do
|
|
389
389
|
</sections>
|
390
390
|
</standard-document>
|
391
391
|
OUTPUT
|
392
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
393
|
-
.to be_equivalent_to(output)
|
392
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
393
|
+
.to be_equivalent_to(xmlpp(output))
|
394
|
+
end
|
395
|
+
|
396
|
+
it "processes crossreferences style" do
|
397
|
+
input = <<~INPUT
|
398
|
+
#{ASCIIDOC_BLANK_HDR}
|
399
|
+
[[reference]]
|
400
|
+
== Section
|
401
|
+
|
402
|
+
Inline Reference to <<reference>>
|
403
|
+
Inline Reference to <<reference,style=basic%>>
|
404
|
+
Inline Reference to <<reference,style=basic>>
|
405
|
+
Inline Reference to <<reference,style=%>>
|
406
|
+
INPUT
|
407
|
+
output = <<~OUTPUT
|
408
|
+
#{BLANK_HDR}
|
409
|
+
<sections>
|
410
|
+
<clause id='reference' inline-header='false' obligation='normative'>
|
411
|
+
<title>Section</title>
|
412
|
+
<p id='_'>
|
413
|
+
Inline Reference to
|
414
|
+
<xref target='reference'/>
|
415
|
+
Inline Reference to
|
416
|
+
<xref target='reference' style='basic'/>
|
417
|
+
Inline Reference to
|
418
|
+
<xref target='reference'>style=basic</xref>
|
419
|
+
Inline Reference to
|
420
|
+
<xref target='reference'>style=%</xref>
|
421
|
+
</p>
|
422
|
+
</clause>
|
423
|
+
</sections>
|
424
|
+
</standard-document>
|
425
|
+
OUTPUT
|
426
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
427
|
+
.to be_equivalent_to(xmlpp(output))
|
428
|
+
end
|
429
|
+
|
430
|
+
it "processes crossreferences style as document attribute" do
|
431
|
+
input = <<~INPUT
|
432
|
+
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":nodoc:\n:xrefstyle: full")}
|
433
|
+
[[reference]]
|
434
|
+
== Section
|
435
|
+
|
436
|
+
Inline Reference to <<reference>>
|
437
|
+
Inline Reference to <<reference,style=basic%>>
|
438
|
+
INPUT
|
439
|
+
output = <<~OUTPUT
|
440
|
+
#{BLANK_HDR}
|
441
|
+
<sections>
|
442
|
+
<clause id='reference' inline-header='false' obligation='normative'>
|
443
|
+
<title>Section</title>
|
444
|
+
<p id='_'>
|
445
|
+
Inline Reference to
|
446
|
+
<xref target='reference'/>
|
447
|
+
Inline Reference to
|
448
|
+
<xref target='reference' style='basic'/>
|
449
|
+
</p>
|
450
|
+
</clause>
|
451
|
+
</sections>
|
452
|
+
</standard-document>
|
453
|
+
OUTPUT
|
454
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
455
|
+
.to be_equivalent_to(xmlpp(output))
|
394
456
|
end
|
395
457
|
|
396
458
|
it "processes formatting within crossreferences" do
|
@@ -417,8 +479,8 @@ RSpec.describe Metanorma::Standoc do
|
|
417
479
|
</sections>
|
418
480
|
</standard-document>
|
419
481
|
OUTPUT
|
420
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
421
|
-
.to be_equivalent_to(output)
|
482
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
483
|
+
.to be_equivalent_to(xmlpp(output))
|
422
484
|
end
|
423
485
|
|
424
486
|
it "processes formatting within crossreferences to non-existent anchor" do
|
@@ -444,8 +506,8 @@ RSpec.describe Metanorma::Standoc do
|
|
444
506
|
</sections>
|
445
507
|
</standard-document>
|
446
508
|
OUTPUT
|
447
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
448
|
-
.to be_equivalent_to(output)
|
509
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
510
|
+
.to be_equivalent_to(xmlpp(output))
|
449
511
|
end
|
450
512
|
|
451
513
|
it "processes combinations of crossreferences" do
|
@@ -475,8 +537,8 @@ RSpec.describe Metanorma::Standoc do
|
|
475
537
|
</sections>
|
476
538
|
</standard-document>
|
477
539
|
OUTPUT
|
478
|
-
expect((strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
479
|
-
.to be_equivalent_to(output)
|
540
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
541
|
+
.to be_equivalent_to(xmlpp(output))
|
480
542
|
end
|
481
543
|
|
482
544
|
it "processes bibliographic anchors" do
|
@@ -50,7 +50,7 @@ ISO_124_DATED = <<~XML.freeze
|
|
50
50
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:61884:en</uri>
|
51
51
|
<uri type="rss">https://www.iso.org/contents/data/standard/06/18/61884.detail.rss</uri>
|
52
52
|
<docidentifier type="ISO" primary="true">ISO 124:2014</docidentifier>
|
53
|
-
<docidentifier type='URN'>urn:iso:std:iso:124:
|
53
|
+
<docidentifier type='URN'>urn:iso:std:iso:124:ed-7</docidentifier>
|
54
54
|
<docnumber>124</docnumber>
|
55
55
|
<date type="published">
|
56
56
|
<on>2014-03</on>
|
@@ -210,7 +210,7 @@ ISO_123_DATED = <<~XML.freeze
|
|
210
210
|
<uri type="obp">https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
|
211
211
|
<uri type="rss">https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
|
212
212
|
<docidentifier type="ISO" primary="true">ISO 123:2001</docidentifier>
|
213
|
-
<docidentifier type='URN'>urn:iso:std:iso:123:
|
213
|
+
<docidentifier type='URN'>urn:iso:std:iso:123:ed-3</docidentifier>
|
214
214
|
<docnumber>123</docnumber>
|
215
215
|
<date type="published">
|
216
216
|
<on>2001-05</on>
|
@@ -129,8 +129,8 @@ RSpec.describe Metanorma::Standoc do
|
|
129
129
|
expect(
|
130
130
|
xmlpp(
|
131
131
|
strip_guid(Asciidoctor.convert(input, *OPTIONS))
|
132
|
-
.gsub(%r{
|
133
|
-
|
132
|
+
.gsub(%r{spec/assets/lutaml/[^./]+\.png},
|
133
|
+
"spec/assets/_.png"),
|
134
134
|
),
|
135
135
|
).to(be_equivalent_to(xmlpp(output)))
|
136
136
|
end
|
@@ -169,8 +169,8 @@ RSpec.describe Metanorma::Standoc do
|
|
169
169
|
expect(
|
170
170
|
xmlpp(
|
171
171
|
strip_guid(Asciidoctor.convert(input, *OPTIONS))
|
172
|
-
|
173
|
-
|
172
|
+
.gsub(%r{spec/assets/lutaml/[^./]+\.png},
|
173
|
+
"spec/assets/_.png"),
|
174
174
|
),
|
175
175
|
).to(be_equivalent_to(xmlpp(output)))
|
176
176
|
end
|
@@ -975,7 +975,7 @@ RSpec.describe Metanorma::Standoc do
|
|
975
975
|
<uri type='src'>https://www.iso.org/standard/3944.html</uri>
|
976
976
|
<uri type='rss'>https://www.iso.org/contents/data/standard/00/39/3944.detail.rss</uri>
|
977
977
|
<docidentifier type='ISO' primary='true'>ISO 131</docidentifier>
|
978
|
-
<docidentifier type='URN'>urn:iso:std:iso:131:
|
978
|
+
<docidentifier type='URN'>urn:iso:std:iso:131:ed-1</docidentifier>
|
979
979
|
<docnumber>131</docnumber>
|
980
980
|
<contributor>
|
981
981
|
<role type='publisher'/>
|
@@ -1018,7 +1018,7 @@ RSpec.describe Metanorma::Standoc do
|
|
1018
1018
|
<uri type='src'>https://www.iso.org/standard/3944.html</uri>
|
1019
1019
|
<uri type='rss'>https://www.iso.org/contents/data/standard/00/39/3944.detail.rss</uri>
|
1020
1020
|
<docidentifier type='ISO' primary='true'>ISO 131:1979</docidentifier>
|
1021
|
-
<docidentifier type='URN'>urn:iso:std:iso:131:
|
1021
|
+
<docidentifier type='URN'>urn:iso:std:iso:131:ed-1</docidentifier>
|
1022
1022
|
<docnumber>131</docnumber>
|
1023
1023
|
<date type='published'>
|
1024
1024
|
<on>1979-11</on>
|