metanorma-standoc 1.10.2 → 1.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/standoc/cleanup.rb +60 -0
- data/lib/asciidoctor/standoc/converter.rb +2 -0
- data/lib/asciidoctor/standoc/datamodel/diagram_preprocessor.rb +22 -21
- data/lib/asciidoctor/standoc/isodoc.rng +6 -0
- data/lib/asciidoctor/standoc/macros.rb +18 -0
- data/lib/asciidoctor/standoc/ref.rb +60 -56
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor/blocks_spec.rb +2 -2
- data/spec/asciidoctor/cleanup_sections_spec.rb +899 -864
- data/spec/asciidoctor/cleanup_spec.rb +36 -2
- data/spec/asciidoctor/macros_plantuml_spec.rb +165 -104
- data/spec/asciidoctor/macros_spec.rb +99 -0
- data/spec/support/shared_examples/structured_data_2_text_preprocessor.rb +34 -34
- metadata +4 -4
data/metanorma-standoc.gemspec
CHANGED
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
|
|
33
33
|
spec.add_dependency "metanorma-plugin-lutaml"
|
34
34
|
spec.add_dependency "ruby-jing"
|
35
35
|
# relaton-cli not just relaton, to avoid circular reference in metanorma
|
36
|
-
spec.add_dependency "asciimath2unitsml", "~> 0.
|
36
|
+
spec.add_dependency "asciimath2unitsml", "~> 0.4.0"
|
37
37
|
spec.add_dependency "concurrent-ruby"
|
38
38
|
spec.add_dependency "latexmath"
|
39
39
|
spec.add_dependency "mathml2asciimath"
|
@@ -4,7 +4,7 @@ require "fileutils"
|
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
6
|
it "appends any initial user-supplied text to boilerplate in terms and definitions" do
|
7
|
-
|
7
|
+
input = <<~INPUT
|
8
8
|
#{ASCIIDOC_BLANK_HDR}
|
9
9
|
== Terms and Definitions
|
10
10
|
|
@@ -16,27 +16,30 @@ RSpec.describe Asciidoctor::Standoc do
|
|
16
16
|
|
17
17
|
This paragraph is extraneous
|
18
18
|
INPUT
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<p id=
|
24
|
-
<
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
</
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
19
|
+
output = <<~OUTPUT
|
20
|
+
#{BLANK_HDR}
|
21
|
+
<sections>
|
22
|
+
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
23
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
24
|
+
<p id='_'>I am boilerplate</p>
|
25
|
+
<ul id='_'>
|
26
|
+
<li>
|
27
|
+
<p id='_'>So am I</p>
|
28
|
+
</li>
|
29
|
+
</ul>
|
30
|
+
<term id="term-time">
|
31
|
+
<preferred>Time</preferred>
|
32
|
+
<definition><p id="_">This paragraph is extraneous</p></definition>
|
33
|
+
</term></terms>
|
34
|
+
</sections>
|
35
|
+
</standard-document>
|
35
36
|
OUTPUT
|
37
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
38
|
+
.to be_equivalent_to xmlpp(output)
|
36
39
|
end
|
37
40
|
|
38
41
|
it "removes initial extraneous material from Normative References" do
|
39
|
-
|
42
|
+
input = <<~INPUT
|
40
43
|
#{ASCIIDOC_BLANK_HDR}
|
41
44
|
[bibliography]
|
42
45
|
== Normative References
|
@@ -47,6 +50,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
47
50
|
|
48
51
|
This is also extraneous information
|
49
52
|
INPUT
|
53
|
+
output = <<~OUTPUT
|
50
54
|
#{BLANK_HDR}
|
51
55
|
<sections></sections>
|
52
56
|
<bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
@@ -67,10 +71,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
67
71
|
</bibliography>
|
68
72
|
</standard-document>
|
69
73
|
OUTPUT
|
74
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
75
|
+
.to be_equivalent_to xmlpp(output)
|
70
76
|
end
|
71
77
|
|
72
78
|
it "preserves user-supplied boilerplate in Normative References" do
|
73
|
-
|
79
|
+
input = <<~INPUT
|
74
80
|
#{ASCIIDOC_BLANK_HDR}
|
75
81
|
[bibliography]
|
76
82
|
== Normative References
|
@@ -84,6 +90,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
84
90
|
|
85
91
|
This is also extraneous information
|
86
92
|
INPUT
|
93
|
+
output = <<~OUTPUT
|
87
94
|
#{BLANK_HDR}
|
88
95
|
<sections></sections>
|
89
96
|
<bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
@@ -104,10 +111,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
104
111
|
</bibliography>
|
105
112
|
</standard-document>
|
106
113
|
OUTPUT
|
114
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
115
|
+
.to be_equivalent_to xmlpp(output)
|
107
116
|
end
|
108
117
|
|
109
118
|
it "sorts references with their notes in Bibliography" do
|
110
|
-
|
119
|
+
input = <<~INPUT
|
111
120
|
#{ASCIIDOC_BLANK_HDR}
|
112
121
|
[bibliography]
|
113
122
|
== Bibliography
|
@@ -130,6 +139,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
130
139
|
|
131
140
|
This is also extraneous information
|
132
141
|
INPUT
|
142
|
+
output = <<~OUTPUT
|
133
143
|
#{BLANK_HDR}
|
134
144
|
<sections> </sections>
|
135
145
|
<bibliography>
|
@@ -178,10 +188,12 @@ RSpec.describe Asciidoctor::Standoc do
|
|
178
188
|
</bibliography>
|
179
189
|
</standard-document>
|
180
190
|
OUTPUT
|
181
|
-
|
191
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
192
|
+
.to be_equivalent_to xmlpp(output)
|
193
|
+
end
|
182
194
|
|
183
195
|
it "defaults section obligations" do
|
184
|
-
|
196
|
+
input = <<~INPUT
|
185
197
|
#{ASCIIDOC_BLANK_HDR}
|
186
198
|
|
187
199
|
== Clause
|
@@ -192,150 +204,159 @@ end
|
|
192
204
|
|
193
205
|
Text
|
194
206
|
INPUT
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
207
|
+
output = <<~OUTPUT
|
208
|
+
#{BLANK_HDR}
|
209
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
210
|
+
<title>Clause</title>
|
211
|
+
<p id="_">Text</p>
|
212
|
+
</clause>
|
213
|
+
</sections><annex id="_" inline-header="false" obligation="normative">
|
214
|
+
<title>Clause</title>
|
215
|
+
<p id="_">Text</p>
|
216
|
+
</annex>
|
217
|
+
</standard-document>
|
205
218
|
OUTPUT
|
219
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
220
|
+
.to be_equivalent_to xmlpp(output)
|
206
221
|
end
|
207
222
|
|
208
223
|
it "extends clause levels past 5" do
|
209
|
-
|
210
|
-
|
224
|
+
input = <<~INPUT
|
225
|
+
#{ASCIIDOC_BLANK_HDR}
|
211
226
|
|
212
|
-
|
227
|
+
== Clause1
|
213
228
|
|
214
|
-
|
229
|
+
=== Clause2
|
215
230
|
|
216
|
-
|
231
|
+
==== Clause3
|
217
232
|
|
218
|
-
|
233
|
+
===== Clause4
|
219
234
|
|
220
|
-
|
235
|
+
====== Clause 5
|
221
236
|
|
222
|
-
|
223
|
-
|
237
|
+
[level=6]
|
238
|
+
====== Clause 6
|
224
239
|
|
225
|
-
|
226
|
-
|
240
|
+
[level=7]
|
241
|
+
====== Clause 7A
|
227
242
|
|
228
|
-
|
229
|
-
|
243
|
+
[level=7]
|
244
|
+
====== Clause 7B
|
230
245
|
|
231
|
-
|
232
|
-
|
246
|
+
[level=6]
|
247
|
+
====== Clause 6B
|
233
248
|
|
234
|
-
|
249
|
+
====== Clause 5B
|
235
250
|
|
236
251
|
INPUT
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
<
|
248
|
-
|
249
|
-
<
|
250
|
-
|
251
|
-
</
|
252
|
-
|
253
|
-
</
|
254
|
-
|
255
|
-
</
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
</clause
|
263
|
-
</
|
264
|
-
</
|
265
|
-
</clause>
|
266
|
-
</sections>
|
267
|
-
</standard-document>
|
252
|
+
output = <<~OUTPUT
|
253
|
+
#{BLANK_HDR}
|
254
|
+
<sections>
|
255
|
+
<clause id="_" inline-header="false" obligation="normative">
|
256
|
+
<title>Clause1</title>
|
257
|
+
<clause id="_" inline-header="false" obligation="normative">
|
258
|
+
<title>Clause2</title>
|
259
|
+
<clause id="_" inline-header="false" obligation="normative">
|
260
|
+
<title>Clause3</title>
|
261
|
+
<clause id="_" inline-header="false" obligation="normative"><title>Clause4</title><clause id="_" inline-header="false" obligation="normative">
|
262
|
+
<title>Clause 5</title>
|
263
|
+
<clause id="_" inline-header="false" obligation="normative">
|
264
|
+
<title>Clause 6</title>
|
265
|
+
<clause id="_" inline-header="false" obligation="normative">
|
266
|
+
<title>Clause 7A</title>
|
267
|
+
</clause><clause id="_" inline-header="false" obligation="normative">
|
268
|
+
<title>Clause 7B</title>
|
269
|
+
</clause></clause><clause id="_" inline-header="false" obligation="normative">
|
270
|
+
<title>Clause 6B</title>
|
271
|
+
</clause></clause>
|
272
|
+
<clause id="_" inline-header="false" obligation="normative">
|
273
|
+
<title>Clause 5B</title>
|
274
|
+
</clause></clause>
|
275
|
+
</clause>
|
276
|
+
</clause>
|
277
|
+
</clause>
|
278
|
+
</sections>
|
279
|
+
</standard-document>
|
268
280
|
OUTPUT
|
281
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
282
|
+
.to be_equivalent_to xmlpp(output)
|
269
283
|
end
|
270
284
|
|
271
|
-
|
272
|
-
|
285
|
+
it "inserts boilerplate before empty Normative References" do
|
286
|
+
input = <<~INPUT
|
273
287
|
#{ASCIIDOC_BLANK_HDR}
|
274
288
|
|
275
289
|
[bibliography]
|
276
290
|
== Normative References
|
277
291
|
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
283
|
-
|
284
|
-
</references></bibliography>
|
285
|
-
</standard-document>
|
286
|
-
|
287
|
-
|
292
|
+
INPUT
|
293
|
+
output = <<~OUTPUT
|
294
|
+
#{BLANK_HDR}
|
295
|
+
<sections>
|
296
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
297
|
+
<title>Normative references</title><p id="_">There are no normative references in this document.</p>
|
298
|
+
</references></bibliography>
|
299
|
+
</standard-document>
|
300
|
+
OUTPUT
|
301
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
302
|
+
.to be_equivalent_to xmlpp(output)
|
303
|
+
end
|
288
304
|
|
289
|
-
|
290
|
-
|
305
|
+
it "inserts boilerplate before non-empty Normative References" do
|
306
|
+
input = <<~INPUT
|
291
307
|
#{ASCIIDOC_BLANK_HDR}
|
292
308
|
|
293
309
|
[bibliography]
|
294
310
|
== Normative References
|
295
311
|
* [[[a,b]]] A
|
296
312
|
|
297
|
-
|
298
|
-
|
299
|
-
|
313
|
+
INPUT
|
314
|
+
output = <<~OUTPUT
|
315
|
+
#{BLANK_HDR}
|
316
|
+
<sections>
|
300
317
|
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
318
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
319
|
+
<title>Normative references</title><p id="_">The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
|
320
|
+
<bibitem id="a">
|
321
|
+
<formattedref format="application/x-isodoc+xml">A</formattedref>
|
322
|
+
<docidentifier>b</docidentifier>
|
323
|
+
</bibitem>
|
324
|
+
</references></bibliography>
|
325
|
+
</standard-document>
|
309
326
|
|
310
|
-
|
311
|
-
|
327
|
+
OUTPUT
|
328
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
329
|
+
.to be_equivalent_to xmlpp(output)
|
330
|
+
end
|
312
331
|
|
313
|
-
it "inserts boilerplate before empty Normative References in French" do
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
332
|
+
it "inserts boilerplate before empty Normative References in French" do
|
333
|
+
input = <<~INPUT
|
334
|
+
= Document title
|
335
|
+
Author
|
336
|
+
:docfile: test.adoc
|
337
|
+
:nodoc:
|
338
|
+
:novalid:
|
339
|
+
:no-isobib:
|
340
|
+
:language: fr
|
322
341
|
|
323
|
-
|
324
|
-
|
342
|
+
[bibliography]
|
343
|
+
== Normative References
|
325
344
|
|
326
345
|
INPUT
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
331
|
-
|
332
|
-
</references></bibliography>
|
333
|
-
</standard-document>
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
346
|
+
output = <<~OUTPUT
|
347
|
+
#{BLANK_HDR.sub(/<language>en/, '<language>fr')}
|
348
|
+
<sections>
|
349
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
350
|
+
<title>Références normatives</title><p id="_">Le présent document ne contient aucune référence normative.</p>
|
351
|
+
</references></bibliography>
|
352
|
+
</standard-document>
|
353
|
+
OUTPUT
|
354
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
355
|
+
.to be_equivalent_to xmlpp(output)
|
356
|
+
end
|
357
|
+
|
358
|
+
it "processes section names, with footnotes" do
|
359
|
+
input = <<~INPUT
|
339
360
|
#{ASCIIDOC_BLANK_HDR}
|
340
361
|
.Foreword.footnote:[A]
|
341
362
|
|
@@ -353,7 +374,7 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
353
374
|
|
354
375
|
[heading=acknowledgements]
|
355
376
|
== Acknowledgements.footnote:[A]
|
356
|
-
|
377
|
+
|
357
378
|
[.preface]
|
358
379
|
== Dedication
|
359
380
|
|
@@ -429,205 +450,208 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
429
450
|
|
430
451
|
=== Bibliography Subsection
|
431
452
|
|
432
|
-
INPUT
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
<title>
|
507
|
-
Terms, Definitions, Symbols and Abbreviated Terms.
|
508
|
-
<fn reference='1'>
|
509
|
-
<p id='_'>A</p>
|
510
|
-
</fn>
|
511
|
-
</title>
|
512
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
513
|
-
<title>Introduction</title>
|
514
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
515
|
-
<title>Intro 1</title>
|
516
|
-
</clause>
|
517
|
-
</clause>
|
518
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
519
|
-
<title>Intro 2</title>
|
520
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
521
|
-
<title>Intro 3</title>
|
522
|
-
</clause>
|
523
|
-
</clause>
|
524
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
525
|
-
<title>Intro 4</title>
|
526
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
527
|
-
<title>Intro 5</title>
|
453
|
+
INPUT
|
454
|
+
output = <<~OUTPUT
|
455
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
456
|
+
<bibdata type='standard'>
|
457
|
+
<title language='en' format='text/plain'>Document title</title>
|
458
|
+
<language>en</language>
|
459
|
+
<script>Latn</script>
|
460
|
+
<abstract>
|
461
|
+
<p>Text</p>
|
462
|
+
</abstract>
|
463
|
+
<status>
|
464
|
+
<stage>published</stage>
|
465
|
+
</status>
|
466
|
+
<copyright>
|
467
|
+
<from>#{Time.now.year}</from>
|
468
|
+
</copyright>
|
469
|
+
<ext>
|
470
|
+
<doctype>article</doctype>
|
471
|
+
</ext>
|
472
|
+
</bibdata>
|
473
|
+
<preface>
|
474
|
+
<abstract id='_'>
|
475
|
+
<title>Abstract</title>
|
476
|
+
<p id='_'>Text</p>
|
477
|
+
</abstract>
|
478
|
+
<foreword id='_' obligation='informative'>
|
479
|
+
<title>
|
480
|
+
Foreword
|
481
|
+
<fn reference='1'>
|
482
|
+
<p id='_'>A</p>
|
483
|
+
</fn>
|
484
|
+
</title>
|
485
|
+
<p id='_'>Text</p>
|
486
|
+
</foreword>
|
487
|
+
<introduction id='_' obligation='informative'>
|
488
|
+
<title>Introduction</title>
|
489
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
490
|
+
<title>Introduction Subsection</title>
|
491
|
+
</clause>
|
492
|
+
</introduction>
|
493
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
494
|
+
<title>Dedication</title>
|
495
|
+
</clause>
|
496
|
+
<acknowledgements id='_' obligation='informative'>
|
497
|
+
<title>
|
498
|
+
Acknowledgements
|
499
|
+
<fn reference='1'>
|
500
|
+
<p id='_'>A</p>
|
501
|
+
</fn>
|
502
|
+
</title>
|
503
|
+
</acknowledgements>
|
504
|
+
</preface>
|
505
|
+
<sections>
|
506
|
+
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
507
|
+
<title>
|
508
|
+
Scope
|
509
|
+
<fn reference='1'>
|
510
|
+
<p id='_'>A</p>
|
511
|
+
</fn>
|
512
|
+
</title>
|
513
|
+
<p id='_'>Text</p>
|
514
|
+
</clause>
|
515
|
+
<terms id='_' obligation='normative'>
|
516
|
+
<title>
|
517
|
+
Terms and definitions
|
518
|
+
<fn reference='1'>
|
519
|
+
<p id='_'>A</p>
|
520
|
+
</fn>
|
521
|
+
</title>
|
522
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
523
|
+
<term id='term-term1'>
|
524
|
+
<preferred>Term1</preferred>
|
525
|
+
</term>
|
526
|
+
</terms>
|
528
527
|
<clause id='_' inline-header='false' obligation='normative'>
|
529
|
-
<title>
|
528
|
+
<title>
|
529
|
+
Terms, Definitions, Symbols and Abbreviated Terms.
|
530
|
+
<fn reference='1'>
|
531
|
+
<p id='_'>A</p>
|
532
|
+
</fn>
|
533
|
+
</title>
|
534
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
535
|
+
<title>Introduction</title>
|
536
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
537
|
+
<title>Intro 1</title>
|
538
|
+
</clause>
|
539
|
+
</clause>
|
540
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
541
|
+
<title>Intro 2</title>
|
542
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
543
|
+
<title>Intro 3</title>
|
544
|
+
</clause>
|
545
|
+
</clause>
|
546
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
547
|
+
<title>Intro 4</title>
|
548
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
549
|
+
<title>Intro 5</title>
|
550
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
551
|
+
<title>Term1</title>
|
552
|
+
</clause>
|
553
|
+
</clause>
|
554
|
+
</clause>
|
555
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
556
|
+
<title>Normal Terms</title>
|
557
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
558
|
+
<title>Term2</title>
|
559
|
+
</clause>
|
560
|
+
</clause>
|
561
|
+
<definitions id='_' obligation='normative'>
|
562
|
+
<title>
|
563
|
+
Symbols and abbreviated terms
|
564
|
+
<fn reference='1'>
|
565
|
+
<p id='_'>A</p>
|
566
|
+
</fn>
|
567
|
+
</title>
|
568
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
569
|
+
<title>General</title>
|
570
|
+
</clause>
|
571
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
572
|
+
<title>
|
573
|
+
Symbols
|
574
|
+
<fn reference='1'>
|
575
|
+
<p id='_'>A</p>
|
576
|
+
</fn>
|
577
|
+
</title>
|
578
|
+
</definitions>
|
579
|
+
</definitions>
|
530
580
|
</clause>
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
581
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
582
|
+
<title>
|
583
|
+
Abbreviated terms
|
584
|
+
<fn reference='1'>
|
585
|
+
<p id='_'>A</p>
|
586
|
+
</fn>
|
587
|
+
</title>
|
588
|
+
</definitions>
|
589
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
590
|
+
<title>Clause 4</title>
|
591
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
592
|
+
<title>Introduction</title>
|
593
|
+
</clause>
|
594
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
595
|
+
<title>Clause 4.2</title>
|
596
|
+
</clause>
|
597
|
+
</clause>
|
598
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
599
|
+
<title>Terms and Definitions</title>
|
600
|
+
</clause>
|
601
|
+
</sections>
|
602
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
550
603
|
<title>
|
551
|
-
|
604
|
+
Annex.
|
552
605
|
<fn reference='1'>
|
553
606
|
<p id='_'>A</p>
|
554
607
|
</fn>
|
555
608
|
</title>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
</references>
|
600
|
-
<references id='_' normative='true' obligation='informative'>
|
601
|
-
<title>Normative References 2.
|
602
|
-
<fn reference='1'>
|
603
|
-
<p id='_'>A</p>
|
604
|
-
</fn>
|
605
|
-
</title>
|
606
|
-
</references>
|
607
|
-
<references id='_' normative='false' obligation='informative'>
|
608
|
-
<title>Bibliography
|
609
|
-
<fn reference='1'>
|
610
|
-
<p id='_'>A</p>
|
611
|
-
</fn>
|
612
|
-
</title>
|
613
|
-
</references>
|
614
|
-
<clause id='_' obligation='informative'>
|
615
|
-
<title>Bibliography 2.
|
616
|
-
<fn reference='1'>
|
617
|
-
<p id='_'>A</p>
|
618
|
-
</fn>
|
619
|
-
</title>
|
620
|
-
<references id='_' normative='false' obligation='informative'>
|
621
|
-
<title>Bibliography Subsection</title>
|
622
|
-
</references>
|
623
|
-
</clause>
|
624
|
-
</bibliography>
|
625
|
-
</standard-document>
|
626
|
-
OUTPUT
|
627
|
-
end
|
609
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
610
|
+
<title>Annex A.1</title>
|
611
|
+
</clause>
|
612
|
+
</annex>
|
613
|
+
<bibliography>
|
614
|
+
<references id='_' normative='true' obligation='informative'>
|
615
|
+
<title>Normative references
|
616
|
+
<fn reference='1'>
|
617
|
+
<p id='_'>A</p>
|
618
|
+
</fn>
|
619
|
+
</title>
|
620
|
+
<p id='_'>There are no normative references in this document.</p>
|
621
|
+
</references>
|
622
|
+
<references id='_' normative='true' obligation='informative'>
|
623
|
+
<title>Normative References 2.
|
624
|
+
<fn reference='1'>
|
625
|
+
<p id='_'>A</p>
|
626
|
+
</fn>
|
627
|
+
</title>
|
628
|
+
</references>
|
629
|
+
<references id='_' normative='false' obligation='informative'>
|
630
|
+
<title>Bibliography
|
631
|
+
<fn reference='1'>
|
632
|
+
<p id='_'>A</p>
|
633
|
+
</fn>
|
634
|
+
</title>
|
635
|
+
</references>
|
636
|
+
<clause id='_' obligation='informative'>
|
637
|
+
<title>Bibliography 2.
|
638
|
+
<fn reference='1'>
|
639
|
+
<p id='_'>A</p>
|
640
|
+
</fn>
|
641
|
+
</title>
|
642
|
+
<references id='_' normative='false' obligation='informative'>
|
643
|
+
<title>Bibliography Subsection</title>
|
644
|
+
</references>
|
645
|
+
</clause>
|
646
|
+
</bibliography>
|
647
|
+
</standard-document>
|
648
|
+
OUTPUT
|
649
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
650
|
+
.to be_equivalent_to xmlpp(output)
|
651
|
+
end
|
628
652
|
|
629
|
-
it "processes section names, default to English" do
|
630
|
-
|
653
|
+
it "processes section names, default to English" do
|
654
|
+
input = <<~INPUT
|
631
655
|
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":language: tlh\n:script: Latn\n:nodoc:")}
|
632
656
|
.Foreword
|
633
657
|
|
@@ -721,144 +745,147 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
721
745
|
|
722
746
|
=== Bibliography Subsection
|
723
747
|
|
724
|
-
INPUT
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
779
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
780
|
-
<title>Introduction</title>
|
781
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
782
|
-
<title>Intro 1</title>
|
783
|
-
</clause>
|
784
|
-
</clause>
|
785
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
786
|
-
<title>Intro 2</title>
|
787
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
788
|
-
<title>Intro 3</title>
|
789
|
-
</clause>
|
790
|
-
</clause>
|
791
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
792
|
-
<title>Intro 4</title>
|
793
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
794
|
-
<title>Intro 5</title>
|
748
|
+
INPUT
|
749
|
+
output = <<~OUTPUT
|
750
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
751
|
+
<bibdata type='standard'>
|
752
|
+
<title language='en' format='text/plain'>Document title</title>
|
753
|
+
<language>tlh</language>
|
754
|
+
<script>Latn</script>
|
755
|
+
<abstract>
|
756
|
+
<p>Text</p>
|
757
|
+
</abstract>
|
758
|
+
<status>
|
759
|
+
<stage>published</stage>
|
760
|
+
</status>
|
761
|
+
<copyright>
|
762
|
+
<from>#{Time.now.year}</from>
|
763
|
+
</copyright>
|
764
|
+
<ext>
|
765
|
+
<doctype>article</doctype>
|
766
|
+
</ext>
|
767
|
+
</bibdata>
|
768
|
+
<preface>
|
769
|
+
<abstract id='_'>
|
770
|
+
<title>Abstract</title>
|
771
|
+
<p id='_'>Text</p>
|
772
|
+
</abstract>
|
773
|
+
<foreword id='_' obligation='informative'>
|
774
|
+
<title>Foreword</title>
|
775
|
+
<p id='_'>Text</p>
|
776
|
+
</foreword>
|
777
|
+
<introduction id='_' obligation='informative'>
|
778
|
+
<title>Introduction</title>
|
779
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
780
|
+
<title>Introduction Subsection</title>
|
781
|
+
</clause>
|
782
|
+
</introduction>
|
783
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
784
|
+
<title>Dedication</title>
|
785
|
+
</clause>
|
786
|
+
<acknowledgements id='_' obligation='informative'>
|
787
|
+
<title>Acknowledgements</title>
|
788
|
+
</acknowledgements>
|
789
|
+
</preface>
|
790
|
+
<sections>
|
791
|
+
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
792
|
+
<title>Scope</title>
|
793
|
+
<p id='_'>Text</p>
|
794
|
+
</clause>
|
795
|
+
<terms id='_' obligation='normative'>
|
796
|
+
<title>Terms and definitions</title>
|
797
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
798
|
+
<term id='term-term1'>
|
799
|
+
<preferred>Term1</preferred>
|
800
|
+
</term>
|
801
|
+
</terms>
|
795
802
|
<clause id='_' inline-header='false' obligation='normative'>
|
796
|
-
<title>
|
803
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
804
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
805
|
+
<title>Introduction</title>
|
806
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
807
|
+
<title>Intro 1</title>
|
808
|
+
</clause>
|
809
|
+
</clause>
|
810
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
811
|
+
<title>Intro 2</title>
|
812
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
813
|
+
<title>Intro 3</title>
|
814
|
+
</clause>
|
815
|
+
</clause>
|
816
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
817
|
+
<title>Intro 4</title>
|
818
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
819
|
+
<title>Intro 5</title>
|
820
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
821
|
+
<title>Term1</title>
|
822
|
+
</clause>
|
823
|
+
</clause>
|
824
|
+
</clause>
|
825
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
826
|
+
<title>Normal Terms</title>
|
827
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
828
|
+
<title>Term2</title>
|
829
|
+
</clause>
|
830
|
+
</clause>
|
831
|
+
<definitions id='_' obligation='normative'>
|
832
|
+
<title>Symbols and abbreviated terms</title>
|
833
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
834
|
+
<title>General</title>
|
835
|
+
</clause>
|
836
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
837
|
+
<title>Symbols</title>
|
838
|
+
</definitions>
|
839
|
+
</definitions>
|
797
840
|
</clause>
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
</
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
<references id='_' normative='true' obligation='informative'>
|
844
|
-
<title>Normative References 2</title>
|
845
|
-
</references>
|
846
|
-
<references id='_' normative='false' obligation='informative'>
|
847
|
-
<title>Bibliography</title>
|
848
|
-
</references>
|
849
|
-
<clause id='_' obligation='informative'>
|
850
|
-
<title>Bibliography 2</title>
|
851
|
-
<references id='_' normative='false' obligation='informative'>
|
852
|
-
<title>Bibliography Subsection</title>
|
853
|
-
</references>
|
854
|
-
</clause>
|
855
|
-
</bibliography>
|
856
|
-
</standard-document>
|
857
|
-
OUTPUT
|
858
|
-
end
|
841
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
842
|
+
<title>Abbreviated terms</title>
|
843
|
+
</definitions>
|
844
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
845
|
+
<title>Clause 4</title>
|
846
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
847
|
+
<title>Introduction</title>
|
848
|
+
</clause>
|
849
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
850
|
+
<title>Clause 4.2</title>
|
851
|
+
</clause>
|
852
|
+
</clause>
|
853
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
854
|
+
<title>Terms and Definitions</title>
|
855
|
+
</clause>
|
856
|
+
</sections>
|
857
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
858
|
+
<title>Annex</title>
|
859
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
860
|
+
<title>Annex A.1</title>
|
861
|
+
</clause>
|
862
|
+
</annex>
|
863
|
+
<bibliography>
|
864
|
+
<references id='_' normative='true' obligation='informative'>
|
865
|
+
<title>Normative references</title>
|
866
|
+
<p id='_'>There are no normative references in this document.</p>
|
867
|
+
</references>
|
868
|
+
<references id='_' normative='true' obligation='informative'>
|
869
|
+
<title>Normative References 2</title>
|
870
|
+
</references>
|
871
|
+
<references id='_' normative='false' obligation='informative'>
|
872
|
+
<title>Bibliography</title>
|
873
|
+
</references>
|
874
|
+
<clause id='_' obligation='informative'>
|
875
|
+
<title>Bibliography 2</title>
|
876
|
+
<references id='_' normative='false' obligation='informative'>
|
877
|
+
<title>Bibliography Subsection</title>
|
878
|
+
</references>
|
879
|
+
</clause>
|
880
|
+
</bibliography>
|
881
|
+
</standard-document>
|
882
|
+
OUTPUT
|
883
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
884
|
+
.to be_equivalent_to xmlpp(output)
|
885
|
+
end
|
859
886
|
|
860
|
-
it "processes section names, French" do
|
861
|
-
|
887
|
+
it "processes section names, French" do
|
888
|
+
input = <<~INPUT
|
862
889
|
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":language: fr\n:script: Latn\n:nodoc:")}
|
863
890
|
.Foreword
|
864
891
|
|
@@ -952,147 +979,150 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
952
979
|
|
953
980
|
=== Bibliography Subsection
|
954
981
|
|
955
|
-
INPUT
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1013
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1014
|
-
<title>Introduction</title>
|
1015
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1016
|
-
<title>Intro 1</title>
|
1017
|
-
</clause>
|
1018
|
-
</clause>
|
1019
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1020
|
-
<title>Intro 2</title>
|
1021
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1022
|
-
<title>Intro 3</title>
|
1023
|
-
</clause>
|
1024
|
-
</clause>
|
1025
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1026
|
-
<title>Intro 4</title>
|
1027
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1028
|
-
<title>Intro 5</title>
|
982
|
+
INPUT
|
983
|
+
output = <<~OUTPUT
|
984
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
985
|
+
<bibdata type='standard'>
|
986
|
+
<title language='en' format='text/plain'>Document title</title>
|
987
|
+
<language>fr</language>
|
988
|
+
<script>Latn</script>
|
989
|
+
<abstract>
|
990
|
+
<p>Text</p>
|
991
|
+
</abstract>
|
992
|
+
<status>
|
993
|
+
<stage>published</stage>
|
994
|
+
</status>
|
995
|
+
<copyright>
|
996
|
+
<from>#{Time.now.year}</from>
|
997
|
+
</copyright>
|
998
|
+
<ext>
|
999
|
+
<doctype>article</doctype>
|
1000
|
+
</ext>
|
1001
|
+
</bibdata>
|
1002
|
+
<preface>
|
1003
|
+
<abstract id='_'>
|
1004
|
+
<title>Résumé</title>
|
1005
|
+
<p id='_'>Text</p>
|
1006
|
+
</abstract>
|
1007
|
+
<foreword id='_' obligation='informative'>
|
1008
|
+
<title>Avant-propos</title>
|
1009
|
+
<p id='_'>Text</p>
|
1010
|
+
</foreword>
|
1011
|
+
<introduction id='_' obligation='informative'>
|
1012
|
+
<title>Introduction</title>
|
1013
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1014
|
+
<title>Introduction Subsection</title>
|
1015
|
+
</clause>
|
1016
|
+
</introduction>
|
1017
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1018
|
+
<title>Dedication</title>
|
1019
|
+
</clause>
|
1020
|
+
<acknowledgements id='_' obligation='informative'>
|
1021
|
+
<title>Remerciements</title>
|
1022
|
+
</acknowledgements>
|
1023
|
+
</preface>
|
1024
|
+
<sections>
|
1025
|
+
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
1026
|
+
<title>Domaine d’application</title>
|
1027
|
+
<p id='_'>Text</p>
|
1028
|
+
</clause>
|
1029
|
+
<terms id='_' obligation='normative'>
|
1030
|
+
<title>Terms et définitions</title>
|
1031
|
+
<p id='_'>
|
1032
|
+
Pour les besoins du présent document, les termes et définitions suivants
|
1033
|
+
s’appliquent.
|
1034
|
+
</p>
|
1035
|
+
<term id='term-term1'>
|
1036
|
+
<preferred>Term1</preferred>
|
1037
|
+
</term>
|
1038
|
+
</terms>
|
1029
1039
|
<clause id='_' inline-header='false' obligation='normative'>
|
1030
|
-
<title>
|
1040
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1041
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1042
|
+
<title>Introduction</title>
|
1043
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1044
|
+
<title>Intro 1</title>
|
1045
|
+
</clause>
|
1046
|
+
</clause>
|
1047
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1048
|
+
<title>Intro 2</title>
|
1049
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1050
|
+
<title>Intro 3</title>
|
1051
|
+
</clause>
|
1052
|
+
</clause>
|
1053
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1054
|
+
<title>Intro 4</title>
|
1055
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1056
|
+
<title>Intro 5</title>
|
1057
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1058
|
+
<title>Term1</title>
|
1059
|
+
</clause>
|
1060
|
+
</clause>
|
1061
|
+
</clause>
|
1062
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1063
|
+
<title>Normal Terms</title>
|
1064
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1065
|
+
<title>Term2</title>
|
1066
|
+
</clause>
|
1067
|
+
</clause>
|
1068
|
+
<definitions id='_' obligation='normative'>
|
1069
|
+
<title>Symboles et termes abrégés</title>
|
1070
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1071
|
+
<title>General</title>
|
1072
|
+
</clause>
|
1073
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
1074
|
+
<title>Symboles</title>
|
1075
|
+
</definitions>
|
1076
|
+
</definitions>
|
1031
1077
|
</clause>
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
</
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
<references id='_' normative='true' obligation='informative'>
|
1078
|
-
<title>Normative References 2</title>
|
1079
|
-
</references>
|
1080
|
-
<references id='_' normative='false' obligation='informative'>
|
1081
|
-
<title>Bibliographie</title>
|
1082
|
-
</references>
|
1083
|
-
<clause id='_' obligation='informative'>
|
1084
|
-
<title>Bibliography 2</title>
|
1085
|
-
<references id='_' normative='false' obligation='informative'>
|
1086
|
-
<title>Bibliography Subsection</title>
|
1087
|
-
</references>
|
1088
|
-
</clause>
|
1089
|
-
</bibliography>
|
1090
|
-
</standard-document>
|
1091
|
-
OUTPUT
|
1092
|
-
end
|
1078
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
1079
|
+
<title>Termes abrégés</title>
|
1080
|
+
</definitions>
|
1081
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1082
|
+
<title>Clause 4</title>
|
1083
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1084
|
+
<title>Introduction</title>
|
1085
|
+
</clause>
|
1086
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1087
|
+
<title>Clause 4.2</title>
|
1088
|
+
</clause>
|
1089
|
+
</clause>
|
1090
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1091
|
+
<title>Terms and Definitions</title>
|
1092
|
+
</clause>
|
1093
|
+
</sections>
|
1094
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
1095
|
+
<title>Annex</title>
|
1096
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1097
|
+
<title>Annex A.1</title>
|
1098
|
+
</clause>
|
1099
|
+
</annex>
|
1100
|
+
<bibliography>
|
1101
|
+
<references id='_' normative='true' obligation='informative'>
|
1102
|
+
<title>Références normatives</title>
|
1103
|
+
<p id='_'>Le présent document ne contient aucune référence normative.</p>
|
1104
|
+
</references>
|
1105
|
+
<references id='_' normative='true' obligation='informative'>
|
1106
|
+
<title>Normative References 2</title>
|
1107
|
+
</references>
|
1108
|
+
<references id='_' normative='false' obligation='informative'>
|
1109
|
+
<title>Bibliographie</title>
|
1110
|
+
</references>
|
1111
|
+
<clause id='_' obligation='informative'>
|
1112
|
+
<title>Bibliography 2</title>
|
1113
|
+
<references id='_' normative='false' obligation='informative'>
|
1114
|
+
<title>Bibliography Subsection</title>
|
1115
|
+
</references>
|
1116
|
+
</clause>
|
1117
|
+
</bibliography>
|
1118
|
+
</standard-document>
|
1119
|
+
OUTPUT
|
1120
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1121
|
+
.to be_equivalent_to xmlpp(output)
|
1122
|
+
end
|
1093
1123
|
|
1094
|
-
it "processes section names, Simplified Chinese" do
|
1095
|
-
|
1124
|
+
it "processes section names, Simplified Chinese" do
|
1125
|
+
input = <<~INPUT
|
1096
1126
|
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ":language: zh\n:script: Hans\n:nodoc:")}
|
1097
1127
|
.Foreword
|
1098
1128
|
|
@@ -1186,145 +1216,148 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
1186
1216
|
|
1187
1217
|
=== Bibliography Subsection
|
1188
1218
|
|
1189
|
-
INPUT
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1244
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1245
|
-
<title>Introduction</title>
|
1246
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1247
|
-
<title>Intro 1</title>
|
1248
|
-
</clause>
|
1249
|
-
</clause>
|
1250
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1251
|
-
<title>Intro 2</title>
|
1252
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1253
|
-
<title>Intro 3</title>
|
1254
|
-
</clause>
|
1255
|
-
</clause>
|
1256
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1257
|
-
<title>Intro 4</title>
|
1258
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1259
|
-
<title>Intro 5</title>
|
1219
|
+
INPUT
|
1220
|
+
output = <<~OUTPUT
|
1221
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1222
|
+
<bibdata type='standard'>
|
1223
|
+
<title language='en' format='text/plain'>Document title</title>
|
1224
|
+
<language>zh</language>
|
1225
|
+
<script>Hans</script>
|
1226
|
+
<abstract>
|
1227
|
+
<p>Text</p>
|
1228
|
+
</abstract>
|
1229
|
+
<status>
|
1230
|
+
<stage>published</stage>
|
1231
|
+
</status>
|
1232
|
+
<copyright>
|
1233
|
+
<from>#{Time.now.year}</from>
|
1234
|
+
</copyright>
|
1235
|
+
<ext>
|
1236
|
+
<doctype>article</doctype>
|
1237
|
+
</ext>
|
1238
|
+
</bibdata>
|
1239
|
+
<preface>
|
1240
|
+
<abstract id='_'>
|
1241
|
+
<title>摘要</title>
|
1242
|
+
<p id='_'>Text</p>
|
1243
|
+
</abstract>
|
1244
|
+
<foreword id='_' obligation='informative'>
|
1245
|
+
<title>前言</title>
|
1246
|
+
<p id='_'>Text</p>
|
1247
|
+
</foreword>
|
1248
|
+
<introduction id='_' obligation='informative'>
|
1249
|
+
<title>引言</title>
|
1250
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1251
|
+
<title>Introduction Subsection</title>
|
1252
|
+
</clause>
|
1253
|
+
</introduction>
|
1254
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1255
|
+
<title>Dedication</title>
|
1256
|
+
</clause>
|
1257
|
+
<acknowledgements id='_' obligation='informative'>
|
1258
|
+
<title>致謝</title>
|
1259
|
+
</acknowledgements>
|
1260
|
+
</preface>
|
1261
|
+
<sections>
|
1262
|
+
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
1263
|
+
<title>范围</title>
|
1264
|
+
<p id='_'>Text</p>
|
1265
|
+
</clause>
|
1266
|
+
<terms id='_' obligation='normative'>
|
1267
|
+
<title>术语和定义</title>
|
1268
|
+
<p id='_'>下列术语和定义适用于本文件。</p>
|
1269
|
+
<term id='term-term1'>
|
1270
|
+
<preferred>Term1</preferred>
|
1271
|
+
</term>
|
1272
|
+
</terms>
|
1260
1273
|
<clause id='_' inline-header='false' obligation='normative'>
|
1261
|
-
<title>
|
1274
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1275
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1276
|
+
<title>Introduction</title>
|
1277
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1278
|
+
<title>Intro 1</title>
|
1279
|
+
</clause>
|
1280
|
+
</clause>
|
1281
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1282
|
+
<title>Intro 2</title>
|
1283
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1284
|
+
<title>Intro 3</title>
|
1285
|
+
</clause>
|
1286
|
+
</clause>
|
1287
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1288
|
+
<title>Intro 4</title>
|
1289
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1290
|
+
<title>Intro 5</title>
|
1291
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1292
|
+
<title>Term1</title>
|
1293
|
+
</clause>
|
1294
|
+
</clause>
|
1295
|
+
</clause>
|
1296
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1297
|
+
<title>Normal Terms</title>
|
1298
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1299
|
+
<title>Term2</title>
|
1300
|
+
</clause>
|
1301
|
+
</clause>
|
1302
|
+
<definitions id='_' obligation='normative'>
|
1303
|
+
<title>符号、代号和缩略语</title>
|
1304
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1305
|
+
<title>General</title>
|
1306
|
+
</clause>
|
1307
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
1308
|
+
<title>符号</title>
|
1309
|
+
</definitions>
|
1310
|
+
</definitions>
|
1262
1311
|
</clause>
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
</
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
<references id='_' normative='true' obligation='informative'>
|
1309
|
-
<title>Normative References 2</title>
|
1310
|
-
</references>
|
1311
|
-
<references id='_' normative='false' obligation='informative'>
|
1312
|
-
<title>参考文献</title>
|
1313
|
-
</references>
|
1314
|
-
<clause id='_' obligation='informative'>
|
1315
|
-
<title>Bibliography 2</title>
|
1316
|
-
<references id='_' normative='false' obligation='informative'>
|
1317
|
-
<title>Bibliography Subsection</title>
|
1318
|
-
</references>
|
1319
|
-
</clause>
|
1320
|
-
</bibliography>
|
1321
|
-
</standard-document>
|
1322
|
-
OUTPUT
|
1323
|
-
end
|
1312
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
1313
|
+
<title>代号和缩略语</title>
|
1314
|
+
</definitions>
|
1315
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1316
|
+
<title>Clause 4</title>
|
1317
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1318
|
+
<title>Introduction</title>
|
1319
|
+
</clause>
|
1320
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1321
|
+
<title>Clause 4.2</title>
|
1322
|
+
</clause>
|
1323
|
+
</clause>
|
1324
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1325
|
+
<title>Terms and Definitions</title>
|
1326
|
+
</clause>
|
1327
|
+
</sections>
|
1328
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
1329
|
+
<title>Annex</title>
|
1330
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1331
|
+
<title>Annex A.1</title>
|
1332
|
+
</clause>
|
1333
|
+
</annex>
|
1334
|
+
<bibliography>
|
1335
|
+
<references id='_' normative='true' obligation='informative'>
|
1336
|
+
<title>规范性引用文件</title>
|
1337
|
+
<p id='_'>本文件并没有规范性引用文件。</p>
|
1338
|
+
</references>
|
1339
|
+
<references id='_' normative='true' obligation='informative'>
|
1340
|
+
<title>Normative References 2</title>
|
1341
|
+
</references>
|
1342
|
+
<references id='_' normative='false' obligation='informative'>
|
1343
|
+
<title>参考文献</title>
|
1344
|
+
</references>
|
1345
|
+
<clause id='_' obligation='informative'>
|
1346
|
+
<title>Bibliography 2</title>
|
1347
|
+
<references id='_' normative='false' obligation='informative'>
|
1348
|
+
<title>Bibliography Subsection</title>
|
1349
|
+
</references>
|
1350
|
+
</clause>
|
1351
|
+
</bibliography>
|
1352
|
+
</standard-document>
|
1353
|
+
OUTPUT
|
1354
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1355
|
+
.to be_equivalent_to xmlpp(output)
|
1356
|
+
end
|
1324
1357
|
|
1325
|
-
it "processes section names, internationalisation file" do
|
1326
|
-
|
1327
|
-
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/,
|
1358
|
+
it "processes section names, internationalisation file" do
|
1359
|
+
input = <<~INPUT
|
1360
|
+
#{ASCIIDOC_BLANK_HDR.sub(/:nodoc:/, ':i18nyaml: spec/assets/i18n.yaml')}
|
1328
1361
|
.Foreword
|
1329
1362
|
|
1330
1363
|
Text
|
@@ -1417,140 +1450,142 @@ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", *OPTIONS)))).to be_equiv
|
|
1417
1450
|
|
1418
1451
|
=== Bibliography Subsection
|
1419
1452
|
|
1420
|
-
INPUT
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1475
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1476
|
-
<title>Introduction</title>
|
1477
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1478
|
-
<title>Intro 1</title>
|
1479
|
-
</clause>
|
1480
|
-
</clause>
|
1481
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1482
|
-
<title>Intro 2</title>
|
1483
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1484
|
-
<title>Intro 3</title>
|
1485
|
-
</clause>
|
1486
|
-
</clause>
|
1487
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1488
|
-
<title>Intro 4</title>
|
1489
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1490
|
-
<title>Intro 5</title>
|
1453
|
+
INPUT
|
1454
|
+
output = <<~OUTPUT
|
1455
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1456
|
+
<bibdata type='standard'>
|
1457
|
+
<title language='en' format='text/plain'>Document title</title>
|
1458
|
+
<language>en</language>
|
1459
|
+
<script>Latn</script>
|
1460
|
+
<abstract>
|
1461
|
+
<p>Text</p>
|
1462
|
+
</abstract>
|
1463
|
+
<status>
|
1464
|
+
<stage>published</stage>
|
1465
|
+
</status>
|
1466
|
+
<copyright>
|
1467
|
+
<from>#{Time.now.year}</from>
|
1468
|
+
</copyright>
|
1469
|
+
<ext>
|
1470
|
+
<doctype>article</doctype>
|
1471
|
+
</ext>
|
1472
|
+
</bibdata>
|
1473
|
+
<preface>
|
1474
|
+
<abstract id='_'>
|
1475
|
+
<title>Abstract</title>
|
1476
|
+
<p id='_'>Text</p>
|
1477
|
+
</abstract>
|
1478
|
+
<foreword id='_' obligation='informative'>
|
1479
|
+
<title>Antaŭparolo</title>
|
1480
|
+
<p id='_'>Text</p>
|
1481
|
+
</foreword>
|
1482
|
+
<introduction id='_' obligation='informative'>
|
1483
|
+
<title>Enkonduko</title>
|
1484
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1485
|
+
<title>Introduction Subsection</title>
|
1486
|
+
</clause>
|
1487
|
+
</introduction>
|
1488
|
+
<clause id='_' inline-header='false' obligation='informative'>
|
1489
|
+
<title>Dedication</title>
|
1490
|
+
</clause>
|
1491
|
+
<acknowledgements id='_' obligation='informative'>
|
1492
|
+
<title>Acknowledgements</title>
|
1493
|
+
</acknowledgements>
|
1494
|
+
</preface>
|
1495
|
+
<sections>
|
1496
|
+
<clause id='_' type='scope' inline-header='false' obligation='normative'>
|
1497
|
+
<title>Amplekso</title>
|
1498
|
+
<p id='_'>Text</p>
|
1499
|
+
</clause>
|
1500
|
+
<terms id='_' obligation='normative'>
|
1501
|
+
<title>Terms and definitions</title>
|
1502
|
+
<p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
|
1503
|
+
<term id='term-term1'>
|
1504
|
+
<preferred>Term1</preferred>
|
1505
|
+
</term>
|
1506
|
+
</terms>
|
1491
1507
|
<clause id='_' inline-header='false' obligation='normative'>
|
1492
|
-
<title>
|
1508
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
1509
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1510
|
+
<title>Introduction</title>
|
1511
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1512
|
+
<title>Intro 1</title>
|
1513
|
+
</clause>
|
1514
|
+
</clause>
|
1515
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1516
|
+
<title>Intro 2</title>
|
1517
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1518
|
+
<title>Intro 3</title>
|
1519
|
+
</clause>
|
1520
|
+
</clause>
|
1521
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1522
|
+
<title>Intro 4</title>
|
1523
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1524
|
+
<title>Intro 5</title>
|
1525
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1526
|
+
<title>Term1</title>
|
1527
|
+
</clause>
|
1528
|
+
</clause>
|
1529
|
+
</clause>
|
1530
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1531
|
+
<title>Normal Terms</title>
|
1532
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1533
|
+
<title>Term2</title>
|
1534
|
+
</clause>
|
1535
|
+
</clause>
|
1536
|
+
<definitions id='_' obligation='normative'>
|
1537
|
+
<title>Symbols and abbreviated terms</title>
|
1538
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1539
|
+
<title>General</title>
|
1540
|
+
</clause>
|
1541
|
+
<definitions id='_' type='symbols' obligation='normative'>
|
1542
|
+
<title>Simboloj kai mallongigitaj terminoj</title>
|
1543
|
+
</definitions>
|
1544
|
+
</definitions>
|
1493
1545
|
</clause>
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
</
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
<references id='_' normative='true' obligation='informative'>
|
1540
|
-
<title>Normative References 2</title>
|
1541
|
-
</references>
|
1542
|
-
<references id='_' normative='false' obligation='informative'>
|
1543
|
-
<title>Bibliografio</title>
|
1544
|
-
</references>
|
1545
|
-
<clause id='_' obligation='informative'>
|
1546
|
-
<title>Bibliography 2</title>
|
1547
|
-
<references id='_' normative='false' obligation='informative'>
|
1548
|
-
<title>Bibliography Subsection</title>
|
1549
|
-
</references>
|
1550
|
-
</clause>
|
1551
|
-
</bibliography>
|
1552
|
-
</standard-document>
|
1553
|
-
OUTPUT
|
1554
|
-
end
|
1555
|
-
|
1546
|
+
<definitions id='_' type='abbreviated_terms' obligation='normative'>
|
1547
|
+
<title>Abbreviated terms</title>
|
1548
|
+
</definitions>
|
1549
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1550
|
+
<title>Clause 4</title>
|
1551
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1552
|
+
<title>Introduction</title>
|
1553
|
+
</clause>
|
1554
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1555
|
+
<title>Clause 4.2</title>
|
1556
|
+
</clause>
|
1557
|
+
</clause>
|
1558
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1559
|
+
<title>Terms and Definitions</title>
|
1560
|
+
</clause>
|
1561
|
+
</sections>
|
1562
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
1563
|
+
<title>Annex</title>
|
1564
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1565
|
+
<title>Annex A.1</title>
|
1566
|
+
</clause>
|
1567
|
+
</annex>
|
1568
|
+
<bibliography>
|
1569
|
+
<references id='_' normative='true' obligation='informative'>
|
1570
|
+
<title>Normaj citaĵoj</title>
|
1571
|
+
<p id='_'>There are no normative references in this document.</p>
|
1572
|
+
</references>
|
1573
|
+
<references id='_' normative='true' obligation='informative'>
|
1574
|
+
<title>Normative References 2</title>
|
1575
|
+
</references>
|
1576
|
+
<references id='_' normative='false' obligation='informative'>
|
1577
|
+
<title>Bibliografio</title>
|
1578
|
+
</references>
|
1579
|
+
<clause id='_' obligation='informative'>
|
1580
|
+
<title>Bibliography 2</title>
|
1581
|
+
<references id='_' normative='false' obligation='informative'>
|
1582
|
+
<title>Bibliography Subsection</title>
|
1583
|
+
</references>
|
1584
|
+
</clause>
|
1585
|
+
</bibliography>
|
1586
|
+
</standard-document>
|
1587
|
+
OUTPUT
|
1588
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
1589
|
+
.to be_equivalent_to xmlpp(output)
|
1590
|
+
end
|
1556
1591
|
end
|