metanorma-iso 2.1.1 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/lists.rb +145 -10
- data/lib/isodoc/iso/base_convert.rb +10 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +173 -257
- data/lib/isodoc/iso/html/isodoc-dis.scss +173 -249
- data/lib/isodoc/iso/html/isodoc.css +38 -13
- data/lib/isodoc/iso/html/isodoc.scss +38 -12
- data/lib/isodoc/iso/html/style-human.css +14 -1
- data/lib/isodoc/iso/html/style-human.scss +10 -1
- data/lib/isodoc/iso/html/style-iso.css +35 -23
- data/lib/isodoc/iso/html/style-iso.scss +31 -23
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +1 -6
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +24 -13
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -2
- data/lib/isodoc/iso/html_convert.rb +5 -0
- data/lib/isodoc/iso/i18n-en.yaml +32 -4
- data/lib/isodoc/iso/i18n-fr.yaml +29 -3
- data/lib/isodoc/iso/i18n-ru.yaml +32 -4
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +32 -3
- data/lib/isodoc/iso/i18n.rb +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +750 -307
- data/lib/isodoc/iso/iso.international-standard.xsl +750 -307
- data/lib/isodoc/iso/metadata.rb +63 -63
- data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +15 -4
- data/lib/isodoc/iso/presentation_xref.rb +8 -2
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_cleanup.rb +3 -0
- data/lib/isodoc/iso/word_convert.rb +6 -3
- data/lib/isodoc/iso/word_dis_cleanup.rb +243 -0
- data/lib/isodoc/iso/word_dis_convert.rb +47 -108
- data/lib/isodoc/iso/xref.rb +34 -6
- data/lib/metanorma/iso/base.rb +14 -1
- data/lib/metanorma/iso/biblio.rng +134 -39
- data/lib/metanorma/iso/boilerplate-fr.xml +3 -0
- data/lib/metanorma/iso/boilerplate-ru.xml +3 -0
- data/lib/metanorma/iso/boilerplate.xml +3 -0
- data/lib/metanorma/iso/cleanup.rb +53 -13
- data/lib/metanorma/iso/front.rb +38 -6
- data/lib/metanorma/iso/front_id.rb +2 -0
- data/lib/metanorma/iso/isodoc.rng +32 -0
- data/lib/metanorma/iso/isostandard.rng +32 -12
- data/lib/metanorma/iso/validate_section.rb +0 -12
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/amd_spec.rb +4 -30
- data/spec/isodoc/blocks_spec.rb +499 -2
- data/spec/isodoc/i18n_spec.rb +145 -80
- data/spec/isodoc/iso_spec.rb +50 -169
- data/spec/isodoc/metadata_spec.rb +223 -83
- data/spec/isodoc/postproc_spec.rb +41 -5
- data/spec/isodoc/section_spec.rb +9 -9
- data/spec/isodoc/word_dis_spec.rb +1332 -146
- data/spec/isodoc/xref_spec.rb +87 -13
- data/spec/metanorma/amd_spec.rb +39 -23
- data/spec/metanorma/base_spec.rb +174 -44
- data/spec/metanorma/blocks_spec.rb +21 -0
- data/spec/metanorma/cleanup_spec.rb +196 -196
- data/spec/metanorma/lists_spec.rb +2 -2
- data/spec/metanorma/section_spec.rb +2 -2
- data/spec/metanorma/validate_spec.rb +8 -19
- data/spec/spec_helper.rb +10 -7
- data/spec/vcr_cassettes/withdrawn_iso.yml +30 -30
- metadata +6 -8
- data/docs/asciiiso-syntax.adoc +0 -307
- data/docs/guidance.adoc +0 -487
- data/docs/navigation.adoc +0 -23
- data/docs/quickstart.adoc +0 -179
- data/lib/isodoc/iso/presentation_inline.rb +0 -90
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -153,7 +153,7 @@ RSpec.describe IsoDoc do
|
|
153
153
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
154
154
|
end
|
155
155
|
|
156
|
-
it "cross-references figures
|
156
|
+
it "cross-references figures" do
|
157
157
|
input = <<~INPUT
|
158
158
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
159
159
|
<preface>
|
@@ -299,7 +299,7 @@ RSpec.describe IsoDoc do
|
|
299
299
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
300
300
|
end
|
301
301
|
|
302
|
-
it "cross-references subfigures
|
302
|
+
it "cross-references subfigures" do
|
303
303
|
input = <<~INPUT
|
304
304
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
305
305
|
<preface>
|
@@ -1501,12 +1501,12 @@ RSpec.describe IsoDoc do
|
|
1501
1501
|
<preface>
|
1502
1502
|
<foreword displayorder='1'>
|
1503
1503
|
<p>
|
1504
|
-
<xref target='N'>
|
1505
|
-
<xref target='note1'>3.1 List 1 a)</xref>
|
1506
|
-
<xref target='note2'>3.1 List 2 a)</xref>
|
1504
|
+
<xref target='N'>1 a)</xref>
|
1505
|
+
<xref target='note1'>3.1, List 1 a)</xref>
|
1506
|
+
<xref target='note2'>3.1, List 2 a)</xref>
|
1507
1507
|
<xref target='AN'>A.1 a)</xref>
|
1508
|
-
<xref target='Anote1'>A.2 List 1 a)</xref>
|
1509
|
-
<xref target='Anote2'>A.2 List 2 a)</xref>
|
1508
|
+
<xref target='Anote1'>A.2, List 1 a)</xref>
|
1509
|
+
<xref target='Anote2'>A.2, List 2 a)</xref>
|
1510
1510
|
</p>
|
1511
1511
|
</foreword>
|
1512
1512
|
</preface>
|
@@ -1621,12 +1621,12 @@ RSpec.describe IsoDoc do
|
|
1621
1621
|
<preface>
|
1622
1622
|
<foreword displayorder='1'>
|
1623
1623
|
<p>
|
1624
|
-
<xref target='N'>
|
1625
|
-
<xref target='note1'>
|
1626
|
-
<xref target='note2'>
|
1627
|
-
<xref target='AN'>
|
1628
|
-
<xref target='Anote1'>
|
1629
|
-
<xref target='Anote2'>
|
1624
|
+
<xref target='N'>1 a)</xref>
|
1625
|
+
<xref target='note1'>1 a) 1)</xref>
|
1626
|
+
<xref target='note2'>1 a) 1) i)</xref>
|
1627
|
+
<xref target='AN'>1 a) 1) i) A)</xref>
|
1628
|
+
<xref target='Anote1'>1 a) 1) i) A) I)</xref>
|
1629
|
+
<xref target='Anote2'>1 a) 1) i) A) I) a)</xref>
|
1630
1630
|
</p>
|
1631
1631
|
</foreword>
|
1632
1632
|
</preface>
|
@@ -1670,4 +1670,78 @@ RSpec.describe IsoDoc do
|
|
1670
1670
|
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1671
1671
|
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1672
1672
|
end
|
1673
|
+
|
1674
|
+
it "conflates cross-references to a split list" do
|
1675
|
+
input = <<~INPUT
|
1676
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1677
|
+
<preface>
|
1678
|
+
<foreword>
|
1679
|
+
<p><xref target="Na"/></p>
|
1680
|
+
</foreword>
|
1681
|
+
</preface>
|
1682
|
+
<sections>
|
1683
|
+
<clause id="scope" type="scope">
|
1684
|
+
<title>Scope</title>
|
1685
|
+
<ol id="N1">
|
1686
|
+
<li id="Na"><p>A</p></li>
|
1687
|
+
<li id="Na1"><p>A</p></li>
|
1688
|
+
</ol>
|
1689
|
+
<ol id="N2" start="3">
|
1690
|
+
<li id="Nb"><p>A</p></li>
|
1691
|
+
<li id="Nb1"><p>A</p></li>
|
1692
|
+
</ol>
|
1693
|
+
<ol id="N3" start="5">
|
1694
|
+
<li id="Nc"><p>A</p></li>
|
1695
|
+
<li id="Nc1"><p>A</p></li>
|
1696
|
+
</ol>
|
1697
|
+
</clause>
|
1698
|
+
</sections>
|
1699
|
+
</iso-standard>
|
1700
|
+
INPUT
|
1701
|
+
output = <<~OUTPUT
|
1702
|
+
<foreword displayorder='1'>
|
1703
|
+
<p><xref target='Na'>1 a)</xref></p>
|
1704
|
+
</foreword>
|
1705
|
+
OUTPUT
|
1706
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1707
|
+
.convert("test", input, true))
|
1708
|
+
.at("//xmlns:foreword").to_xml))
|
1709
|
+
.to be_equivalent_to xmlpp(output)
|
1710
|
+
|
1711
|
+
input = <<~INPUT
|
1712
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1713
|
+
<preface>
|
1714
|
+
<foreword>
|
1715
|
+
<p><xref target="Na"/></p>
|
1716
|
+
</foreword>
|
1717
|
+
</preface>
|
1718
|
+
<sections>
|
1719
|
+
<clause id="scope" type="scope">
|
1720
|
+
<title>Scope</title>
|
1721
|
+
<ol id="N1">
|
1722
|
+
<li id="Na"><p>A</p></li>
|
1723
|
+
<li id="Na1"><p>A</p></li>
|
1724
|
+
</ol>
|
1725
|
+
<ol id="N2" start="3">
|
1726
|
+
<li id="Nb"><p>A</p></li>
|
1727
|
+
<li id="Nb1"><p>A</p></li>
|
1728
|
+
</ol>
|
1729
|
+
<ol id="N3" start="6">
|
1730
|
+
<li id="Nc"><p>A</p></li>
|
1731
|
+
<li id="Nc1"><p>A</p></li>
|
1732
|
+
</ol>
|
1733
|
+
</clause>
|
1734
|
+
</sections>
|
1735
|
+
</iso-standard>
|
1736
|
+
INPUT
|
1737
|
+
output = <<~OUTPUT
|
1738
|
+
<foreword displayorder='1'>
|
1739
|
+
<p><xref target='Na'>Clause 1, List 1 a)</xref></p>
|
1740
|
+
</foreword>
|
1741
|
+
OUTPUT
|
1742
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1743
|
+
.convert("test", input, true))
|
1744
|
+
.at("//xmlns:foreword").to_xml))
|
1745
|
+
.to be_equivalent_to xmlpp(output)
|
1746
|
+
end
|
1673
1747
|
end
|
data/spec/metanorma/amd_spec.rb
CHANGED
@@ -55,7 +55,7 @@ RSpec.describe Metanorma::ISO do
|
|
55
55
|
=== Bibliography Subsection
|
56
56
|
INPUT
|
57
57
|
output = <<~OUTPUT
|
58
|
-
#{BLANK_HDR.sub(%r{<doctype>
|
58
|
+
#{BLANK_HDR.sub(%r{<doctype>standard</doctype>}, '<doctype>amendment</doctype>')}
|
59
59
|
<sections>
|
60
60
|
<clause id="_" obligation="normative">
|
61
61
|
<title>Foreword</title>
|
@@ -255,6 +255,7 @@ RSpec.describe Metanorma::ISO do
|
|
255
255
|
<ext>
|
256
256
|
<doctype>amendment</doctype>
|
257
257
|
<editorialgroup>
|
258
|
+
<agency>ISO</agency>
|
258
259
|
<technical-committee number="1" type="A">TC</technical-committee>
|
259
260
|
<technical-committee number="11" type="A1">TC1</technical-committee>
|
260
261
|
<subcommittee number="2" type="B">SC</subcommittee>
|
@@ -263,6 +264,15 @@ RSpec.describe Metanorma::ISO do
|
|
263
264
|
<workgroup number="31" type="C1">WG1</workgroup>
|
264
265
|
<secretariat>SECRETARIAT</secretariat>
|
265
266
|
</editorialgroup>
|
267
|
+
<approvalgroup>
|
268
|
+
<agency>ISO</agency>
|
269
|
+
<technical-committee number="1" type="A">TC</technical-committee>
|
270
|
+
<technical-committee number="11" type="A1">TC1</technical-committee>
|
271
|
+
<subcommittee number="2" type="B">SC</subcommittee>
|
272
|
+
<subcommittee number="21" type="B1">SC1</subcommittee>
|
273
|
+
<workgroup number="3" type="C">WG</workgroup>
|
274
|
+
<workgroup number="31" type="C1">WG1</workgroup>
|
275
|
+
</approvalgroup>
|
266
276
|
<ics>
|
267
277
|
<code>1</code>
|
268
278
|
</ics>
|
@@ -341,10 +351,11 @@ RSpec.describe Metanorma::ISO do
|
|
341
351
|
<ext>
|
342
352
|
<doctype>amendment</doctype>
|
343
353
|
<editorialgroup>
|
344
|
-
|
345
|
-
<subcommittee/>
|
346
|
-
<workgroup/>
|
354
|
+
<agency>ISO</agency>
|
347
355
|
</editorialgroup>
|
356
|
+
<approvalgroup>
|
357
|
+
<agency>ISO</agency>
|
358
|
+
</approvalgroup>
|
348
359
|
<structuredidentifier>
|
349
360
|
<project-number amendment="1" part="1">17301</project-number>
|
350
361
|
</structuredidentifier>
|
@@ -413,10 +424,11 @@ RSpec.describe Metanorma::ISO do
|
|
413
424
|
<ext>
|
414
425
|
<doctype>amendment</doctype>
|
415
426
|
<editorialgroup>
|
416
|
-
|
417
|
-
<subcommittee/>
|
418
|
-
<workgroup/>
|
427
|
+
<agency>ISO</agency>
|
419
428
|
</editorialgroup>
|
429
|
+
<approvalgroup>
|
430
|
+
<agency>ISO</agency>
|
431
|
+
</approvalgroup>
|
420
432
|
<structuredidentifier>
|
421
433
|
<project-number amendment="1" part="1">17301</project-number>
|
422
434
|
</structuredidentifier>
|
@@ -483,11 +495,12 @@ RSpec.describe Metanorma::ISO do
|
|
483
495
|
</copyright>
|
484
496
|
<ext>
|
485
497
|
<doctype>amendment</doctype>
|
486
|
-
|
487
|
-
|
488
|
-
<subcommittee/>
|
489
|
-
<workgroup/>
|
498
|
+
<editorialgroup>
|
499
|
+
<agency>ISO</agency>
|
490
500
|
</editorialgroup>
|
501
|
+
<approvalgroup>
|
502
|
+
<agency>ISO</agency>
|
503
|
+
</approvalgroup>
|
491
504
|
<structuredidentifier>
|
492
505
|
<project-number amendment="1" part="1">17301</project-number>
|
493
506
|
</structuredidentifier>
|
@@ -555,11 +568,12 @@ RSpec.describe Metanorma::ISO do
|
|
555
568
|
</copyright>
|
556
569
|
<ext>
|
557
570
|
<doctype>technical-corrigendum</doctype>
|
558
|
-
|
559
|
-
|
560
|
-
<subcommittee/>
|
561
|
-
<workgroup/>
|
571
|
+
<editorialgroup>
|
572
|
+
<agency>ISO</agency>
|
562
573
|
</editorialgroup>
|
574
|
+
<approvalgroup>
|
575
|
+
<agency>ISO</agency>
|
576
|
+
</approvalgroup>
|
563
577
|
<structuredidentifier>
|
564
578
|
<project-number corrigendum="3" part="1">17301</project-number>
|
565
579
|
</structuredidentifier>
|
@@ -627,11 +641,12 @@ RSpec.describe Metanorma::ISO do
|
|
627
641
|
</copyright>
|
628
642
|
<ext>
|
629
643
|
<doctype>technical-corrigendum</doctype>
|
630
|
-
|
631
|
-
|
632
|
-
<subcommittee/>
|
633
|
-
<workgroup/>
|
644
|
+
<editorialgroup>
|
645
|
+
<agency>ISO</agency>
|
634
646
|
</editorialgroup>
|
647
|
+
<approvalgroup>
|
648
|
+
<agency>ISO</agency>
|
649
|
+
</approvalgroup>
|
635
650
|
<structuredidentifier>
|
636
651
|
<project-number part='1' corrigendum='3'>17301</project-number>
|
637
652
|
</structuredidentifier>
|
@@ -698,11 +713,12 @@ RSpec.describe Metanorma::ISO do
|
|
698
713
|
</copyright>
|
699
714
|
<ext>
|
700
715
|
<doctype>technical-corrigendum</doctype>
|
701
|
-
|
702
|
-
|
703
|
-
<subcommittee/>
|
704
|
-
<workgroup/>
|
716
|
+
<editorialgroup>
|
717
|
+
<agency>ISO</agency>
|
705
718
|
</editorialgroup>
|
719
|
+
<approvalgroup>
|
720
|
+
<agency>ISO</agency>
|
721
|
+
</approvalgroup>
|
706
722
|
<structuredidentifier>
|
707
723
|
<project-number corrigendum="3" part="1">17301</project-number>
|
708
724
|
</structuredidentifier>
|
data/spec/metanorma/base_spec.rb
CHANGED
@@ -37,6 +37,25 @@ RSpec.describe Metanorma::ISO do
|
|
37
37
|
:workgroup-number_2: 31
|
38
38
|
:workgroup-type_2: C1
|
39
39
|
:secretariat: SECRETARIAT
|
40
|
+
:approval-technical-committee: TCa
|
41
|
+
:approval-technical-committee-number: 1a
|
42
|
+
:approval-technical-committee-type: Aa
|
43
|
+
:approval-subcommittee: SCa
|
44
|
+
:approval-subcommittee-number: 2a
|
45
|
+
:approval-subcommittee-type: Ba
|
46
|
+
:approval-workgroup: WGa
|
47
|
+
:approval-workgroup-number: 3a
|
48
|
+
:approval-workgroup-type: Ca
|
49
|
+
:approval-technical-committee_2: TC1a
|
50
|
+
:approval-technical-committee-number_2: 11a
|
51
|
+
:approval-technical-committee-type_2: A1a
|
52
|
+
:approval-subcommittee_2: SC1a
|
53
|
+
:approval-subcommittee-number_2: 21a
|
54
|
+
:approval-subcommittee-type_2: B1a
|
55
|
+
:approval-workgroup_2: WG1a
|
56
|
+
:approval-workgroup-number_2: 31a
|
57
|
+
:approval-workgroup-type_2: C1a
|
58
|
+
:approval-agency: ISO/IEC
|
40
59
|
:docstage: 20
|
41
60
|
:docsubstage: 20
|
42
61
|
:iteration: 3
|
@@ -105,9 +124,10 @@ RSpec.describe Metanorma::ISO do
|
|
105
124
|
</owner>
|
106
125
|
</copyright>
|
107
126
|
<ext>
|
108
|
-
<doctype>
|
127
|
+
<doctype>standard</doctype>
|
109
128
|
<horizontal>true</horizontal>
|
110
129
|
<editorialgroup>
|
130
|
+
<agency>ISO</agency>
|
111
131
|
<technical-committee number="1" type="A">TC</technical-committee>
|
112
132
|
<technical-committee number="11" type="A1">TC1</technical-committee>
|
113
133
|
<subcommittee number="2" type="B">SC</subcommittee>
|
@@ -116,6 +136,16 @@ RSpec.describe Metanorma::ISO do
|
|
116
136
|
<workgroup number="31" type="C1">WG1</workgroup>
|
117
137
|
<secretariat>SECRETARIAT</secretariat>
|
118
138
|
</editorialgroup>
|
139
|
+
<approvalgroup>
|
140
|
+
<agency>ISO</agency>
|
141
|
+
<agency>IEC</agency>
|
142
|
+
<technical-committee number="1a" type="Aa">TCa</technical-committee>
|
143
|
+
<technical-committee number="11a" type="A1a">TC1a</technical-committee>
|
144
|
+
<subcommittee number="2a" type="Ba">SCa</subcommittee>
|
145
|
+
<subcommittee number="21a" type="B1a">SC1a</subcommittee>
|
146
|
+
<workgroup number="3a" type="Ca">WGa</workgroup>
|
147
|
+
<workgroup number="31a" type="C1a">WG1a</workgroup>
|
148
|
+
</approvalgroup>
|
119
149
|
<ics>
|
120
150
|
<code>1</code>
|
121
151
|
</ics>
|
@@ -161,6 +191,18 @@ RSpec.describe Metanorma::ISO do
|
|
161
191
|
:pub-uri: http://www.example.com
|
162
192
|
:docstage:
|
163
193
|
:docsubstage:
|
194
|
+
:technical-committee: TC
|
195
|
+
:technical-committee-number: 1
|
196
|
+
:subcommittee: SC
|
197
|
+
:subcommittee-number: 2
|
198
|
+
:workgroup: WG
|
199
|
+
:workgroup-number: 3
|
200
|
+
:approval-technical-committee: TC
|
201
|
+
:approval-technical-committee-number: 1
|
202
|
+
:approval-subcommittee: SC
|
203
|
+
:approval-subcommittee-number: 2
|
204
|
+
:approval-workgroup: WG
|
205
|
+
:approval-workgroup-number: 3
|
164
206
|
INPUT
|
165
207
|
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
166
208
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -274,11 +316,20 @@ RSpec.describe Metanorma::ISO do
|
|
274
316
|
</copyright>
|
275
317
|
<ext>
|
276
318
|
<doctype>technical-report</doctype>
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
319
|
+
<editorialgroup>
|
320
|
+
<agency>IEC</agency>
|
321
|
+
<agency>IETF</agency>
|
322
|
+
<agency>ISO</agency>
|
323
|
+
<technical-committee number='1' type='TC'>TC</technical-committee>
|
324
|
+
<subcommittee number='2' type='SC'>SC</subcommittee>
|
325
|
+
<workgroup number='3' type='WG'>WG</workgroup>
|
326
|
+
</editorialgroup>
|
327
|
+
<approvalgroup>
|
328
|
+
<agency>ISO</agency>
|
329
|
+
<technical-committee number='1' type='TC'>TC</technical-committee>
|
330
|
+
<subcommittee number='2' type='SC'>SC</subcommittee>
|
331
|
+
<workgroup number='3' type='WG'>WG</workgroup>
|
332
|
+
</approvalgroup>
|
282
333
|
<structuredidentifier>
|
283
334
|
<project-number part="1" subpart="1">IEC/IETF/ISO 1000</project-number>
|
284
335
|
</structuredidentifier>
|
@@ -290,6 +341,78 @@ RSpec.describe Metanorma::ISO do
|
|
290
341
|
OUTPUT
|
291
342
|
end
|
292
343
|
|
344
|
+
it "processes tech specification identifier" do
|
345
|
+
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
346
|
+
= Document title
|
347
|
+
Author
|
348
|
+
:docfile: test.adoc
|
349
|
+
:nodoc:
|
350
|
+
:novalid:
|
351
|
+
:no-isobib:
|
352
|
+
:docnumber: 1000
|
353
|
+
:partnumber: 1-1
|
354
|
+
:copyright-year: 2001
|
355
|
+
:doctype: technical-specification
|
356
|
+
:docstage: 50
|
357
|
+
:docsubstage:
|
358
|
+
INPUT
|
359
|
+
expect(xmlpp(output.sub(%r{<boilerplate>.*</boilerplate>}m, "")))
|
360
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
361
|
+
<iso-standard xmlns='https://www.metanorma.org/ns/iso' type='semantic' version="#{Metanorma::ISO::VERSION}">
|
362
|
+
<bibdata type='standard'>
|
363
|
+
<docidentifier type='ISO'>ISO/FDTS 1000-1-1</docidentifier>
|
364
|
+
<docidentifier type='iso-undated'>ISO/FDTS 1000-1-1</docidentifier>
|
365
|
+
<docidentifier type='iso-with-lang'>ISO/FDTS 1000-1-1(E)</docidentifier>
|
366
|
+
<docidentifier type='iso-reference'>ISO/FDTS 1000-1-1:2001(E)</docidentifier>
|
367
|
+
<docnumber>1000</docnumber>
|
368
|
+
<contributor>
|
369
|
+
<role type='author'/>
|
370
|
+
<organization>
|
371
|
+
<name>International Organization for Standardization</name>
|
372
|
+
<abbreviation>ISO</abbreviation>
|
373
|
+
</organization>
|
374
|
+
</contributor>
|
375
|
+
<contributor>
|
376
|
+
<role type='publisher'/>
|
377
|
+
<organization>
|
378
|
+
<name>International Organization for Standardization</name>
|
379
|
+
<abbreviation>ISO</abbreviation>
|
380
|
+
</organization>
|
381
|
+
</contributor>
|
382
|
+
<language>en</language>
|
383
|
+
<script>Latn</script>
|
384
|
+
<status>
|
385
|
+
<stage abbreviation='FDTS TS'>50</stage>
|
386
|
+
<substage>00</substage>
|
387
|
+
</status>
|
388
|
+
<copyright>
|
389
|
+
<from>2001</from>
|
390
|
+
<owner>
|
391
|
+
<organization>
|
392
|
+
<name>International Organization for Standardization</name>
|
393
|
+
<abbreviation>ISO</abbreviation>
|
394
|
+
</organization>
|
395
|
+
</owner>
|
396
|
+
</copyright>
|
397
|
+
<ext>
|
398
|
+
<doctype>technical-specification</doctype>
|
399
|
+
<editorialgroup>
|
400
|
+
<agency>ISO</agency>
|
401
|
+
</editorialgroup>
|
402
|
+
<approvalgroup>
|
403
|
+
<agency>ISO</agency>
|
404
|
+
</approvalgroup>
|
405
|
+
<structuredidentifier>
|
406
|
+
<project-number part='1' subpart='1'>ISO 1000</project-number>
|
407
|
+
</structuredidentifier>
|
408
|
+
<stagename>Final draft</stagename>
|
409
|
+
</ext>
|
410
|
+
</bibdata>
|
411
|
+
<sections> </sections>
|
412
|
+
</iso-standard>
|
413
|
+
OUTPUT
|
414
|
+
end
|
415
|
+
|
293
416
|
it "processes Russian titles" do
|
294
417
|
output = Asciidoctor.convert(<<~"INPUT", *OPTIONS)
|
295
418
|
= Document title
|
@@ -381,13 +504,14 @@ RSpec.describe Metanorma::ISO do
|
|
381
504
|
</owner>
|
382
505
|
</copyright>
|
383
506
|
<ext>
|
384
|
-
<doctype>
|
507
|
+
<doctype>standard</doctype>
|
385
508
|
<horizontal>true</horizontal>
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
509
|
+
<editorialgroup>
|
510
|
+
<agency>ISO</agency>
|
511
|
+
</editorialgroup>
|
512
|
+
<approvalgroup>
|
513
|
+
<agency>ISO</agency>
|
514
|
+
</approvalgroup>
|
391
515
|
<structuredidentifier>
|
392
516
|
<project-number part='1'>ISO 1000</project-number>
|
393
517
|
</structuredidentifier>
|
@@ -490,11 +614,12 @@ RSpec.describe Metanorma::ISO do
|
|
490
614
|
</copyright>
|
491
615
|
<ext>
|
492
616
|
<doctype>this-is-a-doctype</doctype>
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
617
|
+
<editorialgroup>
|
618
|
+
<agency>SD</agency>
|
619
|
+
</editorialgroup>
|
620
|
+
<approvalgroup>
|
621
|
+
<agency>ISO</agency>
|
622
|
+
</approvalgroup>
|
498
623
|
<structuredidentifier>
|
499
624
|
<project-number part="1" subpart="1">SD 1000</project-number>
|
500
625
|
</structuredidentifier>
|
@@ -561,11 +686,12 @@ RSpec.describe Metanorma::ISO do
|
|
561
686
|
</copyright>
|
562
687
|
<ext>
|
563
688
|
<doctype>international-standard</doctype>
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
689
|
+
<editorialgroup>
|
690
|
+
<agency>ISO</agency>
|
691
|
+
</editorialgroup>
|
692
|
+
<approvalgroup>
|
693
|
+
<agency>ISO</agency>
|
694
|
+
</approvalgroup>
|
569
695
|
<structuredidentifier>
|
570
696
|
<project-number>ISO 1000</project-number>
|
571
697
|
</structuredidentifier>
|
@@ -629,12 +755,13 @@ RSpec.describe Metanorma::ISO do
|
|
629
755
|
</owner>
|
630
756
|
</copyright>
|
631
757
|
<ext>
|
632
|
-
<doctype>
|
633
|
-
|
634
|
-
|
635
|
-
<subcommittee/>
|
636
|
-
<workgroup/>
|
758
|
+
<doctype>standard</doctype>
|
759
|
+
<editorialgroup>
|
760
|
+
<agency>ISO</agency>
|
637
761
|
</editorialgroup>
|
762
|
+
<approvalgroup>
|
763
|
+
<agency>ISO</agency>
|
764
|
+
</approvalgroup>
|
638
765
|
<structuredidentifier>
|
639
766
|
<project-number>ISO 1000</project-number>
|
640
767
|
</structuredidentifier>
|
@@ -698,12 +825,13 @@ RSpec.describe Metanorma::ISO do
|
|
698
825
|
</owner>
|
699
826
|
</copyright>
|
700
827
|
<ext>
|
701
|
-
<doctype>
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
828
|
+
<doctype>standard</doctype>
|
829
|
+
<editorialgroup>
|
830
|
+
<agency>ISO</agency>
|
831
|
+
</editorialgroup>
|
832
|
+
<approvalgroup>
|
833
|
+
<agency>ISO</agency>
|
834
|
+
</approvalgroup>
|
707
835
|
<structuredidentifier>
|
708
836
|
<project-number>ISO 1000</project-number>
|
709
837
|
</structuredidentifier>
|
@@ -767,11 +895,12 @@ RSpec.describe Metanorma::ISO do
|
|
767
895
|
</copyright>
|
768
896
|
<ext>
|
769
897
|
<doctype>directive</doctype>
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
898
|
+
<editorialgroup>
|
899
|
+
<agency>ISO</agency>
|
900
|
+
</editorialgroup>
|
901
|
+
<approvalgroup>
|
902
|
+
<agency>ISO</agency>
|
903
|
+
</approvalgroup>
|
775
904
|
<structuredidentifier>
|
776
905
|
<project-number>ISO 1000</project-number>
|
777
906
|
</structuredidentifier>
|
@@ -1142,12 +1271,13 @@ RSpec.describe Metanorma::ISO do
|
|
1142
1271
|
</bibitem>
|
1143
1272
|
</relation>
|
1144
1273
|
<ext>
|
1145
|
-
<doctype>
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1274
|
+
<doctype>standard</doctype>
|
1275
|
+
<editorialgroup>
|
1276
|
+
<agency>ISO</agency>
|
1277
|
+
</editorialgroup>
|
1278
|
+
<approvalgroup>
|
1279
|
+
<agency>ISO</agency>
|
1280
|
+
</approvalgroup>
|
1151
1281
|
<stagename>International standard</stagename>
|
1152
1282
|
</ext>
|
1153
1283
|
</bibdata>
|
@@ -228,6 +228,27 @@ RSpec.describe Metanorma::ISO do
|
|
228
228
|
.to be_equivalent_to xmlpp(output)
|
229
229
|
end
|
230
230
|
|
231
|
+
it "processes editorial notes" do
|
232
|
+
input = <<~INPUT
|
233
|
+
#{ASCIIDOC_BLANK_HDR}
|
234
|
+
[IMPORTANT,type=editorial]
|
235
|
+
====
|
236
|
+
Editorial note
|
237
|
+
====
|
238
|
+
INPUT
|
239
|
+
output = <<~OUTPUT
|
240
|
+
#{BLANK_HDR}
|
241
|
+
<sections>
|
242
|
+
<admonition id="_" type="editorial">
|
243
|
+
<p id="_">Editorial note</p>
|
244
|
+
</admonition>
|
245
|
+
</sections>
|
246
|
+
</iso-standard>
|
247
|
+
OUTPUT
|
248
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
|
249
|
+
.to be_equivalent_to xmlpp(output)
|
250
|
+
end
|
251
|
+
|
231
252
|
it "processes complex admonitions with non-Asciidoc names" do
|
232
253
|
input = <<~INPUT
|
233
254
|
#{ASCIIDOC_BLANK_HDR}
|