metanorma-iso 1.3.22 → 1.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -7
- data/.github/workflows/ubuntu.yml +8 -7
- data/.github/workflows/windows.yml +8 -8
- data/Gemfile +2 -0
- data/lib/asciidoctor/iso/base.rb +22 -0
- data/lib/asciidoctor/iso/biblio.rng +89 -32
- data/lib/asciidoctor/iso/cleanup.rb +20 -3
- data/lib/asciidoctor/iso/front.rb +16 -107
- data/lib/asciidoctor/iso/front_id.rb +196 -0
- data/lib/asciidoctor/iso/isodoc.rng +475 -2
- data/lib/asciidoctor/iso/isostandard-amd.rng +98 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -1
- data/lib/asciidoctor/iso/macros.rb +21 -0
- data/lib/asciidoctor/iso/reqt.rng +23 -0
- data/lib/asciidoctor/iso/section.rb +18 -32
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +87 -0
- data/lib/asciidoctor/iso/validate.rb +41 -25
- data/lib/asciidoctor/iso/validate_requirements.rb +1 -1
- data/lib/asciidoctor/iso/validate_section.rb +2 -2
- data/lib/asciidoctor/iso/validate_style.rb +6 -5
- data/lib/asciidoctor/iso/validate_title.rb +1 -1
- data/lib/isodoc/iso/base_convert.rb +77 -107
- data/lib/isodoc/iso/html/header.html +10 -6
- data/lib/isodoc/iso/html/html_iso_titlepage.html +27 -18
- data/lib/isodoc/iso/html/isodoc.scss +53 -28
- data/lib/isodoc/iso/html/scripts.html +23 -21
- data/lib/isodoc/iso/html/style-human.scss +23 -0
- data/lib/isodoc/iso/html/style-iso.scss +18 -0
- data/lib/isodoc/iso/html/word_iso_intro.html +4 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +23 -2
- data/lib/isodoc/iso/html/wordstyle.scss +80 -39
- data/lib/isodoc/iso/html_convert.rb +7 -9
- data/lib/isodoc/iso/iso.amendment.xsl +4597 -0
- data/lib/isodoc/iso/iso.international-standard.xsl +4597 -0
- data/lib/isodoc/iso/metadata.rb +71 -23
- data/lib/isodoc/iso/pdf_convert.rb +39 -0
- data/lib/isodoc/iso/sections.rb +66 -0
- data/lib/isodoc/iso/sts_convert.rb +29 -0
- data/lib/isodoc/iso/xref.rb +105 -0
- data/lib/metanorma-iso.rb +2 -0
- data/lib/metanorma/iso/processor.rb +16 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -1
- data/spec/asciidoctor-iso/amd_spec.rb +726 -0
- data/spec/asciidoctor-iso/base_spec.rb +38 -21
- data/spec/asciidoctor-iso/blocks_spec.rb +6 -6
- data/spec/asciidoctor-iso/cleanup_spec.rb +195 -174
- data/spec/asciidoctor-iso/inline_spec.rb +2 -1
- data/spec/asciidoctor-iso/macros_spec.rb +289 -0
- data/spec/asciidoctor-iso/refs_spec.rb +8 -5
- data/spec/asciidoctor-iso/section_spec.rb +8 -8
- data/spec/assets/iso.xml +64 -1
- data/spec/isodoc/amd_spec.rb +652 -0
- data/spec/isodoc/blocks_spec.rb +112 -27
- data/spec/isodoc/i18n_spec.rb +12 -20
- data/spec/isodoc/inline_spec.rb +4 -4
- data/spec/isodoc/iso_spec.rb +1 -1
- data/spec/isodoc/metadata_spec.rb +92 -4
- data/spec/isodoc/postproc_spec.rb +21 -120
- data/spec/isodoc/ref_spec.rb +9 -9
- data/spec/isodoc/section_spec.rb +36 -13
- data/spec/isodoc/table_spec.rb +30 -30
- data/spec/isodoc/terms_spec.rb +6 -6
- data/spec/isodoc/xref_spec.rb +43 -37
- data/spec/metanorma/processor_spec.rb +2 -2
- data/spec/spec_helper.rb +11 -0
- metadata +58 -5
- data/asciidoctor-iso.gemspec.old +0 -50
@@ -35,6 +35,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
35
35
|
:docfile: test.adoc
|
36
36
|
:novalid:
|
37
37
|
:no-isobib:
|
38
|
+
:no-pdf:
|
38
39
|
INPUT
|
39
40
|
#{BLANK_HDR}
|
40
41
|
<sections/>
|
@@ -76,7 +77,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
76
77
|
:workgroup-number_2: 31
|
77
78
|
:workgroup-type_2: C1
|
78
79
|
:secretariat: SECRETARIAT
|
79
|
-
:docstage:
|
80
|
+
:docstage: 20
|
80
81
|
:docsubstage: 20
|
81
82
|
:iteration: 3
|
82
83
|
:language: en
|
@@ -87,6 +88,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
87
88
|
:title-main-fr: Titre Principal
|
88
89
|
:title-part-fr: Part du Titre
|
89
90
|
:library-ics: 1,2,3
|
91
|
+
:copyright-year: 2000
|
90
92
|
INPUT
|
91
93
|
<?xml version="1.0" encoding="UTF-8"?>
|
92
94
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
@@ -99,9 +101,10 @@ RSpec.describe Asciidoctor::ISO do
|
|
99
101
|
<title language="fr" format="text/plain" type="title-intro">Introduction Française</title>
|
100
102
|
<title language="fr" format="text/plain" type="title-main">Titre Principal</title>
|
101
103
|
<title language="fr" format="text/plain" type="title-part">Part du Titre</title>
|
102
|
-
<docidentifier type="
|
103
|
-
<docidentifier type='iso-with-lang'>ISO/
|
104
|
-
<
|
104
|
+
<docidentifier type="ISO">ISO/PreWD3 1000-1</docidentifier>
|
105
|
+
<docidentifier type='iso-with-lang'>ISO/PreWD3 1000-1(E)</docidentifier>
|
106
|
+
<docidentifier type='iso-reference'>ISO/PreWD3 1000-1:2000(E)</docidentifier>
|
107
|
+
<docnumber>1000</docnumber>
|
105
108
|
<contributor>
|
106
109
|
<role type="author"/>
|
107
110
|
<organization>
|
@@ -124,12 +127,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
124
127
|
<language>en</language>
|
125
128
|
<script>Latn</script>
|
126
129
|
<status>
|
127
|
-
<stage abbreviation="
|
130
|
+
<stage abbreviation="WD">20</stage>
|
128
131
|
<substage>20</substage>
|
129
132
|
<iteration>3</iteration>
|
130
133
|
</status>
|
131
134
|
<copyright>
|
132
|
-
<from
|
135
|
+
<from>2000</from>
|
133
136
|
<owner>
|
134
137
|
<organization>
|
135
138
|
<name>International Organization for Standardization</name>
|
@@ -160,7 +163,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
160
163
|
<structuredidentifier>
|
161
164
|
<project-number part="1">ISO 1000</project-number>
|
162
165
|
</structuredidentifier>
|
163
|
-
<stagename>
|
166
|
+
<stagename>Third working draft</stagename>
|
164
167
|
</ext>
|
165
168
|
</bibdata>
|
166
169
|
<sections/>
|
@@ -170,7 +173,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
170
173
|
|
171
174
|
|
172
175
|
it "processes complex metadata" do
|
173
|
-
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to <<~'OUTPUT'
|
176
|
+
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~'OUTPUT')
|
174
177
|
= Document title
|
175
178
|
Author
|
176
179
|
:docfile: test.adoc
|
@@ -184,12 +187,14 @@ RSpec.describe Asciidoctor::ISO do
|
|
184
187
|
:script: Grek
|
185
188
|
:publisher: IEC,IETF,ISO
|
186
189
|
:copyright-year: 2001
|
190
|
+
:doctype: technical-report
|
187
191
|
INPUT
|
188
192
|
<?xml version="1.0" encoding="UTF-8"?>
|
189
193
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
190
194
|
<bibdata type="standard">
|
191
|
-
<docidentifier type="
|
192
|
-
<docidentifier type='iso-with-lang'>ISO/IEC/IETF 1000-1-1:2001
|
195
|
+
<docidentifier type="ISO">ISO/IEC/IETF/TR 1000-1-1:2001</docidentifier>
|
196
|
+
<docidentifier type='iso-with-lang'>ISO/IEC/IETF/TR 1000-1-1:2001(X)</docidentifier>
|
197
|
+
<docidentifier type='iso-reference'>ISO/IEC/IETF/TR 1000-1-1:2001(X)</docidentifier>
|
193
198
|
<docidentifier type="iso-tc">2000</docidentifier>
|
194
199
|
<docidentifier type="iso-tc">2003</docidentifier>
|
195
200
|
<docnumber>1000</docnumber>
|
@@ -266,7 +271,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
266
271
|
</owner>
|
267
272
|
</copyright>
|
268
273
|
<ext>
|
269
|
-
<doctype>
|
274
|
+
<doctype>technical-report</doctype>
|
270
275
|
<editorialgroup>
|
271
276
|
<technical-committee/>
|
272
277
|
<subcommittee/>
|
@@ -283,7 +288,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
283
288
|
OUTPUT
|
284
289
|
end
|
285
290
|
|
286
|
-
it "defaults substage" do
|
291
|
+
it "defaults substage, defines iteration on stage 50, gives stage 50 on technical specification" do
|
287
292
|
expect(xmlpp(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true).sub(%r{<boilerplate>.*</boilerplate>}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
288
293
|
= Document title
|
289
294
|
Author
|
@@ -294,11 +299,14 @@ RSpec.describe Asciidoctor::ISO do
|
|
294
299
|
:docnumber: 1000
|
295
300
|
:docstage: 50
|
296
301
|
:language: fr
|
302
|
+
:doctype: technical-specification
|
303
|
+
:iteration: 2
|
297
304
|
INPUT
|
298
305
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
299
306
|
<bibdata type="standard">
|
300
|
-
<docidentifier type="
|
301
|
-
<docidentifier type='iso-with-lang'>ISO/
|
307
|
+
<docidentifier type="ISO">ISO/DTS 1000.2</docidentifier>
|
308
|
+
<docidentifier type='iso-with-lang'>ISO/DTS 1000.2(F)</docidentifier>
|
309
|
+
<docidentifier type='iso-reference'>ISO/DTS 1000.2(F)</docidentifier>
|
302
310
|
<docnumber>1000</docnumber>
|
303
311
|
<contributor>
|
304
312
|
<role type="author"/>
|
@@ -318,8 +326,9 @@ RSpec.describe Asciidoctor::ISO do
|
|
318
326
|
<language>fr</language>
|
319
327
|
<script>Latn</script>
|
320
328
|
<status>
|
321
|
-
<stage abbreviation="
|
329
|
+
<stage abbreviation="D">50</stage>
|
322
330
|
<substage>00</substage>
|
331
|
+
<iteration>2</iteration>
|
323
332
|
</status>
|
324
333
|
<copyright>
|
325
334
|
<from>#{Date.today.year}</from>
|
@@ -331,7 +340,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
331
340
|
</owner>
|
332
341
|
</copyright>
|
333
342
|
<ext>
|
334
|
-
<doctype>
|
343
|
+
<doctype>technical-specification</doctype>
|
335
344
|
<editorialgroup>
|
336
345
|
<technical-committee/>
|
337
346
|
<subcommittee/>
|
@@ -340,7 +349,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
340
349
|
<structuredidentifier>
|
341
350
|
<project-number>ISO 1000</project-number>
|
342
351
|
</structuredidentifier>
|
343
|
-
<stagename>Final draft
|
352
|
+
<stagename>Final draft</stagename>
|
344
353
|
</ext>
|
345
354
|
</bibdata>
|
346
355
|
<sections/>
|
@@ -361,8 +370,9 @@ OUTPUT
|
|
361
370
|
INPUT
|
362
371
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
363
372
|
<bibdata type="standard">
|
364
|
-
<docidentifier type="
|
365
|
-
<docidentifier type='iso-with-lang'>ISO 1000
|
373
|
+
<docidentifier type="ISO">ISO 1000</docidentifier>
|
374
|
+
<docidentifier type='iso-with-lang'>ISO 1000(E)</docidentifier>
|
375
|
+
<docidentifier type='iso-reference'>ISO 1000(E)</docidentifier>
|
366
376
|
<docnumber>1000</docnumber>
|
367
377
|
<contributor>
|
368
378
|
<role type="author"/>
|
@@ -426,8 +436,9 @@ OUTPUT
|
|
426
436
|
INPUT
|
427
437
|
<iso-standard xmlns="https://www.metanorma.org/ns/iso">
|
428
438
|
<bibdata type="standard">
|
429
|
-
<docidentifier type="
|
430
|
-
<docidentifier type='iso-with-lang'>ISO 1000
|
439
|
+
<docidentifier type="ISO">ISO 1000</docidentifier>
|
440
|
+
<docidentifier type='iso-with-lang'>ISO 1000(E)</docidentifier>
|
441
|
+
<docidentifier type='iso-reference'>ISO 1000(E)</docidentifier>
|
431
442
|
<docnumber>1000</docnumber>
|
432
443
|
<contributor>
|
433
444
|
<role type="author"/>
|
@@ -486,6 +497,7 @@ OUTPUT
|
|
486
497
|
:docfile: test.adoc
|
487
498
|
:novalid:
|
488
499
|
:no-isobib:
|
500
|
+
:no-pdf:
|
489
501
|
INPUT
|
490
502
|
html = File.read("test.html", encoding: "utf-8")
|
491
503
|
expect(html).to match(%r{<script>})
|
@@ -499,6 +511,7 @@ OUTPUT
|
|
499
511
|
:docfile: test.adoc
|
500
512
|
:novalid:
|
501
513
|
:no-isobib:
|
514
|
+
:no-pdf:
|
502
515
|
INPUT
|
503
516
|
html = File.read("test.html", encoding: "utf-8")
|
504
517
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
|
@@ -514,6 +527,7 @@ OUTPUT
|
|
514
527
|
:docfile: test.adoc
|
515
528
|
:novalid:
|
516
529
|
:no-isobib:
|
530
|
+
:no-pdf:
|
517
531
|
INPUT
|
518
532
|
html = File.read("test_alt.html", encoding: "utf-8")
|
519
533
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
|
@@ -530,6 +544,7 @@ OUTPUT
|
|
530
544
|
:novalid:
|
531
545
|
:no-isobib:
|
532
546
|
:script: Hans
|
547
|
+
:no-pdf:
|
533
548
|
INPUT
|
534
549
|
html = File.read("test.html", encoding: "utf-8")
|
535
550
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
|
@@ -549,6 +564,7 @@ OUTPUT
|
|
549
564
|
:body-font: Zapf Chancery
|
550
565
|
:header-font: Comic Sans
|
551
566
|
:monospace-font: Andale Mono
|
567
|
+
:no-pdf:
|
552
568
|
INPUT
|
553
569
|
html = File.read("test.html", encoding: "utf-8")
|
554
570
|
expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
|
@@ -565,6 +581,7 @@ OUTPUT
|
|
565
581
|
:docfile: test.adoc
|
566
582
|
:novalid:
|
567
583
|
:no-isobib:
|
584
|
+
:no-pdf:
|
568
585
|
INPUT
|
569
586
|
word = File.read("test.doc", encoding: "utf-8")
|
570
587
|
html = File.read("test.html", encoding: "utf-8")
|
@@ -25,8 +25,8 @@ RSpec.describe Asciidoctor::ISO do
|
|
25
25
|
#{ASCIIDOC_BLANK_HDR}
|
26
26
|
[stem]
|
27
27
|
++++
|
28
|
-
r = 1 %
|
29
|
-
r = 1 %
|
28
|
+
r = 1 %
|
29
|
+
r = 1 %
|
30
30
|
++++
|
31
31
|
|
32
32
|
[stem]
|
@@ -113,7 +113,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
113
113
|
<terms id="_" obligation="normative">
|
114
114
|
<title>Terms and definitions</title>
|
115
115
|
#{TERM_BOILERPLATE}
|
116
|
-
<term id="
|
116
|
+
<term id="term-term1">
|
117
117
|
<preferred>Term1</preferred>
|
118
118
|
<termnote id="_">
|
119
119
|
<p id="_">This is a note</p>
|
@@ -223,7 +223,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
223
223
|
<terms id="_" obligation="normative">
|
224
224
|
<title>Terms and definitions</title>
|
225
225
|
#{TERM_BOILERPLATE}
|
226
|
-
<term id="
|
226
|
+
<term id="term-term1">
|
227
227
|
<preferred>Term1</preferred>
|
228
228
|
<termexample id="_">
|
229
229
|
<p id="_">This is an example</p>
|
@@ -428,7 +428,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
428
428
|
<terms id="_" obligation="normative">
|
429
429
|
<title>Terms and definitions</title>
|
430
430
|
#{TERM_BOILERPLATE}
|
431
|
-
<term id="
|
431
|
+
<term id="term-term1">
|
432
432
|
<preferred>Term1</preferred>
|
433
433
|
<termsource status="identical">
|
434
434
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
@@ -459,7 +459,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
459
459
|
<terms id="_" obligation="normative">
|
460
460
|
<title>Terms and definitions</title>
|
461
461
|
#{TERM_BOILERPLATE}
|
462
|
-
<term id="
|
462
|
+
<term id="term-term1">
|
463
463
|
<preferred>Term1</preferred>
|
464
464
|
<termsource status="modified">
|
465
465
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
@@ -32,7 +32,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
32
32
|
<terms id="_" obligation="normative">
|
33
33
|
<title>Terms and definitions</title>
|
34
34
|
#{TERM_BOILERPLATE}
|
35
|
-
<term id="
|
35
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>91</mn></msub></math></stem></admitted>
|
36
36
|
<definition><p id="_">Time</p></definition></term>
|
37
37
|
</terms>
|
38
38
|
</sections>
|
@@ -54,7 +54,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
54
54
|
<terms id="_" obligation="normative">
|
55
55
|
<title>Terms and definitions</title>
|
56
56
|
#{TERM_BOILERPLATE}
|
57
|
-
<term id="
|
57
|
+
<term id="term-tempus">
|
58
58
|
<preferred>Tempus</preferred>
|
59
59
|
<domain>relativity</domain><definition><p id="_"> Time</p></definition>
|
60
60
|
</term>
|
@@ -90,7 +90,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
90
90
|
<terms id="_" obligation="normative">
|
91
91
|
<title>Terms and definitions</title>
|
92
92
|
#{TERM_BOILERPLATE}
|
93
|
-
<term id="
|
93
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mn>90</mn></msub></math></stem></preferred><definition><formula id="_">
|
94
94
|
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mi>t</mi><mi>A</mi></msub></math></stem>
|
95
95
|
</formula><p id="_">This paragraph is extraneous</p></definition>
|
96
96
|
</term>
|
@@ -118,7 +118,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
118
118
|
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
119
119
|
|
120
120
|
#{TERM_BOILERPLATE}
|
121
|
-
<term id="
|
121
|
+
<term id="term-time">
|
122
122
|
<preferred>Time</preferred>
|
123
123
|
<definition><p id="_">This paragraph is extraneous</p></definition>
|
124
124
|
</term></terms>
|
@@ -189,12 +189,13 @@ RSpec.describe Asciidoctor::ISO do
|
|
189
189
|
<eref type="inline" bibitemid="iso216" citeas="ISO 216:2001"/>
|
190
190
|
</p>
|
191
191
|
</foreword></preface><sections>
|
192
|
-
</sections><bibliography><references id="_" obligation="informative">
|
192
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
193
193
|
<title>Normative References</title>
|
194
194
|
<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>
|
195
195
|
<bibitem id="iso216" type="standard">
|
196
196
|
<title format="text/plain">Reference</title>
|
197
197
|
<docidentifier>ISO 216:2001</docidentifier>
|
198
|
+
<docnumber>216</docnumber>
|
198
199
|
<date type="published">
|
199
200
|
<on>2001</on>
|
200
201
|
</date>
|
@@ -231,12 +232,13 @@ RSpec.describe Asciidoctor::ISO do
|
|
231
232
|
</localityStack>the reference</eref>
|
232
233
|
</p>
|
233
234
|
</foreword></preface><sections>
|
234
|
-
</sections><bibliography><references id="_" obligation="informative">
|
235
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
235
236
|
<title>Normative References</title>
|
236
237
|
<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>
|
237
238
|
<bibitem id="iso216" type="standard">
|
238
239
|
<title format="text/plain">Reference</title>
|
239
240
|
<docidentifier>ISO 216</docidentifier>
|
241
|
+
<docnumber>216</docnumber>
|
240
242
|
<contributor>
|
241
243
|
<role type="publisher"/>
|
242
244
|
<organization>
|
@@ -269,11 +271,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
269
271
|
<eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
|
270
272
|
</p>
|
271
273
|
</foreword></preface><sections>
|
272
|
-
</sections><bibliography><references id="_" obligation="informative">
|
274
|
+
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
273
275
|
<title>Bibliography</title>
|
274
276
|
<bibitem id="iso216" type="standard">
|
275
277
|
<title format="text/plain">Reference</title>
|
276
278
|
<docidentifier>ISO 216</docidentifier>
|
279
|
+
<docnumber>216</docnumber>
|
277
280
|
<contributor>
|
278
281
|
<role type="publisher"/>
|
279
282
|
<organization>
|
@@ -302,7 +305,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
302
305
|
<terms id="_" obligation="normative">
|
303
306
|
<title>Terms and definitions</title>
|
304
307
|
#{TERM_BOILERPLATE}
|
305
|
-
<term id="
|
308
|
+
<term id="term-term1">
|
306
309
|
<preferred>Term1</preferred>
|
307
310
|
<termsource status="identical">
|
308
311
|
<origin bibitemid="ISO2191" type="inline" citeas="">
|
@@ -330,11 +333,12 @@ RSpec.describe Asciidoctor::ISO do
|
|
330
333
|
INPUT
|
331
334
|
#{BLANK_HDR}
|
332
335
|
<sections></sections>
|
333
|
-
<bibliography><references id="_" obligation="informative"><title>Normative References</title>
|
336
|
+
<bibliography><references id="_" obligation="informative" normative="true"><title>Normative References</title>
|
334
337
|
<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>
|
335
338
|
<bibitem id="iso216" type="standard">
|
336
339
|
<title format="text/plain">Reference</title>
|
337
340
|
<docidentifier>ISO 216</docidentifier>
|
341
|
+
<docnumber>216</docnumber>
|
338
342
|
<contributor>
|
339
343
|
<role type="publisher"/>
|
340
344
|
<organization>
|
@@ -633,12 +637,13 @@ RSpec.describe Asciidoctor::ISO do
|
|
633
637
|
<p id="_">Footnote2</p>
|
634
638
|
</fn>
|
635
639
|
</p>
|
636
|
-
</clause></sections><bibliography><references id="_" obligation="informative">
|
640
|
+
</clause></sections><bibliography><references id="_" obligation="informative" normative="true">
|
637
641
|
<title>Normative References</title>
|
638
642
|
<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>
|
639
643
|
<bibitem id="iso123" type="standard">
|
640
644
|
<title format="text/plain">Standard</title>
|
641
645
|
<docidentifier>ISO 123:—</docidentifier>
|
646
|
+
<docnumber>123</docnumber>
|
642
647
|
<date type="published">
|
643
648
|
<on>–</on>
|
644
649
|
</date>
|
@@ -649,7 +654,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
649
654
|
<abbreviation>ISO</abbreviation>
|
650
655
|
</organization>
|
651
656
|
</contributor>
|
652
|
-
<note format="text/plain"
|
657
|
+
<note format="text/plain" type="ISO DATE">The standard is in press</note>
|
653
658
|
</bibitem>
|
654
659
|
</references>
|
655
660
|
</bibliography>
|
@@ -748,7 +753,7 @@ RSpec.describe Asciidoctor::ISO do
|
|
748
753
|
it "reorders references in bibliography, and renumbers citations accordingly" do
|
749
754
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
750
755
|
#{ASCIIDOC_BLANK_HDR}
|
751
|
-
|
756
|
+
|
752
757
|
== Clause 1
|
753
758
|
<<ref1>>
|
754
759
|
<<ref1a>>
|
@@ -789,36 +794,46 @@ RSpec.describe Asciidoctor::ISO do
|
|
789
794
|
* [[[ref17,(A)]]], _Standard 30_
|
790
795
|
INPUT
|
791
796
|
#{BLANK_HDR}
|
792
|
-
<sections
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
<eref type='inline' bibitemid='
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
<
|
812
|
-
<
|
813
|
-
|
814
|
-
<
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
797
|
+
<sections>
|
798
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
799
|
+
<title>Clause 1</title>
|
800
|
+
<p id='_'>
|
801
|
+
<eref type='inline' bibitemid='ref1' citeas='ISO 123'/>
|
802
|
+
<eref type='inline' bibitemid='ref1a' citeas='ISO 123-100'/>
|
803
|
+
<eref type='inline' bibitemid='ref1b' citeas='ISO/TS 123-1'/>
|
804
|
+
<eref type='inline' bibitemid='ref2' citeas='ISO/IEC 123'/>
|
805
|
+
<eref type='inline' bibitemid='ref3' citeas='IEC 123'/>
|
806
|
+
<eref type='inline' bibitemid='ref4' citeas='GB 123'/>
|
807
|
+
<eref type='inline' bibitemid='ref5' citeas='[6]'/>
|
808
|
+
<eref type='inline' bibitemid='ref6' citeas='[B]'/>
|
809
|
+
<eref type='inline' bibitemid='ref7' citeas='[A]'/>
|
810
|
+
<xref target='ref8'/>
|
811
|
+
<xref target='ref9'/>
|
812
|
+
<eref type='inline' bibitemid='ref10' citeas='ISO/IEC 123'/>
|
813
|
+
</p>
|
814
|
+
</clause>
|
815
|
+
</sections>
|
816
|
+
<bibliography>
|
817
|
+
<clause id='_' obligation='informative'>
|
818
|
+
<title>Bibliography</title>
|
819
|
+
<references id='_' obligation='informative' normative="false">
|
820
|
+
<title>Clause 1</title>
|
821
|
+
<bibitem id='ref1' type='standard'>
|
822
|
+
<title format='text/plain'>Standard ISO 123</title>
|
823
|
+
<docidentifier>ISO 123</docidentifier>
|
824
|
+
<docnumber>123</docnumber>
|
825
|
+
<contributor>
|
826
|
+
<role type='publisher'/>
|
827
|
+
<organization>
|
828
|
+
<name>International Organization for Standardization</name>
|
829
|
+
<abbreviation>ISO</abbreviation>
|
830
|
+
</organization>
|
831
|
+
</contributor>
|
832
|
+
</bibitem>
|
833
|
+
<bibitem id='ref2' type='standard'>
|
820
834
|
<title format='text/plain'>Standard ISO/IEC 123</title>
|
821
835
|
<docidentifier>ISO/IEC 123</docidentifier>
|
836
|
+
<docnumber>123</docnumber>
|
822
837
|
<contributor>
|
823
838
|
<role type='publisher'/>
|
824
839
|
<organization>
|
@@ -834,140 +849,146 @@ RSpec.describe Asciidoctor::ISO do
|
|
834
849
|
</organization>
|
835
850
|
</contributor>
|
836
851
|
</bibitem>
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
</
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
</
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
852
|
+
<bibitem id='ref1b' type='standard'>
|
853
|
+
<title format='text/plain'>Standard ISO 123</title>
|
854
|
+
<docidentifier>ISO/TS 123-1</docidentifier>
|
855
|
+
<docnumber>123-1</docnumber>
|
856
|
+
<contributor>
|
857
|
+
<role type='publisher'/>
|
858
|
+
<organization>
|
859
|
+
<name>International Organization for Standardization</name>
|
860
|
+
<abbreviation>ISO</abbreviation>
|
861
|
+
</organization>
|
862
|
+
</contributor>
|
863
|
+
<contributor>
|
864
|
+
<role type='publisher'/>
|
865
|
+
<organization>
|
866
|
+
<name>TS</name>
|
867
|
+
</organization>
|
868
|
+
</contributor>
|
869
|
+
</bibitem>
|
870
|
+
<bibitem id='ref1a' type='standard'>
|
871
|
+
<title format='text/plain'>Standard ISO 123</title>
|
872
|
+
<docidentifier>ISO 123-100</docidentifier>
|
873
|
+
<docnumber>123-100</docnumber>
|
874
|
+
<contributor>
|
875
|
+
<role type='publisher'/>
|
876
|
+
<organization>
|
877
|
+
<name>International Organization for Standardization</name>
|
878
|
+
<abbreviation>ISO</abbreviation>
|
879
|
+
</organization>
|
880
|
+
</contributor>
|
881
|
+
</bibitem>
|
882
|
+
<bibitem id='ref3' type='standard'>
|
883
|
+
<title format='text/plain'>Standard IEC 123</title>
|
884
|
+
<docidentifier>IEC 123</docidentifier>
|
885
|
+
<docnumber>123</docnumber>
|
886
|
+
<contributor>
|
887
|
+
<role type='publisher'/>
|
888
|
+
<organization>
|
889
|
+
<name>International Electrotechnical Commission</name>
|
890
|
+
<abbreviation>IEC</abbreviation>
|
891
|
+
</organization>
|
892
|
+
</contributor>
|
893
|
+
</bibitem>
|
894
|
+
<bibitem id='ref5'>
|
895
|
+
<formattedref format='application/x-isodoc+xml'>
|
896
|
+
<em>Standard 10</em>
|
897
|
+
</formattedref>
|
898
|
+
<docidentifier type='metanorma'>[6]</docidentifier>
|
899
|
+
</bibitem>
|
900
|
+
<bibitem id='ref6'>
|
901
|
+
<formattedref format='application/x-isodoc+xml'>
|
902
|
+
<em>Standard 20</em>
|
903
|
+
</formattedref>
|
904
|
+
<docidentifier type='metanorma'>[B]</docidentifier>
|
905
|
+
</bibitem>
|
906
|
+
<bibitem id='ref7'>
|
907
|
+
<formattedref format='application/x-isodoc+xml'>
|
908
|
+
<em>Standard 30</em>
|
909
|
+
</formattedref>
|
910
|
+
<docidentifier type='metanorma'>[A]</docidentifier>
|
911
|
+
</bibitem>
|
912
|
+
<bibitem id='ref4'>
|
913
|
+
<formattedref format='application/x-isodoc+xml'>
|
914
|
+
<em>Standard GB 123</em>
|
915
|
+
</formattedref>
|
916
|
+
<docidentifier>GB 123</docidentifier>
|
917
|
+
<docnumber>123</docnumber>
|
918
|
+
</bibitem>
|
919
|
+
</references>
|
920
|
+
<references id='_' obligation='informative' normative="false">
|
921
|
+
<bibitem id='ref11' type='standard'>
|
922
|
+
<title format='text/plain'>Standard ISO 123</title>
|
923
|
+
<docidentifier>ISO 123</docidentifier>
|
924
|
+
<docnumber>123</docnumber>
|
925
|
+
<contributor>
|
926
|
+
<role type='publisher'/>
|
927
|
+
<organization>
|
928
|
+
<name>International Organization for Standardization</name>
|
929
|
+
<abbreviation>ISO</abbreviation>
|
930
|
+
</organization>
|
931
|
+
</contributor>
|
932
|
+
</bibitem>
|
933
|
+
<bibitem id='ref10' type='standard'>
|
934
|
+
<title format='text/plain'>Standard ISO/IEC 123</title>
|
935
|
+
<docidentifier>ISO/IEC 123</docidentifier>
|
936
|
+
<docnumber>123</docnumber>
|
937
|
+
<contributor>
|
938
|
+
<role type='publisher'/>
|
939
|
+
<organization>
|
940
|
+
<name>International Organization for Standardization</name>
|
941
|
+
<abbreviation>ISO</abbreviation>
|
942
|
+
</organization>
|
943
|
+
</contributor>
|
944
|
+
<contributor>
|
945
|
+
<role type='publisher'/>
|
946
|
+
<organization>
|
947
|
+
<name>International Electrotechnical Commission</name>
|
948
|
+
<abbreviation>IEC</abbreviation>
|
949
|
+
</organization>
|
950
|
+
</contributor>
|
951
|
+
</bibitem>
|
952
|
+
<bibitem id='ref13' type='standard'>
|
953
|
+
<title format='text/plain'>Standard IEC 123</title>
|
954
|
+
<docidentifier>IEC 123</docidentifier>
|
955
|
+
<docnumber>123</docnumber>
|
956
|
+
<contributor>
|
957
|
+
<role type='publisher'/>
|
958
|
+
<organization>
|
959
|
+
<name>International Electrotechnical Commission</name>
|
960
|
+
<abbreviation>IEC</abbreviation>
|
961
|
+
</organization>
|
962
|
+
</contributor>
|
963
|
+
</bibitem>
|
964
|
+
<bibitem id='ref15'>
|
965
|
+
<formattedref format='application/x-isodoc+xml'>
|
966
|
+
<em>Standard 10</em>
|
967
|
+
</formattedref>
|
968
|
+
<docidentifier type='metanorma'>[13]</docidentifier>
|
969
|
+
</bibitem>
|
970
|
+
<bibitem id='ref16'>
|
971
|
+
<formattedref format='application/x-isodoc+xml'>
|
972
|
+
<em>Standard 20</em>
|
973
|
+
</formattedref>
|
974
|
+
<docidentifier type='metanorma'>[B]</docidentifier>
|
975
|
+
</bibitem>
|
976
|
+
<bibitem id='ref17'>
|
977
|
+
<formattedref format='application/x-isodoc+xml'>
|
978
|
+
<em>Standard 30</em>
|
979
|
+
</formattedref>
|
980
|
+
<docidentifier type='metanorma'>[A]</docidentifier>
|
981
|
+
</bibitem>
|
982
|
+
<bibitem id='ref14'>
|
983
|
+
<formattedref format='application/x-isodoc+xml'>
|
984
|
+
<em>Standard GB 123</em>
|
985
|
+
</formattedref>
|
986
|
+
<docidentifier>GB 123</docidentifier>
|
987
|
+
<docnumber>123</docnumber>
|
988
|
+
</bibitem>
|
989
|
+
</references>
|
990
|
+
</clause>
|
991
|
+
</bibliography>
|
971
992
|
</iso-standard>
|
972
993
|
OUTPUT
|
973
994
|
end
|