metanorma-standoc 1.8.6 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +5 -3
- data/Gemfile.devel +0 -0
- data/lib/asciidoctor/standoc/base.rb +41 -36
- data/lib/asciidoctor/standoc/biblio.rng +4 -6
- data/lib/asciidoctor/standoc/blocks.rb +44 -14
- data/lib/asciidoctor/standoc/blocks_notes.rb +41 -24
- data/lib/asciidoctor/standoc/cleanup.rb +33 -78
- data/lib/asciidoctor/standoc/cleanup_block.rb +77 -62
- data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +51 -29
- data/lib/asciidoctor/standoc/cleanup_footnotes.rb +1 -0
- data/lib/asciidoctor/standoc/cleanup_image.rb +71 -0
- data/lib/asciidoctor/standoc/cleanup_maths.rb +37 -28
- data/lib/asciidoctor/standoc/cleanup_ref.rb +24 -15
- data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +1 -1
- data/lib/asciidoctor/standoc/cleanup_reqt.rb +47 -0
- data/lib/asciidoctor/standoc/cleanup_section.rb +21 -15
- data/lib/asciidoctor/standoc/converter.rb +10 -3
- data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +67 -66
- data/lib/asciidoctor/standoc/front.rb +35 -18
- data/lib/asciidoctor/standoc/front_contributor.rb +5 -5
- data/lib/asciidoctor/standoc/inline.rb +1 -1
- data/lib/asciidoctor/standoc/isodoc.rng +304 -1
- data/lib/asciidoctor/standoc/lists.rb +4 -2
- data/lib/asciidoctor/standoc/macros.rb +50 -23
- data/lib/asciidoctor/standoc/macros_form.rb +63 -0
- data/lib/asciidoctor/standoc/ref.rb +87 -112
- data/lib/asciidoctor/standoc/ref_date_id.rb +62 -0
- data/lib/asciidoctor/standoc/ref_sect.rb +22 -19
- data/lib/asciidoctor/standoc/section.rb +3 -1
- data/lib/asciidoctor/standoc/terms.rb +27 -16
- data/lib/asciidoctor/standoc/utils.rb +35 -9
- data/lib/asciidoctor/standoc/validate.rb +30 -28
- data/lib/metanorma-standoc.rb +0 -1
- data/lib/metanorma/standoc/version.rb +5 -5
- data/metanorma-standoc.gemspec +11 -11
- data/spec/asciidoctor/base_spec.rb +78 -8
- data/spec/asciidoctor/blocks_spec.rb +832 -727
- data/spec/asciidoctor/cleanup_sections_spec.rb +52 -15
- data/spec/asciidoctor/cleanup_spec.rb +1860 -1874
- data/spec/asciidoctor/inline_spec.rb +272 -273
- data/spec/asciidoctor/isobib_cache_spec.rb +406 -358
- data/spec/asciidoctor/macros_spec.rb +539 -437
- data/spec/asciidoctor/macros_yaml2text_spec.rb +1 -1
- data/spec/asciidoctor/refs_spec.rb +135 -7
- data/spec/asciidoctor/section_spec.rb +743 -690
- data/spec/assets/html-override.css +1 -0
- data/spec/assets/word-override.css +1 -0
- data/spec/spec_helper.rb +11 -9
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +60 -60
- data/spec/vcr_cassettes/isobib_get_123.yml +14 -14
- data/spec/vcr_cassettes/isobib_get_123_1.yml +30 -30
- data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +42 -42
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +15 -15
- data/spec/vcr_cassettes/isobib_get_124.yml +15 -15
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +53 -49
- metadata +72 -68
- data/.rubocop.ribose.yml +0 -66
- data/.rubocop.tb.yml +0 -650
- data/spec/asciidoctor/macros_lutaml_spec.rb +0 -80
@@ -69,7 +69,44 @@ RSpec.describe Asciidoctor::Standoc do
|
|
69
69
|
OUTPUT
|
70
70
|
end
|
71
71
|
|
72
|
-
|
72
|
+
it "preserves user-supplied boilerplate in Normative References" do
|
73
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
74
|
+
#{ASCIIDOC_BLANK_HDR}
|
75
|
+
[bibliography]
|
76
|
+
== Normative References
|
77
|
+
|
78
|
+
[NOTE,type=boilerplate]
|
79
|
+
--
|
80
|
+
This is extraneous information
|
81
|
+
--
|
82
|
+
|
83
|
+
* [[[iso216,ISO 216]]], _Reference_
|
84
|
+
|
85
|
+
This is also extraneous information
|
86
|
+
INPUT
|
87
|
+
#{BLANK_HDR}
|
88
|
+
<sections></sections>
|
89
|
+
<bibliography><references id="_" obligation="informative" normative="true"><title>Normative references</title>
|
90
|
+
<p id='_'>This is extraneous information</p>
|
91
|
+
<bibitem id="iso216" type="standard">
|
92
|
+
<title format="text/plain">Reference</title>
|
93
|
+
<docidentifier>ISO 216</docidentifier>
|
94
|
+
<docnumber>216</docnumber>
|
95
|
+
<contributor>
|
96
|
+
<role type="publisher"/>
|
97
|
+
<organization>
|
98
|
+
<name>ISO</name>
|
99
|
+
</organization>
|
100
|
+
</contributor>
|
101
|
+
</bibitem>
|
102
|
+
<p id='_'>This is also extraneous information</p>
|
103
|
+
</references>
|
104
|
+
</bibliography>
|
105
|
+
</standard-document>
|
106
|
+
OUTPUT
|
107
|
+
end
|
108
|
+
|
109
|
+
it "sorts references with their notes in Bibliography" do
|
73
110
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
74
111
|
#{ASCIIDOC_BLANK_HDR}
|
75
112
|
[bibliography]
|
@@ -560,15 +597,15 @@ INPUT
|
|
560
597
|
</title>
|
561
598
|
<p id='_'>There are no normative references in this document.</p>
|
562
599
|
</references>
|
563
|
-
<references id='_' normative='
|
564
|
-
<title>
|
600
|
+
<references id='_' normative='true' obligation='informative'>
|
601
|
+
<title>Normative References 2.
|
565
602
|
<fn reference='1'>
|
566
603
|
<p id='_'>A</p>
|
567
604
|
</fn>
|
568
605
|
</title>
|
569
606
|
</references>
|
570
607
|
<references id='_' normative='false' obligation='informative'>
|
571
|
-
<title>Bibliography
|
608
|
+
<title>Bibliography
|
572
609
|
<fn reference='1'>
|
573
610
|
<p id='_'>A</p>
|
574
611
|
</fn>
|
@@ -803,8 +840,8 @@ INPUT
|
|
803
840
|
<title>Normative references</title>
|
804
841
|
<p id='_'>There are no normative references in this document.</p>
|
805
842
|
</references>
|
806
|
-
<references id='_' normative='
|
807
|
-
<title>
|
843
|
+
<references id='_' normative='true' obligation='informative'>
|
844
|
+
<title>Normative References 2</title>
|
808
845
|
</references>
|
809
846
|
<references id='_' normative='false' obligation='informative'>
|
810
847
|
<title>Bibliography</title>
|
@@ -1037,11 +1074,11 @@ INPUT
|
|
1037
1074
|
<title>Références normatives</title>
|
1038
1075
|
<p id='_'>Le présent document ne contient aucune référence normative.</p>
|
1039
1076
|
</references>
|
1040
|
-
<references id='_' normative='
|
1041
|
-
<title>
|
1077
|
+
<references id='_' normative='true' obligation='informative'>
|
1078
|
+
<title>Normative References 2</title>
|
1042
1079
|
</references>
|
1043
1080
|
<references id='_' normative='false' obligation='informative'>
|
1044
|
-
<title>
|
1081
|
+
<title>Bibliographie</title>
|
1045
1082
|
</references>
|
1046
1083
|
<clause id='_' obligation='informative'>
|
1047
1084
|
<title>Bibliography 2</title>
|
@@ -1268,11 +1305,11 @@ INPUT
|
|
1268
1305
|
<title>规范性引用文件</title>
|
1269
1306
|
<p id='_'>本文件并没有规范性引用文件。</p>
|
1270
1307
|
</references>
|
1271
|
-
<references id='_' normative='
|
1272
|
-
<title
|
1308
|
+
<references id='_' normative='true' obligation='informative'>
|
1309
|
+
<title>Normative References 2</title>
|
1273
1310
|
</references>
|
1274
1311
|
<references id='_' normative='false' obligation='informative'>
|
1275
|
-
<title
|
1312
|
+
<title>参考文献</title>
|
1276
1313
|
</references>
|
1277
1314
|
<clause id='_' obligation='informative'>
|
1278
1315
|
<title>Bibliography 2</title>
|
@@ -1499,11 +1536,11 @@ INPUT
|
|
1499
1536
|
<title>Normaj citaĵoj</title>
|
1500
1537
|
<p id='_'>There are no normative references in this document.</p>
|
1501
1538
|
</references>
|
1502
|
-
<references id='_' normative='
|
1503
|
-
<title>
|
1539
|
+
<references id='_' normative='true' obligation='informative'>
|
1540
|
+
<title>Normative References 2</title>
|
1504
1541
|
</references>
|
1505
1542
|
<references id='_' normative='false' obligation='informative'>
|
1506
|
-
<title>
|
1543
|
+
<title>Bibliografio</title>
|
1507
1544
|
</references>
|
1508
1545
|
<clause id='_' obligation='informative'>
|
1509
1546
|
<title>Bibliography 2</title>
|
@@ -3,138 +3,133 @@ require "relaton_iec"
|
|
3
3
|
require "fileutils"
|
4
4
|
|
5
5
|
RSpec.describe Asciidoctor::Standoc do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
-
#{ASCIIDOC_BLANK_HDR}
|
11
|
-
|
12
|
-
[svgmap]
|
13
|
-
====
|
14
|
-
* <<ref1,Computer>>; http://www.example.com
|
15
|
-
====
|
16
|
-
|
17
|
-
[[ref1]]
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
*
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
[
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
* <<
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
</
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
</svg>
|
102
|
-
OUTPUT
|
103
|
-
end
|
104
|
-
|
105
|
-
it "processes markup in sourcecode" do
|
6
|
+
it "processes svgmap" do
|
7
|
+
FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg1.svg"
|
8
|
+
FileUtils.cp "spec/fixtures/action_schemaexpg1.svg", "action_schemaexpg2.svg"
|
9
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).gsub(%r{<image.*?</image>}m, "<image/>").gsub(%r{<style.*?</style>}m, "<style/>")).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
10
|
+
#{ASCIIDOC_BLANK_HDR}
|
11
|
+
|
12
|
+
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
13
|
+
====
|
14
|
+
* <<ref1,Computer>>; http://www.example.com
|
15
|
+
====
|
16
|
+
|
17
|
+
[[ref1]]
|
18
|
+
.SVG title
|
19
|
+
[.svgmap]
|
20
|
+
====
|
21
|
+
image::action_schemaexpg1.svg[]
|
22
|
+
|
23
|
+
* <<ref1,Computer>>; mn://action_schema
|
24
|
+
* http://www.example.com[Phone]; http://www.example.com
|
25
|
+
====
|
26
|
+
|
27
|
+
[[ref2]]
|
28
|
+
[svgmap%unnumbered,number=8,subsequence=A,keep-with-next=true,keep-lines-together=true]
|
29
|
+
====
|
30
|
+
[alt=Workmap]
|
31
|
+
image::action_schemaexpg2.svg[]
|
32
|
+
|
33
|
+
* <<ref1,Computer>>; mn://action_schema
|
34
|
+
* http://www.example.com[Phone]; mn://basic_attribute_schema
|
35
|
+
* <<express:action_schema:action_schema.basic,Coffee>>; mn://support_resource_schema
|
36
|
+
====
|
37
|
+
INPUT
|
38
|
+
#{BLANK_HDR}
|
39
|
+
<sections>
|
40
|
+
<svgmap unnumbered='true' number='8' subsequence='A' keep-with-next='true' keep-lines-together='true'>
|
41
|
+
<target href='http://www.example.com'>
|
42
|
+
<xref target='ref1'>Computer</xref>
|
43
|
+
</target>
|
44
|
+
</svgmap>
|
45
|
+
<figure id='ref1'>
|
46
|
+
<name>SVG title</name>
|
47
|
+
<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1_000000001' x='0px' y='0px' viewBox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve'>
|
48
|
+
<style/>
|
49
|
+
<image/>
|
50
|
+
<a xlink:href='#ref1'>
|
51
|
+
<rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
|
52
|
+
</a>
|
53
|
+
<a xlink:href='mn://basic_attribute_schema'>
|
54
|
+
<rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
|
55
|
+
</a>
|
56
|
+
<a xlink:href='mn://support_resource_schema'>
|
57
|
+
<rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
|
58
|
+
</a>
|
59
|
+
</svg>
|
60
|
+
</figure>
|
61
|
+
<svgmap>
|
62
|
+
<figure id='ref2' unnumbered='true' number='8' subsequence='A' keep-with-next='true' keep-lines-together='true'>
|
63
|
+
<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1_000000002' x='0px' y='0px' viewBox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve'>
|
64
|
+
<style/>
|
65
|
+
<image/>
|
66
|
+
<a xlink:href='#ref1'>
|
67
|
+
<rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
|
68
|
+
</a>
|
69
|
+
<a xlink:href='http://www.example.com'>
|
70
|
+
<rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
|
71
|
+
</a>
|
72
|
+
<a xlink:href='mn://support_resource_schema'>
|
73
|
+
<rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
|
74
|
+
</a>
|
75
|
+
</svg>
|
76
|
+
</figure>
|
77
|
+
<target href='mn://support_resource_schema'>
|
78
|
+
<eref bibitemid='express_action_schema' citeas=''>
|
79
|
+
<localityStack>
|
80
|
+
<locality type='anchor'>
|
81
|
+
<referenceFrom>action_schema.basic</referenceFrom>
|
82
|
+
</locality>
|
83
|
+
</localityStack>
|
84
|
+
Coffee
|
85
|
+
</eref>
|
86
|
+
</target>
|
87
|
+
</svgmap>
|
88
|
+
</sections>
|
89
|
+
<bibliography>
|
90
|
+
<references hidden='true' normative='false'>
|
91
|
+
<bibitem id='express_action_schema' type='internal'>
|
92
|
+
<docidentifier type='repository'>express/action_schema</docidentifier>
|
93
|
+
</bibitem>
|
94
|
+
</references>
|
95
|
+
</bibliography>
|
96
|
+
</standard-document>
|
97
|
+
OUTPUT
|
98
|
+
end
|
99
|
+
|
100
|
+
it "processes markup in sourcecode" do
|
106
101
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
107
|
-
|
108
|
-
|
109
|
-
[source]
|
110
|
-
----
|
111
|
-
<tag/>
|
112
|
-
----
|
102
|
+
#{ASCIIDOC_BLANK_HDR}
|
113
103
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
104
|
+
[source]
|
105
|
+
----
|
106
|
+
<tag/>
|
107
|
+
----
|
108
|
+
|
109
|
+
[[A]]
|
110
|
+
[source]
|
111
|
+
----
|
112
|
+
var {{{*x*}}} : {{{<<A,recursive>>}}} <tag/>
|
113
|
+
----
|
119
114
|
|
120
115
|
|
121
116
|
INPUT
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
</sections>
|
133
|
-
|
117
|
+
#{BLANK_HDR}
|
118
|
+
<sections>
|
119
|
+
<sourcecode id='_'><tag/></sourcecode>
|
120
|
+
<sourcecode id='A'>
|
121
|
+
var
|
122
|
+
<strong>x</strong>
|
123
|
+
:
|
124
|
+
<xref target='A'>recursive</xref>
|
125
|
+
<tag/>
|
126
|
+
</sourcecode>
|
127
|
+
</sections>
|
128
|
+
</standard-document>
|
134
129
|
OUTPUT
|
135
130
|
end
|
136
131
|
|
137
|
-
|
132
|
+
it "processes markup in sourcecode with custom delimiters" do
|
138
133
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
139
134
|
= Document title
|
140
135
|
Author
|
@@ -153,20 +148,19 @@ OUTPUT
|
|
153
148
|
|
154
149
|
|
155
150
|
INPUT
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</sections>
|
165
|
-
|
151
|
+
#{BLANK_HDR}
|
152
|
+
<sections>
|
153
|
+
<sourcecode id='A'>
|
154
|
+
var
|
155
|
+
<strong>x</strong>
|
156
|
+
:
|
157
|
+
<xref target='A'>recursive</xref>
|
158
|
+
</sourcecode>
|
159
|
+
</sections>
|
160
|
+
</standard-document>
|
166
161
|
OUTPUT
|
167
162
|
end
|
168
163
|
|
169
|
-
|
170
164
|
it "applies smartquotes by default" do
|
171
165
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
172
166
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -174,14 +168,14 @@ OUTPUT
|
|
174
168
|
|
175
169
|
'24:00:00'.
|
176
170
|
INPUT
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</clause>
|
183
|
-
|
184
|
-
|
171
|
+
#{BLANK_HDR}
|
172
|
+
<sections>
|
173
|
+
<clause id="_" inline-header="false" obligation="normative">
|
174
|
+
<title>“Quotation” A’s</title>
|
175
|
+
<p id='_'>‘24:00:00’.</p>
|
176
|
+
</clause>
|
177
|
+
</sections>
|
178
|
+
</standard-document>
|
185
179
|
OUTPUT
|
186
180
|
end
|
187
181
|
|
@@ -197,17 +191,17 @@ OUTPUT
|
|
197
191
|
|
198
192
|
== "Quotation" A's
|
199
193
|
INPUT
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
</clause>
|
205
|
-
|
206
|
-
|
194
|
+
#{BLANK_HDR}
|
195
|
+
<sections>
|
196
|
+
<clause id="_" inline-header="false" obligation="normative">
|
197
|
+
<title>“Quotation” A’s</title>
|
198
|
+
</clause>
|
199
|
+
</sections>
|
200
|
+
</standard-document>
|
207
201
|
OUTPUT
|
208
202
|
end
|
209
203
|
|
210
|
-
|
204
|
+
it "does not apply smartquotes when requested not to" do
|
211
205
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
212
206
|
= Document title
|
213
207
|
Author
|
@@ -221,16 +215,16 @@ OUTPUT
|
|
221
215
|
|
222
216
|
`"quote" A's`
|
223
217
|
INPUT
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
<p id="_">
|
229
|
-
|
230
|
-
</p>
|
231
|
-
</clause>
|
232
|
-
|
233
|
-
|
218
|
+
#{BLANK_HDR}
|
219
|
+
<sections>
|
220
|
+
<clause id="_" inline-header="false" obligation="normative">
|
221
|
+
<title>"Quotation" A's</title>
|
222
|
+
<p id="_">
|
223
|
+
<tt>"quote" A's</tt>
|
224
|
+
</p>
|
225
|
+
</clause>
|
226
|
+
</sections>
|
227
|
+
</standard-document>
|
234
228
|
OUTPUT
|
235
229
|
end
|
236
230
|
|
@@ -261,19 +255,19 @@ OUTPUT
|
|
261
255
|
====
|
262
256
|
|
263
257
|
INPUT
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
<p id="_">
|
268
|
-
|
269
|
-
</p>
|
270
|
-
<sourcecode id="_">"quote" A's</sourcecode>
|
271
|
-
<figure id='_' class='pseudocode'>
|
272
|
-
|
273
|
-
</figure>
|
274
|
-
</clause>
|
275
|
-
|
276
|
-
|
258
|
+
#{BLANK_HDR}
|
259
|
+
<sections>
|
260
|
+
<clause id="_" inline-header="false" obligation="normative"><title>“Quotation” A’s</title><p id="_">“Quotation” A’s</p>
|
261
|
+
<p id="_">
|
262
|
+
<tt>"quote" A’s</tt>
|
263
|
+
</p>
|
264
|
+
<sourcecode id="_">"quote" A's</sourcecode>
|
265
|
+
<figure id='_' class='pseudocode'>
|
266
|
+
<p id='_'>"quote" A's</p>
|
267
|
+
</figure>
|
268
|
+
</clause>
|
269
|
+
</sections>
|
270
|
+
</standard-document>
|
277
271
|
OUTPUT
|
278
272
|
end
|
279
273
|
|
@@ -284,13 +278,13 @@ OUTPUT
|
|
284
278
|
|
285
279
|
<&>
|
286
280
|
INPUT
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
<p id="_"><&></p>
|
291
|
-
|
292
|
-
|
293
|
-
|
281
|
+
#{BLANK_HDR}
|
282
|
+
<sections>
|
283
|
+
<clause id="_" inline-header="false" obligation="normative">
|
284
|
+
<p id="_"><&></p>
|
285
|
+
</clause>
|
286
|
+
</sections>
|
287
|
+
</standard-document>
|
294
288
|
OUTPUT
|
295
289
|
end
|
296
290
|
|
@@ -299,13 +293,13 @@ OUTPUT
|
|
299
293
|
#{ASCIIDOC_BLANK_HDR}
|
300
294
|
== {blank}
|
301
295
|
INPUT
|
302
|
-
|
303
|
-
|
304
|
-
|
296
|
+
#{BLANK_HDR}
|
297
|
+
<sections>
|
298
|
+
<clause id="_" inline-header="false" obligation="normative">
|
305
299
|
|
306
|
-
|
307
|
-
|
308
|
-
|
300
|
+
</clause>
|
301
|
+
</sections>
|
302
|
+
</standard-document>
|
309
303
|
OUTPUT
|
310
304
|
end
|
311
305
|
|
@@ -320,30 +314,30 @@ OUTPUT
|
|
320
314
|
|
321
315
|
Time
|
322
316
|
INPUT
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
</mrow>
|
332
|
-
<mrow>
|
333
|
-
|
334
|
-
</mrow>
|
335
|
-
</msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
336
|
-
<mrow>
|
337
|
-
|
338
|
-
</mrow>
|
339
|
-
<mrow>
|
340
|
-
|
341
|
-
</mrow>
|
342
|
-
</msub></math></stem></admitted>
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
317
|
+
#{BLANK_HDR}
|
318
|
+
<sections>
|
319
|
+
<terms id="_" obligation="normative">
|
320
|
+
<title>Terms and definitions</title>
|
321
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
322
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
323
|
+
<mrow>
|
324
|
+
<mi>t</mi>
|
325
|
+
</mrow>
|
326
|
+
<mrow>
|
327
|
+
<mn>90</mn>
|
328
|
+
</mrow>
|
329
|
+
</msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
330
|
+
<mrow>
|
331
|
+
<mi>t</mi>
|
332
|
+
</mrow>
|
333
|
+
<mrow>
|
334
|
+
<mn>91</mn>
|
335
|
+
</mrow>
|
336
|
+
</msub></math></stem></admitted>
|
337
|
+
<definition><p id="_">Time</p></definition></term>
|
338
|
+
</terms>
|
339
|
+
</sections>
|
340
|
+
</standard-document>
|
347
341
|
OUTPUT
|
348
342
|
end
|
349
343
|
|
@@ -362,26 +356,26 @@ OUTPUT
|
|
362
356
|
|
363
357
|
domain:[relativity2]
|
364
358
|
INPUT
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
</term>
|
382
|
-
|
383
|
-
|
384
|
-
|
359
|
+
#{BLANK_HDR}
|
360
|
+
<sections>
|
361
|
+
<terms id="_" obligation="normative">
|
362
|
+
<title>Terms and definitions</title>
|
363
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
364
|
+
<term id="term-tempus">
|
365
|
+
<preferred>Tempus</preferred>
|
366
|
+
<domain>relativity</domain><definition><p id="_"> Time</p></definition>
|
367
|
+
</term>
|
368
|
+
<term id='term-tempus1'>
|
369
|
+
<preferred>Tempus1</preferred>
|
370
|
+
<domain>relativity2</domain>
|
371
|
+
<definition>
|
372
|
+
<p id='_'>Time2</p>
|
373
|
+
<p id='_'> </p>
|
374
|
+
</definition>
|
375
|
+
</term>
|
376
|
+
</terms>
|
377
|
+
</sections>
|
378
|
+
</standard-document>
|
385
379
|
OUTPUT
|
386
380
|
end
|
387
381
|
|
@@ -405,63 +399,62 @@ OUTPUT
|
|
405
399
|
|
406
400
|
This paragraph is extraneous
|
407
401
|
INPUT
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
</msub></math></stem></preferred><definition><formula id="_">
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
</mrow>
|
425
|
-
<mrow>
|
426
|
-
|
427
|
-
</mrow>
|
428
|
-
</msub></math></stem>
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
402
|
+
#{BLANK_HDR}
|
403
|
+
<sections>
|
404
|
+
<terms id="_" obligation="normative">
|
405
|
+
<title>Terms and definitions</title>
|
406
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
407
|
+
<term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
408
|
+
<mrow>
|
409
|
+
<mi>t</mi>
|
410
|
+
</mrow>
|
411
|
+
<mrow>
|
412
|
+
<mn>90</mn>
|
413
|
+
</mrow>
|
414
|
+
</msub></math></stem></preferred><definition><formula id="_">
|
415
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
|
416
|
+
<mrow>
|
417
|
+
<mi>t</mi>
|
418
|
+
</mrow>
|
419
|
+
<mrow>
|
420
|
+
<mi>A</mi>
|
421
|
+
</mrow>
|
422
|
+
</msub></math></stem>
|
423
|
+
</formula>
|
424
|
+
<p id="_">This paragraph is extraneous</p></definition>
|
425
|
+
</term>
|
426
|
+
</terms>
|
427
|
+
</sections>
|
428
|
+
</standard-document>
|
435
429
|
OUTPUT
|
436
430
|
end
|
437
431
|
|
438
432
|
it "moves notes inside preceding blocks, if they are not at clause end, and the blocks are not delimited" do
|
439
433
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
440
|
-
|
441
|
-
|
442
|
-
[stem]
|
443
|
-
++++
|
444
|
-
r = 1 %
|
445
|
-
r = 1 %
|
446
|
-
++++
|
434
|
+
#{ASCIIDOC_BLANK_HDR}
|
447
435
|
|
448
|
-
|
436
|
+
[stem]
|
437
|
+
++++
|
438
|
+
r = 1 %
|
439
|
+
r = 1 %
|
440
|
+
++++
|
449
441
|
|
450
|
-
|
442
|
+
NOTE: That formula does not do much
|
443
|
+
|
444
|
+
Indeed.
|
451
445
|
INPUT
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
<note id="_">
|
456
|
-
|
457
|
-
</note></formula>
|
458
|
-
|
459
|
-
|
460
|
-
</standard-document>
|
446
|
+
#{BLANK_HDR}
|
447
|
+
<sections><formula id="_">
|
448
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi></math></stem>
|
449
|
+
<note id="_">
|
450
|
+
<p id="_">That formula does not do much</p>
|
451
|
+
</note></formula>
|
452
|
+
<p id="_">Indeed.</p></sections>
|
453
|
+
</standard-document>
|
461
454
|
OUTPUT
|
462
455
|
end
|
463
456
|
|
464
|
-
|
457
|
+
it "does not move notes inside preceding blocks, if they are marked as keep-separate" do
|
465
458
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
466
459
|
#{ASCIIDOC_BLANK_HDR}
|
467
460
|
|
@@ -478,15 +471,14 @@ OUTPUT
|
|
478
471
|
|
479
472
|
Indeed.
|
480
473
|
INPUT
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
<note id="_">
|
485
|
-
|
486
|
-
</note>
|
487
|
-
|
488
|
-
|
489
|
-
</standard-document>
|
474
|
+
#{BLANK_HDR}
|
475
|
+
<sections><formula id="_">
|
476
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi><mi>r</mi><mo>=</mo><mn>1</mn><mi>%</mi></math></stem></formula>
|
477
|
+
<note id="_">
|
478
|
+
<p id="_">That formula does not do much</p>
|
479
|
+
</note>
|
480
|
+
<p id="_">Indeed.</p></sections>
|
481
|
+
</standard-document>
|
490
482
|
OUTPUT
|
491
483
|
end
|
492
484
|
|
@@ -500,14 +492,14 @@ OUTPUT
|
|
500
492
|
|
501
493
|
NOTE: That loop does not do much
|
502
494
|
INPUT
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
495
|
+
#{BLANK_HDR}
|
496
|
+
<sections><sourcecode id="_" lang="ruby">[1...x].each do |y|
|
497
|
+
puts y
|
498
|
+
end</sourcecode>
|
499
|
+
<note id="_">
|
500
|
+
<p id="_">That loop does not do much</p>
|
501
|
+
</note></sections>
|
502
|
+
</standard-document>
|
511
503
|
OUTPUT
|
512
504
|
end
|
513
505
|
|
@@ -515,6 +507,7 @@ OUTPUT
|
|
515
507
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
516
508
|
#{ASCIIDOC_BLANK_HDR}
|
517
509
|
<<iso216>>
|
510
|
+
<<iso216,droploc%capital%>>
|
518
511
|
|
519
512
|
[bibliography]
|
520
513
|
== Normative References
|
@@ -525,6 +518,7 @@ OUTPUT
|
|
525
518
|
<title>Foreword</title>
|
526
519
|
<p id="_">
|
527
520
|
<eref type="inline" bibitemid="iso216" citeas="ISO 216:2001"/>
|
521
|
+
<eref type='inline' case='capital' droploc='true' bibitemid='iso216' citeas='ISO 216:2001'/>
|
528
522
|
</p>
|
529
523
|
</foreword></preface><sections>
|
530
524
|
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
@@ -558,95 +552,106 @@ OUTPUT
|
|
558
552
|
<<iso216,_whole_>>
|
559
553
|
<<iso216,a _whole_ flagon>>
|
560
554
|
<<iso216,whole,clause=3,a _whole_ flagon>>
|
555
|
+
<<iso216,droploc%capital%whole,clause=3,a _whole_ flagon>>
|
561
556
|
|
562
557
|
[bibliography]
|
563
558
|
== Normative References
|
564
559
|
* [[[iso216,ISO 216]]], _Reference_
|
565
560
|
INPUT
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
561
|
+
#{BLANK_HDR}
|
562
|
+
<preface><foreword id="_" obligation="informative">
|
563
|
+
<title>Foreword</title>
|
564
|
+
<p id="_">
|
565
|
+
<eref type="inline" bibitemid="iso216" citeas="ISO 216">
|
566
|
+
<localityStack>
|
567
|
+
<locality type="whole"/><locality type="clause"><referenceFrom>3</referenceFrom></locality><locality type="example"><referenceFrom>9</referenceFrom><referenceTo>11</referenceTo></locality><locality type="locality:prelude"><referenceFrom>33 a</referenceFrom></locality><locality type="locality:entirety"/>
|
568
|
+
</localityStack>
|
569
|
+
the reference,xyz</eref>
|
570
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
571
|
+
<localityStack>
|
572
|
+
<locality type='whole'/>
|
573
|
+
<locality type='clause'>
|
574
|
+
<referenceFrom>3</referenceFrom>
|
575
|
+
</locality>
|
576
|
+
<locality type='example'>
|
577
|
+
<referenceFrom>9</referenceFrom>
|
578
|
+
<referenceTo>11</referenceTo>
|
579
|
+
</locality>
|
580
|
+
<locality type='locality:prelude'>
|
581
|
+
<referenceFrom>33</referenceFrom>
|
582
|
+
</locality>
|
583
|
+
<locality type='locality:entirety'>
|
584
|
+
<referenceFrom>the reference</referenceFrom>
|
585
|
+
</locality>
|
586
|
+
</localityStack>
|
587
|
+
<localityStack>
|
588
|
+
<locality type='whole'/>
|
589
|
+
<locality type='clause'>
|
590
|
+
<referenceFrom>3</referenceFrom>
|
591
|
+
</locality>
|
592
|
+
<locality type='example'>
|
593
|
+
<referenceFrom>9</referenceFrom>
|
594
|
+
<referenceTo>11</referenceTo>
|
595
|
+
</locality>
|
596
|
+
<locality type='locality:prelude'>
|
597
|
+
<referenceFrom>33</referenceFrom>
|
598
|
+
</locality>
|
599
|
+
<locality type='locality:entirety'/>
|
600
|
+
</localityStack>
|
601
|
+
the reference,xyz
|
602
|
+
</eref>
|
603
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
604
|
+
<em>whole</em>
|
605
|
+
</eref>
|
606
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
607
|
+
a
|
608
|
+
<em>whole</em>
|
609
|
+
flagon
|
610
|
+
</eref>
|
611
|
+
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
571
612
|
<localityStack>
|
572
|
-
|
613
|
+
<locality type='whole'/>
|
614
|
+
<locality type='clause'>
|
615
|
+
<referenceFrom>3</referenceFrom>
|
616
|
+
</locality>
|
573
617
|
</localityStack>
|
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
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
609
|
-
<em>whole</em>
|
610
|
-
</eref>
|
611
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
612
|
-
a
|
613
|
-
<em>whole</em>
|
614
|
-
flagon
|
615
|
-
</eref>
|
616
|
-
<eref type='inline' bibitemid='iso216' citeas='ISO 216'>
|
617
|
-
<localityStack>
|
618
|
-
<locality type='whole'/>
|
619
|
-
<locality type='clause'>
|
620
|
-
<referenceFrom>3</referenceFrom>
|
621
|
-
</locality>
|
622
|
-
</localityStack>
|
623
|
-
a
|
624
|
-
<em>whole</em>
|
625
|
-
flagon
|
626
|
-
</eref>
|
627
|
-
</p>
|
628
|
-
</foreword></preface><sections>
|
629
|
-
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
630
|
-
<title>Normative references</title>
|
631
|
-
#{NORM_REF_BOILERPLATE}
|
632
|
-
<bibitem id="iso216" type="standard">
|
633
|
-
<title format="text/plain">Reference</title>
|
634
|
-
<docidentifier>ISO 216</docidentifier>
|
635
|
-
<docnumber>216</docnumber>
|
636
|
-
<contributor>
|
637
|
-
<role type="publisher"/>
|
638
|
-
<organization>
|
639
|
-
<name>ISO</name>
|
640
|
-
</organization>
|
641
|
-
</contributor>
|
642
|
-
</bibitem>
|
643
|
-
</references>
|
644
|
-
</bibliography>
|
645
|
-
</standard-document>
|
618
|
+
a
|
619
|
+
<em>whole</em>
|
620
|
+
flagon
|
621
|
+
</eref>
|
622
|
+
<eref type='inline' case='capital' droploc='true' bibitemid='iso216' citeas='ISO 216'>
|
623
|
+
<localityStack>
|
624
|
+
<locality type='whole'/>
|
625
|
+
<locality type='clause'>
|
626
|
+
<referenceFrom>3</referenceFrom>
|
627
|
+
</locality>
|
628
|
+
</localityStack>
|
629
|
+
a
|
630
|
+
<em>whole</em>
|
631
|
+
flagon
|
632
|
+
</eref>
|
633
|
+
</p>
|
634
|
+
</foreword></preface><sections>
|
635
|
+
</sections><bibliography><references id="_" obligation="informative" normative="true">
|
636
|
+
<title>Normative references</title>
|
637
|
+
#{NORM_REF_BOILERPLATE}
|
638
|
+
<bibitem id="iso216" type="standard">
|
639
|
+
<title format="text/plain">Reference</title>
|
640
|
+
<docidentifier>ISO 216</docidentifier>
|
641
|
+
<docnumber>216</docnumber>
|
642
|
+
<contributor>
|
643
|
+
<role type="publisher"/>
|
644
|
+
<organization>
|
645
|
+
<name>ISO</name>
|
646
|
+
</organization>
|
647
|
+
</contributor>
|
648
|
+
</bibitem>
|
649
|
+
</references>
|
650
|
+
</bibliography>
|
651
|
+
</standard-document>
|
646
652
|
OUTPUT
|
647
653
|
end
|
648
654
|
|
649
|
-
|
650
655
|
it "strips type from xrefs" do
|
651
656
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
652
657
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -656,29 +661,29 @@ OUTPUT
|
|
656
661
|
== Clause
|
657
662
|
* [[[iso216,ISO 216]]], _Reference_
|
658
663
|
INPUT
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
</bibitem>
|
680
|
-
</references></bibliography>
|
681
|
-
|
664
|
+
#{BLANK_HDR}
|
665
|
+
<preface>
|
666
|
+
<foreword id="_" obligation="informative">
|
667
|
+
<title>Foreword</title>
|
668
|
+
<p id="_">
|
669
|
+
<eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
|
670
|
+
</p>
|
671
|
+
</foreword></preface><sections>
|
672
|
+
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
673
|
+
<title>Bibliography</title>
|
674
|
+
<bibitem id="iso216" type="standard">
|
675
|
+
<title format="text/plain">Reference</title>
|
676
|
+
<docidentifier>ISO 216</docidentifier>
|
677
|
+
<docnumber>216</docnumber>
|
678
|
+
<contributor>
|
679
|
+
<role type="publisher"/>
|
680
|
+
<organization>
|
681
|
+
<name>ISO</name>
|
682
|
+
</organization>
|
683
|
+
</contributor>
|
684
|
+
</bibitem>
|
685
|
+
</references></bibliography>
|
686
|
+
</standard-document>
|
682
687
|
OUTPUT
|
683
688
|
end
|
684
689
|
|
@@ -691,26 +696,26 @@ OUTPUT
|
|
691
696
|
|
692
697
|
[.source]
|
693
698
|
<<ISO2191,section=1>>
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
699
|
+
INPUT
|
700
|
+
#{BLANK_HDR}
|
701
|
+
<sections>
|
702
|
+
<terms id="_" obligation="normative">
|
703
|
+
<title>Terms and definitions</title>
|
704
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
705
|
+
<term id="term-term1">
|
706
|
+
<preferred>Term1</preferred>
|
707
|
+
<termsource status="identical">
|
708
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
709
|
+
<localityStack>
|
710
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
711
|
+
</localityStack>
|
712
|
+
</origin>
|
713
|
+
</termsource>
|
714
|
+
</term>
|
715
|
+
</terms>
|
716
|
+
</sections>
|
717
|
+
</standard-document>
|
718
|
+
OUTPUT
|
714
719
|
end
|
715
720
|
|
716
721
|
it "inserts IDs into paragraphs" do
|
@@ -718,11 +723,11 @@ OUTPUT
|
|
718
723
|
#{ASCIIDOC_BLANK_HDR}
|
719
724
|
Paragraph
|
720
725
|
INPUT
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
+
#{BLANK_HDR}
|
727
|
+
<sections>
|
728
|
+
<p id="_">Paragraph</p>
|
729
|
+
</sections>
|
730
|
+
</standard-document>
|
726
731
|
OUTPUT
|
727
732
|
end
|
728
733
|
|
@@ -734,15 +739,15 @@ OUTPUT
|
|
734
739
|
NOTE: This note has no ID
|
735
740
|
====
|
736
741
|
INPUT
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
742
|
+
#{BLANK_HDR}
|
743
|
+
<sections>
|
744
|
+
<example id="_">
|
745
|
+
<note id="_">
|
746
|
+
<p id="_">This note has no ID</p>
|
747
|
+
</note>
|
748
|
+
</example>
|
749
|
+
</sections>
|
750
|
+
</standard-document>
|
746
751
|
OUTPUT
|
747
752
|
end
|
748
753
|
|
@@ -770,55 +775,55 @@ OUTPUT
|
|
770
775
|
|
771
776
|
a:: b
|
772
777
|
INPUT
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
778
|
+
#{BLANK_HDR}
|
779
|
+
<sections>
|
780
|
+
<table id='_'>
|
781
|
+
<tbody>
|
782
|
+
<tr>
|
783
|
+
<td valign='top' align='left'>a</td>
|
784
|
+
<td valign='top' align='left'>b</td>
|
785
|
+
<td valign='top' align='left'>c</td>
|
786
|
+
</tr>
|
787
|
+
</tbody>
|
788
|
+
<dl id='_' key='true'>
|
789
|
+
<dt>a</dt>
|
790
|
+
<dd>
|
791
|
+
<p id='_'>b</p>
|
792
|
+
</dd>
|
793
|
+
</dl>
|
794
|
+
</table>
|
795
|
+
<table id='_'>
|
796
|
+
<tbody>
|
797
|
+
<tr>
|
798
|
+
<td valign='top' align='left'>a</td>
|
799
|
+
<td valign='top' align='left'>b</td>
|
800
|
+
<td valign='top' align='left'>c</td>
|
801
|
+
</tr>
|
802
|
+
</tbody>
|
803
|
+
<dl id='_' key='true'>
|
804
|
+
<dt>a</dt>
|
805
|
+
<dd>
|
806
|
+
<p id='_'>b</p>
|
807
|
+
</dd>
|
808
|
+
</dl>
|
809
|
+
</table>
|
810
|
+
<table id='_'>
|
811
|
+
<tbody>
|
812
|
+
<tr>
|
813
|
+
<td valign='top' align='left'>a</td>
|
814
|
+
<td valign='top' align='left'>b</td>
|
815
|
+
<td valign='top' align='left'>c</td>
|
816
|
+
</tr>
|
817
|
+
</tbody>
|
818
|
+
</table>
|
819
|
+
<dl id='_'>
|
820
|
+
<dt>a</dt>
|
821
|
+
<dd>
|
822
|
+
<p id='_'>b</p>
|
823
|
+
</dd>
|
824
|
+
</dl>
|
825
|
+
</sections>
|
826
|
+
</standard-document>
|
822
827
|
OUTPUT
|
823
828
|
end
|
824
829
|
|
@@ -833,31 +838,31 @@ OUTPUT
|
|
833
838
|
|a |b |c
|
834
839
|
|===
|
835
840
|
INPUT
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
841
|
+
#{BLANK_HDR}
|
842
|
+
<sections>
|
843
|
+
<table id="_"><thead><tr>
|
844
|
+
<th valign="top" align="left">a</th>
|
845
|
+
<th valign="top" align="left">b</th>
|
846
|
+
<th valign="top" align="left">c</th>
|
847
|
+
</tr><tr>
|
848
|
+
<th valign="top" align="left">a</th>
|
849
|
+
<th valign="top" align="left">b</th>
|
850
|
+
<th valign="top" align="left">c</th>
|
851
|
+
</tr><tr>
|
852
|
+
<th valign="top" align="left">a</th>
|
853
|
+
<th valign="top" align="left">b</th>
|
854
|
+
<th valign="top" align="left">c</th>
|
855
|
+
</tr></thead>
|
856
|
+
<tbody>
|
857
|
+
<tr>
|
858
|
+
<td valign="top" align="left">a</td>
|
859
|
+
<td valign="top" align="left">b</td>
|
860
|
+
<td valign="top" align="left">c</td>
|
861
|
+
</tr>
|
862
|
+
</tbody>
|
863
|
+
</table>
|
864
|
+
</sections>
|
865
|
+
</standard-document>
|
861
866
|
OUTPUT
|
862
867
|
end
|
863
868
|
|
@@ -873,36 +878,36 @@ OUTPUT
|
|
873
878
|
|a |b |c
|
874
879
|
|===
|
875
880
|
INPUT
|
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
|
-
|
881
|
+
#{BLANK_HDR}
|
882
|
+
<sections>
|
883
|
+
<table id="_">
|
884
|
+
<thead>
|
885
|
+
<tr>
|
886
|
+
<th valign="top" align="left">a</th>
|
887
|
+
<th valign="top" align="left">b</th>
|
888
|
+
<th valign="top" align="left">c</th>
|
889
|
+
</tr>
|
890
|
+
<tr>
|
891
|
+
<th valign="top" align="left">a</th>
|
892
|
+
<th valign="top" align="left">b</th>
|
893
|
+
<th valign="top" align="left">c</th>
|
894
|
+
</tr><tr>
|
895
|
+
<th valign="top" align="left">a</th>
|
896
|
+
<th valign="top" align="left">b</th>
|
897
|
+
<th valign="top" align="left">c</th>
|
898
|
+
</tr></thead>
|
899
|
+
<tbody>
|
900
|
+
|
901
|
+
|
902
|
+
<tr>
|
903
|
+
<td valign="top" align="left">a</td>
|
904
|
+
<td valign="top" align="left">b</td>
|
905
|
+
<td valign="top" align="left">c</td>
|
906
|
+
</tr>
|
907
|
+
</tbody>
|
908
|
+
</table>
|
909
|
+
</sections>
|
910
|
+
</standard-document>
|
906
911
|
OUTPUT
|
907
912
|
end
|
908
913
|
|
@@ -917,23 +922,23 @@ OUTPUT
|
|
917
922
|
|
918
923
|
NOTE: Note 2
|
919
924
|
INPUT
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
925
|
+
#{BLANK_HDR}
|
926
|
+
<sections><table id="_">
|
927
|
+
<tbody>
|
928
|
+
<tr>
|
929
|
+
<td valign="top" align="left">a</td>
|
930
|
+
<td valign="top" align="left">b</td>
|
931
|
+
<td valign="top" align="left">c</td>
|
932
|
+
</tr>
|
933
|
+
</tbody>
|
934
|
+
<note id="_">
|
935
|
+
<p id="_">Note 1</p>
|
936
|
+
</note><note id="_">
|
937
|
+
<p id="_">Note 2</p>
|
938
|
+
</note></table>
|
939
|
+
|
940
|
+
</sections>
|
941
|
+
</standard-document>
|
937
942
|
OUTPUT
|
938
943
|
end
|
939
944
|
|
@@ -964,61 +969,61 @@ OUTPUT
|
|
964
969
|
|
965
970
|
a:: b
|
966
971
|
INPUT
|
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
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
972
|
+
#{BLANK_HDR}
|
973
|
+
<sections>
|
974
|
+
<formula id='_'>
|
975
|
+
<stem type='MathML'>
|
976
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
977
|
+
<mi>F</mi>
|
978
|
+
<mi>or</mi>
|
979
|
+
<mi>μ</mi>
|
980
|
+
<mi>l</mi>
|
981
|
+
<mi>a</mi>
|
982
|
+
</math>
|
983
|
+
</stem>
|
984
|
+
<dl id='_' key='true'>
|
985
|
+
<dt>a</dt>
|
986
|
+
<dd>
|
987
|
+
<p id='_'>b</p>
|
988
|
+
</dd>
|
989
|
+
</dl>
|
990
|
+
</formula>
|
991
|
+
<formula id='_'>
|
992
|
+
<stem type='MathML'>
|
993
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
994
|
+
<mi>F</mi>
|
995
|
+
<mi>or</mi>
|
996
|
+
<mi>μ</mi>
|
997
|
+
<mi>l</mi>
|
998
|
+
<mi>a</mi>
|
999
|
+
</math>
|
1000
|
+
</stem>
|
1001
|
+
<dl id='_' key='true'>
|
1002
|
+
<dt>a</dt>
|
1003
|
+
<dd>
|
1004
|
+
<p id='_'>b</p>
|
1005
|
+
</dd>
|
1006
|
+
</dl>
|
1007
|
+
</formula>
|
1008
|
+
<formula id='_'>
|
1009
|
+
<stem type='MathML'>
|
1010
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1011
|
+
<mi>F</mi>
|
1012
|
+
<mi>or</mi>
|
1013
|
+
<mi>μ</mi>
|
1014
|
+
<mi>l</mi>
|
1015
|
+
<mi>a</mi>
|
1016
|
+
</math>
|
1017
|
+
</stem>
|
1018
|
+
</formula>
|
1019
|
+
<dl id='_'>
|
1020
|
+
<dt>a</dt>
|
1021
|
+
<dd>
|
1022
|
+
<p id='_'>b</p>
|
1023
|
+
</dd>
|
1024
|
+
</dl>
|
1025
|
+
</sections>
|
1026
|
+
</standard-document>
|
1022
1027
|
OUTPUT
|
1023
1028
|
end
|
1024
1029
|
|
@@ -1034,30 +1039,28 @@ OUTPUT
|
|
1034
1039
|
|
1035
1040
|
A footnote:[This is a third footnote]
|
1036
1041
|
INPUT
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
</name>
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
</p>
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
</standard-document>
|
1042
|
+
#{BLANK_HDR}
|
1043
|
+
<sections><figure id="_">
|
1044
|
+
<name>
|
1045
|
+
Figuretitle.
|
1046
|
+
<fn reference='1'>
|
1047
|
+
<p id='_'>xyz</p>
|
1048
|
+
</fn>
|
1049
|
+
</name>
|
1050
|
+
<image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1051
|
+
<fn reference="a">
|
1052
|
+
<p id="_">This is a footnote to a figure</p>
|
1053
|
+
</fn><fn reference="b">
|
1054
|
+
<p id="_">This is another footnote to a figure</p>
|
1055
|
+
</fn></figure>
|
1056
|
+
<p id='_'>
|
1057
|
+
A
|
1058
|
+
<fn reference='2'>
|
1059
|
+
<p id='_'>This is a third footnote</p>
|
1060
|
+
</fn>
|
1061
|
+
</p>
|
1062
|
+
</sections>
|
1063
|
+
</standard-document>
|
1061
1064
|
OUTPUT
|
1062
1065
|
end
|
1063
1066
|
|
@@ -1079,37 +1082,37 @@ OUTPUT
|
|
1079
1082
|
|
1080
1083
|
a:: b
|
1081
1084
|
INPUT
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1085
|
+
#{BLANK_HDR}
|
1086
|
+
<sections>
|
1087
|
+
<figure id='_'>
|
1088
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1089
|
+
<dl id='_' key='true'>
|
1090
|
+
<dt>a</dt>
|
1091
|
+
<dd>
|
1092
|
+
<p id='_'>b</p>
|
1093
|
+
</dd>
|
1094
|
+
</dl>
|
1095
|
+
</figure>
|
1096
|
+
<figure id='_'>
|
1097
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1098
|
+
<dl id='_' key='true'>
|
1099
|
+
<dt>a</dt>
|
1100
|
+
<dd>
|
1101
|
+
<p id='_'>b</p>
|
1102
|
+
</dd>
|
1103
|
+
</dl>
|
1104
|
+
</figure>
|
1105
|
+
<figure id='_'>
|
1106
|
+
<image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
|
1107
|
+
</figure>
|
1108
|
+
<dl id='_'>
|
1109
|
+
<dt>a</dt>
|
1110
|
+
<dd>
|
1111
|
+
<p id='_'>b</p>
|
1112
|
+
</dd>
|
1113
|
+
</dl>
|
1114
|
+
</sections>
|
1115
|
+
</standard-document>
|
1113
1116
|
OUTPUT
|
1114
1117
|
end
|
1115
1118
|
|
@@ -1129,22 +1132,22 @@ OUTPUT
|
|
1129
1132
|
image::spec/examples/rice_images/rice_image3_3.png[]
|
1130
1133
|
====
|
1131
1134
|
INPUT
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1135
|
+
#{BLANK_HDR}
|
1136
|
+
<sections>
|
1137
|
+
<figure id="figureC-2"><name>Stages of gelatinization</name><figure id="_">
|
1138
|
+
<name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
|
1139
|
+
<image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1140
|
+
</figure>
|
1141
|
+
<figure id="_">
|
1142
|
+
<name>Intermediate stages: Some fully gelatinized kernels are visible</name>
|
1143
|
+
<image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1144
|
+
</figure>
|
1145
|
+
<figure id="_">
|
1146
|
+
<name>Final stages: All kernels are fully gelatinized</name>
|
1147
|
+
<image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
|
1148
|
+
</figure></figure>
|
1149
|
+
</sections>
|
1150
|
+
</standard-document>
|
1148
1151
|
OUTPUT
|
1149
1152
|
end
|
1150
1153
|
|
@@ -1200,7 +1203,7 @@ OUTPUT
|
|
1200
1203
|
OUTPUT
|
1201
1204
|
end
|
1202
1205
|
|
1203
|
-
|
1206
|
+
it "rearranges term note, term example, term source" do
|
1204
1207
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1205
1208
|
#{ASCIIDOC_BLANK_HDR}
|
1206
1209
|
|
@@ -1221,33 +1224,33 @@ OUTPUT
|
|
1221
1224
|
[example]
|
1222
1225
|
Example 2
|
1223
1226
|
INPUT
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1227
|
+
#{BLANK_HDR}
|
1228
|
+
<sections>
|
1229
|
+
<terms id="_" obligation="normative">
|
1230
|
+
<title>Terms and definitions</title>
|
1231
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
1232
|
+
<term id="term-term"><preferred>Term</preferred>
|
1233
|
+
|
1234
|
+
|
1235
|
+
|
1236
|
+
<termnote id="_">
|
1237
|
+
<p id="_">Note</p>
|
1238
|
+
</termnote><termnote id="_">
|
1239
|
+
<p id="_">Note 2</p>
|
1240
|
+
</termnote><termexample id="_">
|
1241
|
+
<p id="_">Example 1</p>
|
1242
|
+
</termexample><termexample id="_">
|
1243
|
+
<p id="_">Example 2</p>
|
1244
|
+
</termexample><termsource status="identical">
|
1245
|
+
<origin bibitemid="ISO2191" type="inline" citeas="">
|
1246
|
+
<localityStack>
|
1247
|
+
<locality type="section"><referenceFrom>1</referenceFrom></locality>
|
1248
|
+
</localityStack>
|
1249
|
+
</origin>
|
1250
|
+
</termsource></term>
|
1251
|
+
</terms>
|
1252
|
+
</sections>
|
1253
|
+
</standard-document>
|
1251
1254
|
OUTPUT
|
1252
1255
|
end
|
1253
1256
|
|
@@ -1262,148 +1265,147 @@ OUTPUT
|
|
1262
1265
|
# mock_iecbib_get_iec60050_103_01
|
1263
1266
|
# mock_iev
|
1264
1267
|
VCR.use_cassette "separates_iev_citations_by_top_level_clause" do
|
1265
|
-
|
1266
|
-
|
1268
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1269
|
+
#{CACHED_ISOBIB_BLANK_HDR}
|
1267
1270
|
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
+
[bibliography]
|
1272
|
+
== Normative References
|
1273
|
+
* [[[iev,IEV]]], _iev_
|
1271
1274
|
|
1272
|
-
|
1273
|
-
|
1275
|
+
== Terms and definitions
|
1276
|
+
=== Automation1
|
1274
1277
|
|
1275
|
-
|
1276
|
-
|
1278
|
+
[.source]
|
1279
|
+
<<iev,clause="103-01-02">>
|
1277
1280
|
|
1278
|
-
|
1281
|
+
=== Automation2
|
1279
1282
|
|
1280
|
-
|
1281
|
-
|
1283
|
+
[.source]
|
1284
|
+
<<iev,clause="102-01-02">>
|
1282
1285
|
|
1283
|
-
|
1286
|
+
=== Automation3
|
1284
1287
|
|
1285
|
-
|
1286
|
-
|
1288
|
+
[.source]
|
1289
|
+
<<iev,clause="103-01-02">>
|
1287
1290
|
INPUT
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
<
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
<
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
OUTPUT
|
1291
|
+
#{BLANK_HDR}
|
1292
|
+
<sections>
|
1293
|
+
<terms id="_" obligation="normative"><title>Terms and definitions</title>
|
1294
|
+
<p id="_">For the purposes of this document, the following terms and definitions apply.</p>
|
1295
|
+
<term id="term-automation1">
|
1296
|
+
<preferred>Automation1</preferred>
|
1297
|
+
<termsource status="identical">
|
1298
|
+
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
1299
|
+
<localityStack>
|
1300
|
+
<locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
|
1301
|
+
</localityStack>
|
1302
|
+
</origin>
|
1303
|
+
</termsource>
|
1304
|
+
</term>
|
1305
|
+
<term id="term-automation2">
|
1306
|
+
<preferred>Automation2</preferred>
|
1307
|
+
<termsource status="identical">
|
1308
|
+
<origin bibitemid="IEC60050-102" type="inline" citeas="IEC 60050-102:2007">
|
1309
|
+
<localityStack>
|
1310
|
+
<locality type="clause"><referenceFrom>102-01-02</referenceFrom></locality>
|
1311
|
+
</localityStack>
|
1312
|
+
</origin>
|
1313
|
+
</termsource>
|
1314
|
+
</term>
|
1315
|
+
<term id="term-automation3">
|
1316
|
+
<preferred>Automation3</preferred>
|
1317
|
+
<termsource status="identical">
|
1318
|
+
<origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
|
1319
|
+
<localityStack>
|
1320
|
+
<locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
|
1321
|
+
</localityStack>
|
1322
|
+
</origin>
|
1323
|
+
</termsource>
|
1324
|
+
</term></terms></sections><bibliography><references id="_" obligation="informative" normative="true">
|
1325
|
+
<title>Normative references</title>
|
1326
|
+
#{NORM_REF_BOILERPLATE}
|
1327
|
+
<bibitem type="standard" id="IEC60050-102">
|
1328
|
+
<fetched>#{Date.today}</fetched>
|
1329
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
1330
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">Part 102: Mathematics — General concepts and linear algebra</title>
|
1331
|
+
<title type='main' format='text/plain' language='en' script='Latn'>International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra</title>
|
1332
|
+
<uri type="src">https://webstore.iec.ch/publication/160</uri>
|
1333
|
+
<uri type="obp">/preview/info_iec60050-102%7Bed1.0%7Db.pdf</uri>
|
1334
|
+
<docidentifier type="IEC">IEC 60050-102:2007</docidentifier>
|
1335
|
+
<docidentifier type='URN'>urn:iec:std:iec:60050-102:2007:::en</docidentifier>
|
1336
|
+
<date type="published">
|
1337
|
+
<on>2007-08-27</on>
|
1338
|
+
</date>
|
1339
|
+
<contributor>
|
1340
|
+
<role type="publisher"/>
|
1341
|
+
<organization>
|
1342
|
+
<name>International Electrotechnical Commission</name>
|
1343
|
+
<abbreviation>IEC</abbreviation>
|
1344
|
+
<uri>www.iec.ch</uri>
|
1345
|
+
</organization>
|
1346
|
+
</contributor>
|
1347
|
+
<edition>1.0</edition>
|
1348
|
+
<language>en</language>
|
1349
|
+
<script>Latn</script>
|
1350
|
+
<abstract format="text/plain" language="en" script="Latn">This part of IEC 60050 gives the general mathematical terminology used in the fields of electricity, electronics and telecommunications, together with basic concepts in linear algebra. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Another part will deal with functions. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1351
|
+
<status>
|
1352
|
+
<stage>60</stage>
|
1353
|
+
<substage>60</substage>
|
1354
|
+
</status>
|
1355
|
+
<copyright>
|
1356
|
+
<from>2007</from>
|
1357
|
+
<owner>
|
1358
|
+
<organization>
|
1359
|
+
<name>International Electrotechnical Commission</name>
|
1360
|
+
<abbreviation>IEC</abbreviation>
|
1361
|
+
<uri>www.iec.ch</uri>
|
1362
|
+
</organization>
|
1363
|
+
</owner>
|
1364
|
+
</copyright>
|
1365
|
+
<place>Geneva</place>
|
1366
|
+
</bibitem><bibitem type="standard" id="IEC60050-103">
|
1367
|
+
<fetched>#{Date.today}</fetched>
|
1368
|
+
<title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
|
1369
|
+
<title type="title-part" format="text/plain" language="en" script="Latn">Part 103: Mathematics — Functions</title>
|
1370
|
+
<title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) — Part 103: Mathematics — Functions</title>
|
1371
|
+
<uri type="src">https://webstore.iec.ch/publication/161</uri>
|
1372
|
+
<uri type="obp">/preview/info_iec60050-103%7Bed1.0%7Db.pdf</uri>
|
1373
|
+
<docidentifier type="IEC">IEC 60050-103:2009</docidentifier>
|
1374
|
+
<docidentifier type='URN'>urn:iec:std:iec:60050-103:2009:::en</docidentifier>
|
1375
|
+
<date type="published">
|
1376
|
+
<on>2009-12-14</on>
|
1377
|
+
</date>
|
1378
|
+
<contributor>
|
1379
|
+
<role type="publisher"/>
|
1380
|
+
<organization>
|
1381
|
+
<name>International Electrotechnical Commission</name>
|
1382
|
+
<abbreviation>IEC</abbreviation>
|
1383
|
+
<uri>www.iec.ch</uri>
|
1384
|
+
</organization>
|
1385
|
+
</contributor>
|
1386
|
+
<edition>1.0</edition>
|
1387
|
+
<language>en</language>
|
1388
|
+
<script>Latn</script>
|
1389
|
+
<abstract format="text/plain" language="en" script="Latn">IEC 60050-103:2009 gives the terminology relative to functions of one or more variables. Together with IEC 60050-102, it covers the mathematical terminology used in the fields of electricity, electronics and telecommunications. It maintains a clear distinction between mathematical concepts and physical concepts, even if some terms are used in both cases. Mathematical symbols are generally in accordance with IEC 60027-1 and ISO 80000-2. This standard cancels and replaces Sections 101-13, 101-14 and 101-15 of International Standard IEC 60050-101:1998. It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
|
1390
|
+
<status>
|
1391
|
+
<stage>60</stage>
|
1392
|
+
<substage>60</substage>
|
1393
|
+
</status>
|
1394
|
+
<copyright>
|
1395
|
+
<from>2009</from>
|
1396
|
+
<owner>
|
1397
|
+
<organization>
|
1398
|
+
<name>International Electrotechnical Commission</name>
|
1399
|
+
<abbreviation>IEC</abbreviation>
|
1400
|
+
<uri>www.iec.ch</uri>
|
1401
|
+
</organization>
|
1402
|
+
</owner>
|
1403
|
+
</copyright>
|
1404
|
+
<place>Geneva</place>
|
1405
|
+
</bibitem>
|
1406
|
+
</references></bibliography>
|
1407
|
+
</standard-document>
|
1408
|
+
OUTPUT
|
1407
1409
|
end
|
1408
1410
|
FileUtils.rm_rf File.expand_path("~/.iev.pstore")
|
1409
1411
|
FileUtils.mv File.expand_path("~/.iev.pstore1"), File.expand_path("~/.iev.pstore"), force: true
|
@@ -1411,42 +1413,40 @@ OUTPUT
|
|
1411
1413
|
FileUtils.mv File.expand_path("~/.relaton-bib.pstore1"), File.expand_path("~/.relaton/cache"), force: true
|
1412
1414
|
end
|
1413
1415
|
|
1414
|
-
|
1416
|
+
it "counts footnotes with link-only content as separate footnotes" do
|
1415
1417
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1416
|
-
|
1417
|
-
|
1418
|
-
footnote:[http://www.example.com]
|
1418
|
+
#{ASCIIDOC_BLANK_HDR}
|
1419
1419
|
|
1420
|
-
|
1420
|
+
footnote:[http://www.example.com]
|
1421
1421
|
|
1422
|
-
|
1422
|
+
footnote:[http://www.example.com]
|
1423
|
+
|
1424
|
+
footnote:[http://www.example1.com]
|
1423
1425
|
INPUT
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
</fn>
|
1430
|
-
</p>
|
1431
|
-
<p id="_"><fn reference="1">
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
</fn>
|
1436
|
-
</p>
|
1437
|
-
<p id="_"><fn reference="2">
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
</fn>
|
1442
|
-
</p></sections>
|
1443
|
-
|
1444
|
-
|
1445
|
-
</standard-document>
|
1426
|
+
#{BLANK_HDR}
|
1427
|
+
<sections><p id="_"><fn reference="1">
|
1428
|
+
<p id="_">
|
1429
|
+
<link target="http://www.example.com"/>
|
1430
|
+
</p>
|
1431
|
+
</fn>
|
1432
|
+
</p>
|
1433
|
+
<p id="_"><fn reference="1">
|
1434
|
+
<p id="_">
|
1435
|
+
<link target="http://www.example.com"/>
|
1436
|
+
</p>
|
1437
|
+
</fn>
|
1438
|
+
</p>
|
1439
|
+
<p id="_"><fn reference="2">
|
1440
|
+
<p id="_">
|
1441
|
+
<link target="http://www.example1.com"/>
|
1442
|
+
</p>
|
1443
|
+
</fn>
|
1444
|
+
</p></sections>
|
1445
|
+
</standard-document>
|
1446
1446
|
OUTPUT
|
1447
1447
|
end
|
1448
1448
|
|
1449
|
-
|
1449
|
+
it "retains AsciiMath on request" do
|
1450
1450
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1451
1451
|
= Document title
|
1452
1452
|
Author
|
@@ -1458,14 +1458,13 @@ OUTPUT
|
|
1458
1458
|
|
1459
1459
|
stem:[1/r]
|
1460
1460
|
INPUT
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
</p>
|
1466
|
-
</sections>
|
1467
|
-
</standard-document>
|
1468
|
-
|
1461
|
+
#{BLANK_HDR}
|
1462
|
+
<sections>
|
1463
|
+
<p id="_">
|
1464
|
+
<stem type="AsciiMath">1/r</stem>
|
1465
|
+
</p>
|
1466
|
+
</sections>
|
1467
|
+
</standard-document>
|
1469
1468
|
OUTPUT
|
1470
1469
|
end
|
1471
1470
|
|
@@ -1480,42 +1479,40 @@ OUTPUT
|
|
1480
1479
|
|
1481
1480
|
stem:[1/r]
|
1482
1481
|
INPUT
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
<mrow>
|
1488
|
-
|
1489
|
-
</mrow>
|
1490
|
-
<mrow>
|
1491
|
-
|
1492
|
-
</mrow>
|
1493
|
-
</mfrac></math></stem>
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1482
|
+
#{BLANK_HDR}
|
1483
|
+
<sections>
|
1484
|
+
<p id="_">
|
1485
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
|
1486
|
+
<mrow>
|
1487
|
+
<mn>1</mn>
|
1488
|
+
</mrow>
|
1489
|
+
<mrow>
|
1490
|
+
<mi>r</mi>
|
1491
|
+
</mrow>
|
1492
|
+
</mfrac></math></stem>
|
1493
|
+
</p>
|
1494
|
+
</sections>
|
1495
|
+
</standard-document>
|
1497
1496
|
OUTPUT
|
1498
1497
|
end
|
1499
1498
|
|
1500
|
-
|
1501
|
-
|
1499
|
+
it "cleans up text MathML" do
|
1500
|
+
expect(Asciidoctor::Standoc::Converter.new(nil, backend: :standoc, header_footer: true).cleanup(Nokogiri::XML(<<~"INPUT")).to_xml).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1502
1501
|
#{BLANK_HDR}
|
1503
1502
|
<sections>
|
1504
1503
|
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mi>r</mi></mfrac></math></stem>
|
1505
1504
|
</sections>
|
1506
1505
|
</standard-document>
|
1507
1506
|
INPUT
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
</sections>
|
1512
|
-
|
1513
|
-
|
1514
|
-
</standard-document>
|
1507
|
+
#{BLANK_HDR}
|
1508
|
+
<sections>
|
1509
|
+
<stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mi>r</mi></mfrac></math></stem>
|
1510
|
+
</sections>
|
1511
|
+
</standard-document>
|
1515
1512
|
OUTPUT
|
1516
1513
|
end
|
1517
1514
|
|
1518
|
-
|
1515
|
+
it "renumbers numeric references in Bibliography sequentially" do
|
1519
1516
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1520
1517
|
#{ASCIIDOC_BLANK_HDR}
|
1521
1518
|
|
@@ -1529,37 +1526,37 @@ OUTPUT
|
|
1529
1526
|
* [[[iso124,ISO 124]]] _Standard 124_
|
1530
1527
|
* [[[iso123,1]]] _Standard 123_
|
1531
1528
|
INPUT
|
1532
|
-
|
1533
|
-
<sections><clause id="_" inline-header="false" obligation="normative">
|
1534
|
-
|
1535
|
-
|
1536
|
-
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/></p>
|
1537
|
-
</clause>
|
1538
|
-
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
</bibitem>
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
</bibitem>
|
1557
|
-
</references></bibliography>
|
1558
|
-
|
1559
|
-
OUTPUT
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1529
|
+
#{BLANK_HDR}
|
1530
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
1531
|
+
<title>Clause</title>
|
1532
|
+
<p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
|
1533
|
+
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/></p>
|
1534
|
+
</clause>
|
1535
|
+
</sections><bibliography><references id="_" obligation="informative" normative="false">
|
1536
|
+
<title>Bibliography</title>
|
1537
|
+
<bibitem id="iso124" type="standard">
|
1538
|
+
<title format="text/plain">Standard 124</title>
|
1539
|
+
<docidentifier>ISO 124</docidentifier>
|
1540
|
+
<docnumber>124</docnumber>
|
1541
|
+
<contributor>
|
1542
|
+
<role type="publisher"/>
|
1543
|
+
<organization>
|
1544
|
+
<name>ISO</name>
|
1545
|
+
</organization>
|
1546
|
+
</contributor>
|
1547
|
+
</bibitem>
|
1548
|
+
<bibitem id="iso123">
|
1549
|
+
<formattedref format="application/x-isodoc+xml">
|
1550
|
+
<em>Standard 123</em>
|
1551
|
+
</formattedref>
|
1552
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
1553
|
+
</bibitem>
|
1554
|
+
</references></bibliography>
|
1555
|
+
</standard-document>
|
1556
|
+
OUTPUT
|
1557
|
+
end
|
1558
|
+
|
1559
|
+
it "renumbers numeric references in Bibliography subclauses sequentially" do
|
1563
1560
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1564
1561
|
#{ASCIIDOC_BLANK_HDR}
|
1565
1562
|
|
@@ -1591,815 +1588,808 @@ OUTPUT
|
|
1591
1588
|
* [[[iso128,1]]] _Standard 123_
|
1592
1589
|
|
1593
1590
|
INPUT
|
1594
|
-
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
|
1632
|
-
|
1633
|
-
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
|
1645
|
-
|
1646
|
-
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
|
1665
|
-
OUTPUT
|
1666
|
-
|
1591
|
+
#{BLANK_HDR}
|
1592
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
1593
|
+
<title>Clause</title>
|
1594
|
+
<p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
|
1595
|
+
<eref type="inline" bibitemid="iso124" citeas="ISO 124"/>
|
1596
|
+
<eref type="inline" bibitemid="iso125" citeas="ISO 125"/>
|
1597
|
+
<eref type="inline" bibitemid="iso126" citeas="[4]"/></p>
|
1598
|
+
</clause>
|
1599
|
+
</sections><bibliography><clause id="_" obligation="informative"><title>Bibliography</title><references id="_" obligation="informative" normative="false">
|
1600
|
+
<title>Clause 1</title>
|
1601
|
+
<bibitem id="iso124" type="standard">
|
1602
|
+
<title format="text/plain">Standard 124</title>
|
1603
|
+
<docidentifier>ISO 124</docidentifier>
|
1604
|
+
<docnumber>124</docnumber>
|
1605
|
+
<contributor>
|
1606
|
+
<role type="publisher"/>
|
1607
|
+
<organization>
|
1608
|
+
<name>ISO</name>
|
1609
|
+
</organization>
|
1610
|
+
</contributor>
|
1611
|
+
</bibitem>
|
1612
|
+
<bibitem id="iso123">
|
1613
|
+
<formattedref format="application/x-isodoc+xml">
|
1614
|
+
<em>Standard 123</em>
|
1615
|
+
</formattedref>
|
1616
|
+
<docidentifier type="metanorma">[2]</docidentifier>
|
1617
|
+
</bibitem>
|
1618
|
+
</references>
|
1619
|
+
<references id="_" obligation="informative" normative="false">
|
1620
|
+
<bibitem id="iso125" type="standard">
|
1621
|
+
<title format="text/plain">Standard 124</title>
|
1622
|
+
<docidentifier>ISO 125</docidentifier>
|
1623
|
+
<docnumber>125</docnumber>
|
1624
|
+
<contributor>
|
1625
|
+
<role type="publisher"/>
|
1626
|
+
<organization>
|
1627
|
+
<name>ISO</name>
|
1628
|
+
</organization>
|
1629
|
+
</contributor>
|
1630
|
+
</bibitem>
|
1631
|
+
<bibitem id="iso126">
|
1632
|
+
<formattedref format="application/x-isodoc+xml">
|
1633
|
+
<em>Standard 123</em>
|
1634
|
+
</formattedref>
|
1635
|
+
<docidentifier type="metanorma">[4]</docidentifier>
|
1636
|
+
</bibitem>
|
1637
|
+
</references>
|
1638
|
+
</clause>
|
1639
|
+
<clause id='_' obligation='informative'>
|
1640
|
+
<title>Bibliography Redux</title>
|
1641
|
+
<references id='_' normative='false' obligation='informative'>
|
1642
|
+
<title>Clause 1</title>
|
1643
|
+
<bibitem id='iso127' type='standard'>
|
1644
|
+
<title format='text/plain'>Standard 124</title>
|
1645
|
+
<docidentifier>ISO 124</docidentifier>
|
1646
|
+
<docnumber>124</docnumber>
|
1647
|
+
<contributor>
|
1648
|
+
<role type='publisher'/>
|
1649
|
+
<organization>
|
1650
|
+
<name>ISO</name>
|
1651
|
+
</organization>
|
1652
|
+
</contributor>
|
1653
|
+
</bibitem>
|
1654
|
+
<bibitem id='iso128'>
|
1655
|
+
<formattedref format='application/x-isodoc+xml'>
|
1656
|
+
<em>Standard 123</em>
|
1657
|
+
</formattedref>
|
1658
|
+
<docidentifier type='metanorma'>[6]</docidentifier>
|
1659
|
+
</bibitem>
|
1660
|
+
</references></clause></bibliography>
|
1661
|
+
</standard-document>
|
1662
|
+
OUTPUT
|
1663
|
+
end
|
1667
1664
|
|
1668
|
-
it "removes bibdata bibitem IDs" do
|
1665
|
+
it "removes bibdata bibitem IDs" do
|
1669
1666
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1667
|
+
= Document title
|
1668
|
+
Author
|
1669
|
+
:docfile: test.adoc
|
1670
|
+
:nodoc:
|
1671
|
+
:novalid:
|
1672
|
+
:no-isobib:
|
1673
|
+
:translated-from: IEC 60050-102
|
1677
1674
|
|
1678
|
-
|
1679
|
-
|
1675
|
+
[bibliography]
|
1676
|
+
== Normative References
|
1680
1677
|
|
1681
1678
|
INPUT
|
1682
|
-
|
1683
|
-
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
</standard-document>
|
1712
|
-
OUTPUT
|
1713
|
-
end
|
1679
|
+
<?xml version='1.0' encoding='UTF-8'?>
|
1680
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1681
|
+
<bibdata type='standard'>
|
1682
|
+
<title language='en' format='text/plain'>Document title</title>
|
1683
|
+
<language>en</language>
|
1684
|
+
<script>Latn</script>
|
1685
|
+
<status>
|
1686
|
+
<stage>published</stage>
|
1687
|
+
</status>
|
1688
|
+
<copyright>
|
1689
|
+
<from>#{Date.today.year}</from>
|
1690
|
+
</copyright>
|
1691
|
+
<relation type='translatedFrom'>
|
1692
|
+
<bibitem>
|
1693
|
+
<title>--</title>
|
1694
|
+
<docidentifier>IEC 60050-102</docidentifier>
|
1695
|
+
</bibitem>
|
1696
|
+
</relation>
|
1697
|
+
<ext>
|
1698
|
+
<doctype>article</doctype>
|
1699
|
+
</ext>
|
1700
|
+
</bibdata>
|
1701
|
+
<sections> </sections>
|
1702
|
+
<bibliography>
|
1703
|
+
<references id='_' obligation='informative' normative="true">
|
1704
|
+
<title>Normative references</title>
|
1705
|
+
<p id="_">There are no normative references in this document.</p>
|
1706
|
+
</references>
|
1707
|
+
</bibliography>
|
1708
|
+
</standard-document>
|
1709
|
+
OUTPUT
|
1710
|
+
end
|
1714
1711
|
|
1715
|
-
it "imports boilerplate file" do
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1712
|
+
it "imports boilerplate file" do
|
1713
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1714
|
+
= Document title
|
1715
|
+
Author
|
1716
|
+
:docfile: test.adoc
|
1717
|
+
:nodoc:
|
1718
|
+
:novalid:
|
1719
|
+
:no-isobib:
|
1720
|
+
:docstage: 10
|
1721
|
+
:boilerplate-authority: spec/assets/boilerplate.xml
|
1725
1722
|
|
1726
|
-
|
1723
|
+
== Clause 1
|
1727
1724
|
|
1728
1725
|
INPUT
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
</standard-document>
|
1726
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
1727
|
+
<bibdata type='standard'>
|
1728
|
+
<title language='en' format='text/plain'>Document title</title>
|
1729
|
+
<language>en</language>
|
1730
|
+
<script>Latn</script>
|
1731
|
+
<status>
|
1732
|
+
<stage>10</stage>
|
1733
|
+
</status>
|
1734
|
+
<copyright>
|
1735
|
+
<from>#{Date.today.year}</from>
|
1736
|
+
</copyright>
|
1737
|
+
<ext>
|
1738
|
+
<doctype>article</doctype>
|
1739
|
+
</ext>
|
1740
|
+
</bibdata>
|
1741
|
+
<boilerplate>
|
1742
|
+
<text>10</text>
|
1743
|
+
</boilerplate>
|
1744
|
+
<sections>
|
1745
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1746
|
+
<title>Clause 1</title>
|
1747
|
+
</clause>
|
1748
|
+
</sections>
|
1749
|
+
</standard-document>
|
1753
1750
|
OUTPUT
|
1754
|
-
end
|
1751
|
+
end
|
1755
1752
|
|
1756
|
-
it "sorts symbols lists" do
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
<dd>
|
1778
|
-
|
1779
|
-
</dd>
|
1780
|
-
<dt>
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
</dt>
|
1787
|
-
<dd>
|
1788
|
-
|
1789
|
-
</dd>
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
</standard-document>
|
1814
|
-
|
1815
|
-
end
|
1753
|
+
it "sorts symbols lists" do
|
1754
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1755
|
+
#{ASCIIDOC_BLANK_HDR}
|
1756
|
+
|
1757
|
+
[[L]]
|
1758
|
+
== Symbols and abbreviated terms
|
1759
|
+
|
1760
|
+
α:: Definition 1
|
1761
|
+
Xa:: Definition 2
|
1762
|
+
x_1_:: Definition 3
|
1763
|
+
x_m_:: Definition 4
|
1764
|
+
x:: Definition 5
|
1765
|
+
stem:[n]:: Definition 6
|
1766
|
+
m:: Definition 7
|
1767
|
+
INPUT
|
1768
|
+
#{BLANK_HDR}
|
1769
|
+
<sections>
|
1770
|
+
<definitions id='L' obligation="normative">
|
1771
|
+
<title>Symbols and abbreviated terms</title>
|
1772
|
+
<dl id='_'>
|
1773
|
+
<dt>m</dt>
|
1774
|
+
<dd>
|
1775
|
+
<p id='_'>Definition 7</p>
|
1776
|
+
</dd>
|
1777
|
+
<dt>
|
1778
|
+
<stem type='MathML'>
|
1779
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1780
|
+
<mi>n</mi>
|
1781
|
+
</math>
|
1782
|
+
</stem>
|
1783
|
+
</dt>
|
1784
|
+
<dd>
|
1785
|
+
<p id='_'>Definition 6</p>
|
1786
|
+
</dd>
|
1787
|
+
<dt>x</dt>
|
1788
|
+
<dd>
|
1789
|
+
<p id='_'>Definition 5</p>
|
1790
|
+
</dd>
|
1791
|
+
<dt>x_m_</dt>
|
1792
|
+
<dd>
|
1793
|
+
<p id='_'>Definition 4</p>
|
1794
|
+
</dd>
|
1795
|
+
<dt>x_1_</dt>
|
1796
|
+
<dd>
|
1797
|
+
<p id='_'>Definition 3</p>
|
1798
|
+
</dd>
|
1799
|
+
<dt>Xa</dt>
|
1800
|
+
<dd>
|
1801
|
+
<p id='_'>Definition 2</p>
|
1802
|
+
</dd>
|
1803
|
+
<dt>α</dt>
|
1804
|
+
<dd>
|
1805
|
+
<p id='_'>Definition 1</p>
|
1806
|
+
</dd>
|
1807
|
+
</dl>
|
1808
|
+
</definitions>
|
1809
|
+
</sections>
|
1810
|
+
</standard-document>
|
1811
|
+
OUTPUT
|
1812
|
+
end
|
1813
|
+
|
1814
|
+
it "sorts symbols lists" do
|
1815
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1816
|
+
#{ASCIIDOC_BLANK_HDR}
|
1817
|
+
|
1818
|
+
[[L]]
|
1819
|
+
== Symbols and abbreviated terms
|
1816
1820
|
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
<
|
1837
|
-
|
1838
|
-
|
1839
|
-
<
|
1821
|
+
stem:[alpha]:: Definition 1
|
1822
|
+
xa:: Definition 2
|
1823
|
+
stem:[x_1]:: Definition 3
|
1824
|
+
stem:[x_m]:: Definition 4
|
1825
|
+
x:: Definition 5
|
1826
|
+
INPUT
|
1827
|
+
#{BLANK_HDR}
|
1828
|
+
<sections>
|
1829
|
+
<definitions id='L' obligation="normative">
|
1830
|
+
<title>Symbols and abbreviated terms</title>
|
1831
|
+
<dl id='_'>
|
1832
|
+
<dt>x</dt>
|
1833
|
+
<dd>
|
1834
|
+
<p id='_'>Definition 5</p>
|
1835
|
+
</dd>
|
1836
|
+
<dt><stem type='MathML'>
|
1837
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1838
|
+
<msub>
|
1839
|
+
<mrow>
|
1840
|
+
<mi>x</mi>
|
1841
|
+
</mrow>
|
1842
|
+
<mrow>
|
1843
|
+
<mi>m</mi>
|
1844
|
+
</mrow>
|
1845
|
+
</msub>
|
1846
|
+
</math>
|
1847
|
+
</stem></dt>
|
1848
|
+
<dd>
|
1849
|
+
<p id='_'>Definition 4</p>
|
1850
|
+
</dd>
|
1851
|
+
<dt><stem type='MathML'>
|
1852
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1853
|
+
<msub>
|
1854
|
+
<mrow>
|
1855
|
+
<mi>x</mi>
|
1856
|
+
</mrow>
|
1857
|
+
<mrow>
|
1858
|
+
<mn>1</mn>
|
1859
|
+
</mrow>
|
1860
|
+
</msub>
|
1861
|
+
</math>
|
1862
|
+
</stem></dt>
|
1863
|
+
<dd>
|
1864
|
+
<p id='_'>Definition 3</p>
|
1865
|
+
</dd>
|
1866
|
+
<dt>xa</dt>
|
1867
|
+
<dd>
|
1868
|
+
<p id='_'>Definition 2</p>
|
1869
|
+
</dd>
|
1870
|
+
<dt>
|
1871
|
+
<stem type='MathML'>
|
1840
1872
|
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
</
|
1845
|
-
<
|
1846
|
-
|
1847
|
-
</
|
1848
|
-
|
1849
|
-
</
|
1850
|
-
</
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
<dt><stem type='MathML'>
|
1855
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1856
|
-
<msub>
|
1857
|
-
<mrow>
|
1858
|
-
<mi>x</mi>
|
1859
|
-
</mrow>
|
1860
|
-
<mrow>
|
1861
|
-
<mn>1</mn>
|
1862
|
-
</mrow>
|
1863
|
-
</msub>
|
1864
|
-
</math>
|
1865
|
-
</stem></dt>
|
1866
|
-
<dd>
|
1867
|
-
<p id='_'>Definition 3</p>
|
1868
|
-
</dd>
|
1869
|
-
<dt>xa</dt>
|
1870
|
-
<dd>
|
1871
|
-
<p id='_'>Definition 2</p>
|
1872
|
-
</dd>
|
1873
|
-
<dt>
|
1874
|
-
<stem type='MathML'>
|
1875
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1876
|
-
<mi>α</mi>
|
1877
|
-
</math>
|
1878
|
-
</stem>
|
1879
|
-
</dt>
|
1880
|
-
<dd>
|
1881
|
-
<p id='_'>Definition 1</p>
|
1882
|
-
</dd>
|
1883
|
-
</dl>
|
1884
|
-
</definitions>
|
1885
|
-
</sections>
|
1886
|
-
</standard-document>
|
1887
|
-
OUTPUT
|
1888
|
-
end
|
1873
|
+
<mi>α</mi>
|
1874
|
+
</math>
|
1875
|
+
</stem>
|
1876
|
+
</dt>
|
1877
|
+
<dd>
|
1878
|
+
<p id='_'>Definition 1</p>
|
1879
|
+
</dd>
|
1880
|
+
</dl>
|
1881
|
+
</definitions>
|
1882
|
+
</sections>
|
1883
|
+
</standard-document>
|
1884
|
+
OUTPUT
|
1885
|
+
end
|
1889
1886
|
|
1890
|
-
it "moves inherit macros to correct location" do
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
== Clause
|
1895
|
-
|
1896
|
-
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
1897
|
-
.Title
|
1898
|
-
====
|
1899
|
-
inherit:[A]
|
1900
|
-
inherit:[B]
|
1901
|
-
I recommend this
|
1902
|
-
====
|
1903
|
-
|
1904
|
-
[.requirement,subsequence="A",classification="X:Y"]
|
1905
|
-
.Title
|
1906
|
-
====
|
1907
|
-
inherit:[A]
|
1908
|
-
I recommend this
|
1909
|
-
====
|
1910
|
-
|
1911
|
-
[.requirement,subsequence="A"]
|
1912
|
-
.Title
|
1913
|
-
====
|
1914
|
-
inherit:[A]
|
1915
|
-
I recommend this
|
1916
|
-
====
|
1917
|
-
|
1918
|
-
[.requirement,subsequence="A"]
|
1919
|
-
.Title
|
1920
|
-
====
|
1921
|
-
inherit:[A]
|
1922
|
-
====
|
1923
|
-
|
1924
|
-
|
1925
|
-
INPUT
|
1926
|
-
#{BLANK_HDR}
|
1927
|
-
<sections>
|
1928
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
1929
|
-
<title>Clause</title>
|
1930
|
-
<requirement id='_' subsequence='A'>
|
1931
|
-
<title>Title</title>
|
1932
|
-
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1933
|
-
<inherit>A</inherit>
|
1934
|
-
<inherit>B</inherit>
|
1935
|
-
<description>
|
1936
|
-
<p id='_'> I recommend this</p>
|
1937
|
-
</description>
|
1938
|
-
</requirement>
|
1939
|
-
<requirement id='_' subsequence='A'>
|
1940
|
-
<title>Title</title>
|
1941
|
-
<inherit>A</inherit>
|
1942
|
-
<classification>
|
1943
|
-
<tag>X</tag>
|
1944
|
-
<value>Y</value>
|
1945
|
-
</classification>
|
1946
|
-
<description>
|
1947
|
-
<p id='_'> I recommend this</p>
|
1948
|
-
</description>
|
1949
|
-
</requirement>
|
1950
|
-
<requirement id='_' subsequence='A'>
|
1951
|
-
<title>Title</title>
|
1952
|
-
<inherit>A</inherit>
|
1953
|
-
<description>
|
1954
|
-
<p id='_'> I recommend this</p>
|
1955
|
-
</description>
|
1956
|
-
</requirement>
|
1957
|
-
<requirement id='_' subsequence='A'>
|
1958
|
-
<title>Title</title>
|
1959
|
-
<inherit>A</inherit>
|
1960
|
-
<description>
|
1961
|
-
<p id='_'> </p>
|
1962
|
-
</description>
|
1963
|
-
</requirement>
|
1964
|
-
</clause>
|
1965
|
-
</sections>
|
1966
|
-
</standard-document>
|
1967
|
-
OUTPUT
|
1968
|
-
end
|
1887
|
+
it "moves inherit macros to correct location" do
|
1888
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1889
|
+
#{ASCIIDOC_BLANK_HDR}
|
1969
1890
|
|
1970
|
-
|
1971
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1972
|
-
#{ASCIIDOC_BLANK_HDR}
|
1973
|
-
|
1974
|
-
.Foreword
|
1975
|
-
Foreword
|
1976
|
-
|
1977
|
-
[NOTE,beforeclauses=true]
|
1978
|
-
====
|
1979
|
-
Note which is very important
|
1980
|
-
====
|
1981
|
-
|
1982
|
-
== Introduction
|
1983
|
-
Introduction
|
1984
|
-
|
1985
|
-
== Scope
|
1986
|
-
Scope statement
|
1987
|
-
|
1988
|
-
[IMPORTANT,beforeclauses=true]
|
1989
|
-
====
|
1990
|
-
Notice which is very important
|
1991
|
-
====
|
1992
|
-
INPUT
|
1993
|
-
#{BLANK_HDR}
|
1994
|
-
<preface>
|
1995
|
-
<note id='_'>
|
1996
|
-
<p id='_'>Note which is very important</p>
|
1997
|
-
</note>
|
1998
|
-
<foreword id='_' obligation='informative'>
|
1999
|
-
<title>Foreword</title>
|
2000
|
-
<p id='_'>Foreword</p>
|
2001
|
-
</foreword>
|
2002
|
-
<introduction id='_' obligation='informative'>
|
2003
|
-
<title>Introduction</title>
|
2004
|
-
<p id='_'>Introduction</p>
|
2005
|
-
</introduction>
|
2006
|
-
</preface>
|
2007
|
-
<sections>
|
2008
|
-
<admonition id='_' type='important'>
|
2009
|
-
<p id='_'>Notice which is very important</p>
|
2010
|
-
</admonition>
|
2011
|
-
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
2012
|
-
<title>Scope</title>
|
2013
|
-
<p id='_'>Scope statement</p>
|
2014
|
-
</clause>
|
2015
|
-
</sections>
|
2016
|
-
</standard-document>
|
2017
|
-
|
2018
|
-
OUTPUT
|
2019
|
-
end
|
1891
|
+
== Clause
|
2020
1892
|
|
1893
|
+
[.requirement,subsequence="A",inherit="/ss/584/2015/level/1 & /ss/584/2015/level/2"]
|
1894
|
+
.Title
|
1895
|
+
====
|
1896
|
+
inherit:[A]
|
1897
|
+
inherit:[B]
|
1898
|
+
I recommend this
|
1899
|
+
====
|
2021
1900
|
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
<</:ab>>
|
2029
|
-
<<:>>
|
2030
|
-
<<1>>
|
2031
|
-
<<1:>>
|
2032
|
-
<<1#b>>
|
2033
|
-
<<:a#b:>>
|
2034
|
-
<</%ab>>
|
2035
|
-
<<1!>>
|
2036
|
-
|
2037
|
-
INPUT
|
2038
|
-
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true).gsub(/<p id="_[^"]+">/, "").gsub('</p>', ""))).to be_equivalent_to (<<~"OUTPUT")
|
2039
|
-
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2040
|
-
<bibdata type='standard'>
|
2041
|
-
<title language='en' format='text/plain'>Document title</title>
|
2042
|
-
<language>en</language>
|
2043
|
-
<script>Latn</script>
|
2044
|
-
<status>
|
2045
|
-
<stage>published</stage>
|
2046
|
-
</status>
|
2047
|
-
<copyright>
|
2048
|
-
<from>#{Time.now.year}</from>
|
2049
|
-
</copyright>
|
2050
|
-
<ext>
|
2051
|
-
<doctype>article</doctype>
|
2052
|
-
</ext>
|
2053
|
-
</bibdata>
|
2054
|
-
<sections>
|
2055
|
-
<clause id='a_b' inline-header='false' obligation='normative'>
|
2056
|
-
<title>A</title>
|
2057
|
-
<eref bibitemid='__ab' citeas=''/>
|
2058
|
-
<xref target='_'/>
|
2059
|
-
<xref target='_1'/>
|
2060
|
-
<xref target='_1_'/>
|
2061
|
-
<xref target='1#b'/>
|
2062
|
-
<xref target='_a#b_'/>
|
2063
|
-
<xref target='_%ab'/>
|
2064
|
-
<xref target='_1_'/>
|
2065
|
-
</clause>
|
2066
|
-
</sections>
|
2067
|
-
<bibliography>
|
2068
|
-
<references hidden='true' normative='false'>
|
2069
|
-
<bibitem id='__ab' type='internal'>
|
2070
|
-
<docidentifier type='repository'>//ab</docidentifier>
|
2071
|
-
</bibitem>
|
2072
|
-
</references>
|
2073
|
-
</bibliography>
|
2074
|
-
</standard-document>
|
2075
|
-
OUTPUT
|
2076
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <clause id="a_b" inline-header="false" obligation="normative"/> from a:b}).to_stderr
|
2077
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <eref bibitemid="__ab" citeas=""/> from /_ab}).to_stderr
|
2078
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_"/> from :}).to_stderr
|
2079
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_1"/> from 1}).to_stderr
|
2080
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_1_"/> from 1:}).to_stderr
|
2081
|
-
expect{Asciidoctor.convert(input, backend: :standoc, header_footer: true)}.to output(%r{normalised identifier in <xref target="_a#b_"/> from :a#b:}).to_stderr
|
2082
|
-
end
|
1901
|
+
[.requirement,subsequence="A",classification="X:Y"]
|
1902
|
+
.Title
|
1903
|
+
====
|
1904
|
+
inherit:[A]
|
1905
|
+
I recommend this
|
1906
|
+
====
|
2083
1907
|
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
:novalid:
|
2091
|
-
:no-isobib:
|
2092
|
-
|
2093
|
-
INPUT
|
2094
|
-
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2095
|
-
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2096
|
-
<bibdata type='standard'>
|
2097
|
-
<title language='en' format='text/plain'>Document title</title>
|
2098
|
-
<note type='title-footnote'>
|
2099
|
-
<p>ABC</p>
|
2100
|
-
</note>
|
2101
|
-
<note type='title-footnote'>
|
2102
|
-
<p>DEF</p>
|
2103
|
-
</note>
|
2104
|
-
<language>en</language>
|
2105
|
-
<script>Latn</script>
|
2106
|
-
<status>
|
2107
|
-
<stage>published</stage>
|
2108
|
-
</status>
|
2109
|
-
<copyright>
|
2110
|
-
<from>#{Time.now.year}</from>
|
2111
|
-
</copyright>
|
2112
|
-
<ext>
|
2113
|
-
<doctype>article</doctype>
|
2114
|
-
</ext>
|
2115
|
-
</bibdata>
|
2116
|
-
<sections> </sections>
|
2117
|
-
</standard-document>
|
2118
|
-
OUTPUT
|
1908
|
+
[.requirement,subsequence="A"]
|
1909
|
+
.Title
|
1910
|
+
====
|
1911
|
+
inherit:[A]
|
1912
|
+
I recommend this
|
1913
|
+
====
|
2119
1914
|
|
2120
|
-
|
1915
|
+
[.requirement,subsequence="A"]
|
1916
|
+
.Title
|
1917
|
+
====
|
1918
|
+
inherit:[A]
|
1919
|
+
====
|
1920
|
+
|
1921
|
+
|
1922
|
+
INPUT
|
1923
|
+
#{BLANK_HDR}
|
1924
|
+
<sections>
|
1925
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
1926
|
+
<title>Clause</title>
|
1927
|
+
<requirement id='_' subsequence='A'>
|
1928
|
+
<title>Title</title>
|
1929
|
+
<inherit>/ss/584/2015/level/1 & /ss/584/2015/level/2</inherit>
|
1930
|
+
<inherit>A</inherit>
|
1931
|
+
<inherit>B</inherit>
|
1932
|
+
<description>
|
1933
|
+
<p id='_'> I recommend this</p>
|
1934
|
+
</description>
|
1935
|
+
</requirement>
|
1936
|
+
<requirement id='_' subsequence='A'>
|
1937
|
+
<title>Title</title>
|
1938
|
+
<inherit>A</inherit>
|
1939
|
+
<classification>
|
1940
|
+
<tag>X</tag>
|
1941
|
+
<value>Y</value>
|
1942
|
+
</classification>
|
1943
|
+
<description>
|
1944
|
+
<p id='_'> I recommend this</p>
|
1945
|
+
</description>
|
1946
|
+
</requirement>
|
1947
|
+
<requirement id='_' subsequence='A'>
|
1948
|
+
<title>Title</title>
|
1949
|
+
<inherit>A</inherit>
|
1950
|
+
<description>
|
1951
|
+
<p id='_'> I recommend this</p>
|
1952
|
+
</description>
|
1953
|
+
</requirement>
|
1954
|
+
<requirement id='_' subsequence='A'>
|
1955
|
+
<title>Title</title>
|
1956
|
+
<inherit>A</inherit>
|
1957
|
+
<description>
|
1958
|
+
<p id='_'> </p>
|
1959
|
+
</description>
|
1960
|
+
</requirement>
|
1961
|
+
</clause>
|
1962
|
+
</sections>
|
1963
|
+
</standard-document>
|
1964
|
+
OUTPUT
|
1965
|
+
end
|
1966
|
+
|
1967
|
+
it "moves %beforeclause admonitions to right position" do
|
1968
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1969
|
+
#{ASCIIDOC_BLANK_HDR}
|
1970
|
+
|
1971
|
+
.Foreword
|
1972
|
+
Foreword
|
1973
|
+
|
1974
|
+
[NOTE,beforeclauses=true]
|
1975
|
+
====
|
1976
|
+
Note which is very important
|
1977
|
+
====
|
1978
|
+
|
1979
|
+
== Introduction
|
1980
|
+
Introduction
|
1981
|
+
|
1982
|
+
== Scope
|
1983
|
+
Scope statement
|
2121
1984
|
|
2122
|
-
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
|
2127
|
-
|
2128
|
-
|
2129
|
-
|
2130
|
-
<
|
2131
|
-
|
2132
|
-
|
2133
|
-
|
2134
|
-
|
2135
|
-
|
2136
|
-
|
2137
|
-
|
2138
|
-
</
|
2139
|
-
|
2140
|
-
|
2141
|
-
|
2142
|
-
<
|
2143
|
-
|
2144
|
-
|
2145
|
-
|
2146
|
-
|
2147
|
-
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
|
1985
|
+
[IMPORTANT,beforeclauses=true]
|
1986
|
+
====
|
1987
|
+
Notice which is very important
|
1988
|
+
====
|
1989
|
+
INPUT
|
1990
|
+
#{BLANK_HDR}
|
1991
|
+
<preface>
|
1992
|
+
<note id='_'>
|
1993
|
+
<p id='_'>Note which is very important</p>
|
1994
|
+
</note>
|
1995
|
+
<foreword id='_' obligation='informative'>
|
1996
|
+
<title>Foreword</title>
|
1997
|
+
<p id='_'>Foreword</p>
|
1998
|
+
</foreword>
|
1999
|
+
<introduction id='_' obligation='informative'>
|
2000
|
+
<title>Introduction</title>
|
2001
|
+
<p id='_'>Introduction</p>
|
2002
|
+
</introduction>
|
2003
|
+
</preface>
|
2004
|
+
<sections>
|
2005
|
+
<admonition id='_' type='important'>
|
2006
|
+
<p id='_'>Notice which is very important</p>
|
2007
|
+
</admonition>
|
2008
|
+
<clause id='_' inline-header='false' obligation='normative' type="scope">
|
2009
|
+
<title>Scope</title>
|
2010
|
+
<p id='_'>Scope statement</p>
|
2011
|
+
</clause>
|
2012
|
+
</sections>
|
2013
|
+
</standard-document>
|
2014
|
+
OUTPUT
|
2015
|
+
end
|
2016
|
+
|
2017
|
+
it "fixes illegal anchors" do
|
2018
|
+
input = <<~INPUT
|
2019
|
+
#{ASCIIDOC_BLANK_HDR}
|
2020
|
+
|
2021
|
+
[[a:b]]
|
2022
|
+
== A
|
2023
|
+
<</:ab>>
|
2024
|
+
<<:>>
|
2025
|
+
<<1>>
|
2026
|
+
<<1:>>
|
2027
|
+
<<1#b>>
|
2028
|
+
<<:a#b:>>
|
2029
|
+
<</%ab>>
|
2030
|
+
<<1!>>
|
2031
|
+
INPUT
|
2032
|
+
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true).gsub(/<p id="_[^"]+">/, "").gsub("</p>", ""))).to be_equivalent_to (<<~"OUTPUT")
|
2033
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2034
|
+
<bibdata type='standard'>
|
2035
|
+
<title language='en' format='text/plain'>Document title</title>
|
2036
|
+
<language>en</language>
|
2037
|
+
<script>Latn</script>
|
2038
|
+
<status>
|
2039
|
+
<stage>published</stage>
|
2040
|
+
</status>
|
2041
|
+
<copyright>
|
2042
|
+
<from>#{Time.now.year}</from>
|
2043
|
+
</copyright>
|
2044
|
+
<ext>
|
2045
|
+
<doctype>article</doctype>
|
2046
|
+
</ext>
|
2047
|
+
</bibdata>
|
2048
|
+
<sections>
|
2049
|
+
<clause id='a_b' inline-header='false' obligation='normative'>
|
2050
|
+
<title>A</title>
|
2051
|
+
<eref bibitemid='__ab' citeas=''/>
|
2052
|
+
<xref target='_'/>
|
2053
|
+
<xref target='_1'/>
|
2054
|
+
<xref target='_1_'/>
|
2055
|
+
<xref target='1#b'/>
|
2056
|
+
<xref target='_a#b_'/>
|
2057
|
+
<xref target='_%ab'/>
|
2058
|
+
<xref target='_1_'/>
|
2059
|
+
</clause>
|
2060
|
+
</sections>
|
2061
|
+
<bibliography>
|
2062
|
+
<references hidden='true' normative='false'>
|
2063
|
+
<bibitem id='__ab' type='internal'>
|
2064
|
+
<docidentifier type='repository'>//ab</docidentifier>
|
2065
|
+
</bibitem>
|
2066
|
+
</references>
|
2067
|
+
</bibliography>
|
2068
|
+
</standard-document>
|
2069
|
+
OUTPUT
|
2070
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <clause id="a_b" inline-header="false" obligation="normative"/> from a:b}).to_stderr
|
2071
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <eref bibitemid="__ab" citeas=""/> from /_ab}).to_stderr
|
2072
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_"/> from :}).to_stderr
|
2073
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_1"/> from 1}).to_stderr
|
2074
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_1_"/> from 1:}).to_stderr
|
2075
|
+
expect { Asciidoctor.convert(input, backend: :standoc, header_footer: true) }.to output(%r{normalised identifier in <xref target="_a#b_"/> from :a#b:}).to_stderr
|
2076
|
+
end
|
2077
|
+
|
2078
|
+
it "moves title footnotes to bibdata" do
|
2079
|
+
input = <<~INPUT
|
2080
|
+
= Document title footnote:[ABC] footnote:[DEF]
|
2081
|
+
Author
|
2082
|
+
:docfile: test.adoc
|
2083
|
+
:nodoc:
|
2084
|
+
:novalid:
|
2085
|
+
:no-isobib:
|
2086
|
+
|
2087
|
+
INPUT
|
2088
|
+
expect(xmlpp(Asciidoctor.convert(input, backend: :standoc, header_footer: true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2089
|
+
<standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
|
2090
|
+
<bibdata type='standard'>
|
2091
|
+
<title language='en' format='text/plain'>Document title</title>
|
2092
|
+
<note type='title-footnote'>
|
2093
|
+
<p>ABC</p>
|
2094
|
+
</note>
|
2095
|
+
<note type='title-footnote'>
|
2096
|
+
<p>DEF</p>
|
2097
|
+
</note>
|
2098
|
+
<language>en</language>
|
2099
|
+
<script>Latn</script>
|
2100
|
+
<status>
|
2101
|
+
<stage>published</stage>
|
2102
|
+
</status>
|
2103
|
+
<copyright>
|
2104
|
+
<from>#{Time.now.year}</from>
|
2105
|
+
</copyright>
|
2106
|
+
<ext>
|
2107
|
+
<doctype>article</doctype>
|
2108
|
+
</ext>
|
2109
|
+
</bibdata>
|
2110
|
+
<sections> </sections>
|
2111
|
+
</standard-document>
|
2112
|
+
OUTPUT
|
2113
|
+
end
|
2114
|
+
|
2115
|
+
it "converts UnitsML to MathML" do
|
2116
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~INPUT, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2117
|
+
= Document title
|
2118
|
+
Author
|
2119
|
+
:stem:
|
2120
|
+
|
2121
|
+
[stem]
|
2122
|
+
++++
|
2123
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2124
|
+
<mrow>
|
2125
|
+
<mn>7</mn>
|
2126
|
+
<mtext>unitsml(m*kg^-2)</mtext>
|
2127
|
+
<mo>+</mo>
|
2128
|
+
<mn>8</mn>
|
2129
|
+
<mtext>unitsml(m*kg^-2)</mtext>
|
2130
|
+
</mrow>
|
2131
|
+
</math>
|
2132
|
+
++++
|
2133
|
+
INPUT
|
2134
|
+
#{BLANK_HDR}
|
2135
|
+
<misc-container>
|
2136
|
+
<UnitsML xmlns='https://schema.unitsml.org/unitsml/1.0'>
|
2137
|
+
<UnitSet>
|
2138
|
+
<Unit xml:id='U_m.kg-2' dimensionURL='#D_LM-2'>
|
2139
|
+
<UnitSystem name='SI' type='SI_derived' xml:lang='en-US'/>
|
2140
|
+
<UnitName xml:lang='en'>m*kg^-2</UnitName>
|
2141
|
+
<UnitSymbol type='HTML'>
|
2142
|
+
m kg
|
2143
|
+
<sup>−2</sup>
|
2144
|
+
</UnitSymbol>
|
2145
|
+
<UnitSymbol type='MathML'>
|
2146
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2147
|
+
<mrow>
|
2148
|
+
<mi mathvariant='normal'>m</mi>
|
2149
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2150
|
+
<msup>
|
2151
|
+
<mrow>
|
2152
|
+
<mi mathvariant='normal'>kg</mi>
|
2153
|
+
</mrow>
|
2154
|
+
<mrow>
|
2155
|
+
<mo>−</mo>
|
2156
|
+
<mn>2</mn>
|
2157
|
+
</mrow>
|
2158
|
+
</msup>
|
2159
|
+
</mrow>
|
2160
|
+
</math>
|
2161
|
+
</UnitSymbol>
|
2162
|
+
<RootUnits>
|
2163
|
+
<EnumeratedRootUnit unit='meter'/>
|
2164
|
+
<EnumeratedRootUnit unit='gram' prefix='k' powerNumerator='-2'/>
|
2165
|
+
</RootUnits>
|
2166
|
+
</Unit>
|
2167
|
+
</UnitSet>
|
2168
|
+
<DimensionSet>
|
2169
|
+
<Dimension xml:id='D_LM-2'>
|
2170
|
+
<Length symbol='L' powerNumerator='1'/>
|
2171
|
+
<Mass symbol='M' powerNumerator='-2'/>
|
2172
|
+
</Dimension>
|
2173
|
+
</DimensionSet>
|
2174
|
+
<PrefixSet>
|
2175
|
+
<Prefix prefixBase='10' prefixPower='3' xml:id='NISTp10_3'>
|
2176
|
+
<PrefixName xml:lang='en'>kilo</PrefixName>
|
2177
|
+
<PrefixSymbol type='ASCII'>k</PrefixSymbol>
|
2178
|
+
<PrefixSymbol type='unicode'>k</PrefixSymbol>
|
2179
|
+
<PrefixSymbol type='LaTeX'>k</PrefixSymbol>
|
2180
|
+
<PrefixSymbol type='HTML'>k</PrefixSymbol>
|
2181
|
+
</Prefix>
|
2182
|
+
</PrefixSet>
|
2183
|
+
</UnitsML>
|
2184
|
+
</misc-container>
|
2185
|
+
<sections>
|
2186
|
+
<formula id='_'>
|
2187
|
+
<stem type='MathML'>
|
2188
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2189
|
+
<mrow>
|
2190
|
+
<mn>7</mn>
|
2191
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2192
|
+
<mrow xref='U_m.kg-2'>
|
2193
|
+
<mi mathvariant='normal'>m</mi>
|
2194
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2195
|
+
<msup>
|
2196
|
+
<mrow>
|
2197
|
+
<mi mathvariant='normal'>kg</mi>
|
2198
|
+
</mrow>
|
2199
|
+
<mrow>
|
2200
|
+
<mo>−</mo>
|
2201
|
+
<mn>2</mn>
|
2202
|
+
</mrow>
|
2203
|
+
</msup>
|
2160
2204
|
</mrow>
|
2161
|
-
<
|
2162
|
-
|
2163
|
-
|
2205
|
+
<mo>+</mo>
|
2206
|
+
<mn>8</mn>
|
2207
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2208
|
+
<mrow xref='U_m.kg-2'>
|
2209
|
+
<mi mathvariant='normal'>m</mi>
|
2210
|
+
<mo rspace='thickmathspace'>⁢</mo>
|
2211
|
+
<msup>
|
2212
|
+
<mrow>
|
2213
|
+
<mi mathvariant='normal'>kg</mi>
|
2214
|
+
</mrow>
|
2215
|
+
<mrow>
|
2216
|
+
<mo>−</mo>
|
2217
|
+
<mn>2</mn>
|
2218
|
+
</mrow>
|
2219
|
+
</msup>
|
2164
2220
|
</mrow>
|
2165
|
-
</msup>
|
2166
|
-
</mrow>
|
2167
|
-
</math>
|
2168
|
-
</UnitSymbol>
|
2169
|
-
<RootUnits>
|
2170
|
-
<EnumeratedRootUnit unit='meter'/>
|
2171
|
-
<EnumeratedRootUnit unit='gram' prefix='k' powerNumerator='-2'/>
|
2172
|
-
</RootUnits>
|
2173
|
-
</Unit>
|
2174
|
-
</UnitSet>
|
2175
|
-
<DimensionSet>
|
2176
|
-
<Dimension xml:id='D_LM-2'>
|
2177
|
-
<Length symbol='L' powerNumerator='1'/>
|
2178
|
-
<Mass symbol='M' powerNumerator='-2'/>
|
2179
|
-
</Dimension>
|
2180
|
-
</DimensionSet>
|
2181
|
-
<PrefixSet>
|
2182
|
-
<Prefix prefixBase='10' prefixPower='3' xml:id='NISTp10_3'>
|
2183
|
-
<PrefixName xml:lang='en'>kilo</PrefixName>
|
2184
|
-
<PrefixSymbol type='ASCII'>k</PrefixSymbol>
|
2185
|
-
<PrefixSymbol type='unicode'>k</PrefixSymbol>
|
2186
|
-
<PrefixSymbol type='LaTeX'>k</PrefixSymbol>
|
2187
|
-
<PrefixSymbol type='HTML'>k</PrefixSymbol>
|
2188
|
-
</Prefix>
|
2189
|
-
</PrefixSet>
|
2190
|
-
</UnitsML>
|
2191
|
-
</misc-container>
|
2192
|
-
<sections>
|
2193
|
-
<formula id='_'>
|
2194
|
-
<stem type='MathML'>
|
2195
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2196
|
-
<mrow>
|
2197
|
-
<mn>7</mn>
|
2198
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2199
|
-
<mrow xref='U_m.kg-2'>
|
2200
|
-
<mi mathvariant='normal'>m</mi>
|
2201
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2202
|
-
<msup>
|
2203
|
-
<mrow>
|
2204
|
-
<mi mathvariant='normal'>kg</mi>
|
2205
|
-
</mrow>
|
2206
|
-
<mrow>
|
2207
|
-
<mo>−</mo>
|
2208
|
-
<mn>2</mn>
|
2209
|
-
</mrow>
|
2210
|
-
</msup>
|
2211
|
-
</mrow>
|
2212
|
-
<mo>+</mo>
|
2213
|
-
<mn>8</mn>
|
2214
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2215
|
-
<mrow xref='U_m.kg-2'>
|
2216
|
-
<mi mathvariant='normal'>m</mi>
|
2217
|
-
<mo rspace='thickmathspace'>⁢</mo>
|
2218
|
-
<msup>
|
2219
|
-
<mrow>
|
2220
|
-
<mi mathvariant='normal'>kg</mi>
|
2221
|
-
</mrow>
|
2222
|
-
<mrow>
|
2223
|
-
<mo>−</mo>
|
2224
|
-
<mn>2</mn>
|
2225
2221
|
</mrow>
|
2226
|
-
</
|
2227
|
-
</
|
2228
|
-
</
|
2229
|
-
</
|
2230
|
-
</
|
2231
|
-
|
2232
|
-
|
2233
|
-
</standard-document>
|
2234
|
-
OUTPUT
|
2222
|
+
</math>
|
2223
|
+
</stem>
|
2224
|
+
</formula>
|
2225
|
+
</sections>
|
2226
|
+
</standard-document>
|
2227
|
+
OUTPUT
|
2228
|
+
end
|
2235
2229
|
|
2236
|
-
|
2230
|
+
it "customises italicisation of MathML" do
|
2231
|
+
input = <<~INPUT
|
2232
|
+
= Document title
|
2233
|
+
Author
|
2234
|
+
:stem:
|
2235
|
+
|
2236
|
+
[stem]
|
2237
|
+
++++
|
2238
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2239
|
+
<mi>A</mi>
|
2240
|
+
<mo>+</mo>
|
2241
|
+
<mi>a</mi>
|
2242
|
+
<mo>+</mo>
|
2243
|
+
<mi>Α</mi>
|
2244
|
+
<mo>+</mo>
|
2245
|
+
<mi>α</mi>
|
2246
|
+
<mo>+</mo>
|
2247
|
+
<mi>AB</mi>
|
2248
|
+
<mstyle mathvariant="italic">
|
2249
|
+
<mrow>
|
2250
|
+
<mi>Α</mi>
|
2251
|
+
</mrow>
|
2252
|
+
</mstyle>
|
2253
|
+
</math>
|
2254
|
+
++++
|
2255
|
+
INPUT
|
2237
2256
|
|
2238
|
-
|
2239
|
-
|
2240
|
-
|
2241
|
-
|
2242
|
-
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
<
|
2247
|
-
|
2248
|
-
|
2249
|
-
|
2250
|
-
|
2251
|
-
|
2252
|
-
|
2253
|
-
|
2254
|
-
|
2255
|
-
<mi>AB</mi>
|
2256
|
-
<mstyle mathvariant="italic">
|
2257
|
-
<mrow>
|
2258
|
-
<mi>Α</mi>
|
2259
|
-
</mrow>
|
2260
|
-
</mstyle>
|
2261
|
-
</math>
|
2262
|
-
++++
|
2263
|
-
INPUT
|
2264
|
-
|
2265
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2266
|
-
#{BLANK_HDR}
|
2267
|
-
<sections>
|
2268
|
-
<formula id='_'>
|
2269
|
-
<stem type='MathML'>
|
2270
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2271
|
-
<mi>A</mi>
|
2272
|
-
<mo>+</mo>
|
2273
|
-
<mi>a</mi>
|
2274
|
-
<mo>+</mo>
|
2257
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2258
|
+
#{BLANK_HDR}
|
2259
|
+
<sections>
|
2260
|
+
<formula id='_'>
|
2261
|
+
<stem type='MathML'>
|
2262
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2263
|
+
<mi>A</mi>
|
2264
|
+
<mo>+</mo>
|
2265
|
+
<mi>a</mi>
|
2266
|
+
<mo>+</mo>
|
2267
|
+
<mi>Α</mi>
|
2268
|
+
<mo>+</mo>
|
2269
|
+
<mi>α</mi>
|
2270
|
+
<mo>+</mo>
|
2271
|
+
<mi>AB</mi>
|
2272
|
+
<mstyle mathvariant='italic'>
|
2273
|
+
<mrow>
|
2275
2274
|
<mi>Α</mi>
|
2276
|
-
|
2277
|
-
|
2278
|
-
|
2279
|
-
|
2280
|
-
|
2281
|
-
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2291
|
-
|
2292
|
-
|
2293
|
-
|
2294
|
-
|
2295
|
-
|
2296
|
-
|
2297
|
-
|
2298
|
-
|
2299
|
-
|
2300
|
-
|
2301
|
-
|
2302
|
-
<mi mathvariant="normal">Α</mi>
|
2303
|
-
<mo>+</mo>
|
2304
|
-
<mi>α</mi>
|
2305
|
-
<mo>+</mo>
|
2306
|
-
<mi>AB</mi>
|
2307
|
-
<mstyle mathvariant='italic'>
|
2308
|
-
<mrow>
|
2309
|
-
<mi>Α</mi>
|
2310
|
-
</mrow>
|
2311
|
-
</mstyle>
|
2312
|
-
</math>
|
2313
|
-
</stem>
|
2314
|
-
</formula>
|
2315
|
-
</sections>
|
2316
|
-
</standard-document>
|
2317
|
-
OUTPUT
|
2318
|
-
mock_mathml_italicise({ uppergreek: true, upperroman: false, lowergreek: true, lowerroman: true })
|
2319
|
-
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2320
|
-
#{BLANK_HDR}
|
2321
|
-
<sections>
|
2322
|
-
<formula id='_'>
|
2323
|
-
<stem type='MathML'>
|
2324
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2325
|
-
<mi mathvariant="normal">A</mi>
|
2326
|
-
<mo>+</mo>
|
2327
|
-
<mi>a</mi>
|
2328
|
-
<mo>+</mo>
|
2275
|
+
</mrow>
|
2276
|
+
</mstyle>
|
2277
|
+
</math>
|
2278
|
+
</stem>
|
2279
|
+
</formula>
|
2280
|
+
</sections>
|
2281
|
+
</standard-document>
|
2282
|
+
OUTPUT
|
2283
|
+
mock_mathml_italicise({ uppergreek: false, upperroman: true, lowergreek: true, lowerroman: true })
|
2284
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2285
|
+
#{BLANK_HDR}
|
2286
|
+
<sections>
|
2287
|
+
<formula id='_'>
|
2288
|
+
<stem type='MathML'>
|
2289
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2290
|
+
<mi>A</mi>
|
2291
|
+
<mo>+</mo>
|
2292
|
+
<mi>a</mi>
|
2293
|
+
<mo>+</mo>
|
2294
|
+
<mi mathvariant="normal">Α</mi>
|
2295
|
+
<mo>+</mo>
|
2296
|
+
<mi>α</mi>
|
2297
|
+
<mo>+</mo>
|
2298
|
+
<mi>AB</mi>
|
2299
|
+
<mstyle mathvariant='italic'>
|
2300
|
+
<mrow>
|
2329
2301
|
<mi>Α</mi>
|
2330
|
-
|
2331
|
-
|
2332
|
-
|
2333
|
-
|
2334
|
-
|
2335
|
-
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
|
2344
|
-
|
2345
|
-
|
2346
|
-
|
2347
|
-
|
2348
|
-
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
|
2355
|
-
|
2302
|
+
</mrow>
|
2303
|
+
</mstyle>
|
2304
|
+
</math>
|
2305
|
+
</stem>
|
2306
|
+
</formula>
|
2307
|
+
</sections>
|
2308
|
+
</standard-document>
|
2309
|
+
OUTPUT
|
2310
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: false, lowergreek: true, lowerroman: true })
|
2311
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2312
|
+
#{BLANK_HDR}
|
2313
|
+
<sections>
|
2314
|
+
<formula id='_'>
|
2315
|
+
<stem type='MathML'>
|
2316
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2317
|
+
<mi mathvariant="normal">A</mi>
|
2318
|
+
<mo>+</mo>
|
2319
|
+
<mi>a</mi>
|
2320
|
+
<mo>+</mo>
|
2321
|
+
<mi>Α</mi>
|
2322
|
+
<mo>+</mo>
|
2323
|
+
<mi>α</mi>
|
2324
|
+
<mo>+</mo>
|
2325
|
+
<mi>AB</mi>
|
2326
|
+
<mstyle mathvariant='italic'>
|
2327
|
+
<mrow>
|
2356
2328
|
<mi>Α</mi>
|
2357
|
-
|
2358
|
-
|
2359
|
-
|
2360
|
-
|
2361
|
-
|
2362
|
-
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
|
2369
|
-
|
2370
|
-
|
2371
|
-
|
2372
|
-
|
2373
|
-
|
2374
|
-
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2329
|
+
</mrow>
|
2330
|
+
</mstyle>
|
2331
|
+
</math>
|
2332
|
+
</stem>
|
2333
|
+
</formula>
|
2334
|
+
</sections>
|
2335
|
+
</standard-document>
|
2336
|
+
OUTPUT
|
2337
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: false, lowerroman: true })
|
2338
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2339
|
+
#{BLANK_HDR}
|
2340
|
+
<sections>
|
2341
|
+
<formula id='_'>
|
2342
|
+
<stem type='MathML'>
|
2343
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2344
|
+
<mi>A</mi>
|
2345
|
+
<mo>+</mo>
|
2346
|
+
<mi>a</mi>
|
2347
|
+
<mo>+</mo>
|
2348
|
+
<mi>Α</mi>
|
2349
|
+
<mo>+</mo>
|
2350
|
+
<mi mathvariant="normal">α</mi>
|
2351
|
+
<mo>+</mo>
|
2352
|
+
<mi>AB</mi>
|
2353
|
+
<mstyle mathvariant='italic'>
|
2354
|
+
<mrow>
|
2383
2355
|
<mi>Α</mi>
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2356
|
+
</mrow>
|
2357
|
+
</mstyle>
|
2358
|
+
</math>
|
2359
|
+
</stem>
|
2360
|
+
</formula>
|
2361
|
+
</sections>
|
2362
|
+
</standard-document>
|
2363
|
+
OUTPUT
|
2364
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: false })
|
2365
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2366
|
+
#{BLANK_HDR}
|
2367
|
+
<sections>
|
2368
|
+
<formula id='_'>
|
2369
|
+
<stem type='MathML'>
|
2370
|
+
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
2371
|
+
<mi>A</mi>
|
2372
|
+
<mo>+</mo>
|
2373
|
+
<mi mathvariant="normal">a</mi>
|
2374
|
+
<mo>+</mo>
|
2375
|
+
<mi>Α</mi>
|
2376
|
+
<mo>+</mo>
|
2377
|
+
<mi>α</mi>
|
2378
|
+
<mo>+</mo>
|
2379
|
+
<mi>AB</mi>
|
2380
|
+
<mstyle mathvariant='italic'>
|
2381
|
+
<mrow>
|
2382
|
+
<mi>Α</mi>
|
2383
|
+
</mrow>
|
2384
|
+
</mstyle>
|
2385
|
+
</math>
|
2386
|
+
</stem>
|
2387
|
+
</formula>
|
2388
|
+
</sections>
|
2389
|
+
</standard-document>
|
2390
|
+
OUTPUT
|
2391
|
+
mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: true })
|
2392
|
+
end
|
2403
2393
|
|
2404
2394
|
it "process express_ref macro with existing bibliography" do
|
2405
2395
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -2422,48 +2412,47 @@ end
|
|
2422
2412
|
== Bibliography
|
2423
2413
|
* [[[D,E]]] F
|
2424
2414
|
INPUT
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
2432
|
-
|
2433
|
-
|
2434
|
-
|
2435
|
-
|
2436
|
-
|
2437
|
-
|
2438
|
-
<xref target='action'>** Missing target action.AB</xref>
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
</clause>
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
</standard-document>
|
2415
|
+
#{BLANK_HDR}
|
2416
|
+
<sections>
|
2417
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
2418
|
+
<title>Clause</title>
|
2419
|
+
<p id='_'>
|
2420
|
+
<eref bibitemid='uml_A' citeas="">
|
2421
|
+
<localityStack>
|
2422
|
+
<locality type='anchor'><referenceFrom>A.B.C</referenceFrom></locality>
|
2423
|
+
</localityStack>
|
2424
|
+
C
|
2425
|
+
</eref>
|
2426
|
+
<eref bibitemid='uml_A' citeas=""/>
|
2427
|
+
<xref target='action.AA'>AA</xref>
|
2428
|
+
<xref target='action'>** Missing target action.AB</xref>
|
2429
|
+
</p>
|
2430
|
+
</clause>
|
2431
|
+
<clause id='action' type='express-schema' inline-header='false' obligation='normative'>
|
2432
|
+
<title>Action</title>
|
2433
|
+
<clause id='action.AA' inline-header='false' obligation='normative'>
|
2434
|
+
<title>AA</title>
|
2435
|
+
</clause>
|
2436
|
+
</clause>
|
2437
|
+
</sections>
|
2438
|
+
<bibliography>
|
2439
|
+
<references id='_' normative='false' obligation='informative'>
|
2440
|
+
<title>Bibliography</title>
|
2441
|
+
<bibitem id='D'>
|
2442
|
+
<formattedref format='application/x-isodoc+xml'>F</formattedref>
|
2443
|
+
<docidentifier>E</docidentifier>
|
2444
|
+
</bibitem>
|
2445
|
+
</references>
|
2446
|
+
<references hidden='true' normative='false'>
|
2447
|
+
<bibitem id='uml_A' type='internal'>
|
2448
|
+
<docidentifier type='repository'>uml/A</docidentifier>
|
2449
|
+
</bibitem>
|
2450
|
+
</references>
|
2451
|
+
</bibliography>
|
2452
|
+
</standard-document>
|
2463
2453
|
OUTPUT
|
2464
2454
|
end
|
2465
2455
|
|
2466
|
-
|
2467
2456
|
it "process express_ref macro with no existing bibliography" do
|
2468
2457
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true, agree_to_terms: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
2469
2458
|
#{ASCIIDOC_BLANK_HDR}
|
@@ -2479,159 +2468,156 @@ end
|
|
2479
2468
|
<<express-schema:B>>
|
2480
2469
|
<<express-schema:B1>>
|
2481
2470
|
INPUT
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2487
|
-
|
2488
|
-
|
2489
|
-
|
2490
|
-
|
2491
|
-
|
2492
|
-
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
|
2499
|
-
|
2500
|
-
|
2501
|
-
|
2502
|
-
|
2503
|
-
|
2504
|
-
|
2505
|
-
|
2506
|
-
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
</standard-document>
|
2471
|
+
#{BLANK_HDR}
|
2472
|
+
<sections>
|
2473
|
+
<clause id='B' type='express-schema' inline-header='false' obligation='normative'>
|
2474
|
+
<title>Clause</title>
|
2475
|
+
<note id='B1'>
|
2476
|
+
<p id='_'>X</p>
|
2477
|
+
</note>
|
2478
|
+
<p id='_'>
|
2479
|
+
<eref bibitemid='express-schema_A' citeas=''>
|
2480
|
+
<localityStack>
|
2481
|
+
<locality type='anchor'>
|
2482
|
+
<referenceFrom>A.B.C</referenceFrom>
|
2483
|
+
</locality>
|
2484
|
+
</localityStack>
|
2485
|
+
C
|
2486
|
+
</eref>
|
2487
|
+
<eref bibitemid='express-schema_A' citeas=''/>
|
2488
|
+
<xref target='B'/>
|
2489
|
+
<xref target='B1'/>
|
2490
|
+
</p>
|
2491
|
+
</clause>
|
2492
|
+
</sections>
|
2493
|
+
<bibliography>
|
2494
|
+
<references hidden='true' normative='false'>
|
2495
|
+
<bibitem id='express-schema_A' type='internal'>
|
2496
|
+
<docidentifier type='repository'>express-schema/A</docidentifier>
|
2497
|
+
</bibitem>
|
2498
|
+
</references>
|
2499
|
+
</bibliography>
|
2500
|
+
</standard-document>
|
2512
2501
|
OUTPUT
|
2513
2502
|
end
|
2514
2503
|
|
2515
|
-
|
2516
2504
|
private
|
2517
2505
|
|
2518
2506
|
def mock_mathml_italicise(x)
|
2519
|
-
|
2507
|
+
allow_any_instance_of(::Asciidoctor::Standoc::Cleanup).to receive(:mathml_mi_italics).and_return(x)
|
2520
2508
|
end
|
2521
2509
|
|
2522
|
-
|
2523
|
-
|
2524
|
-
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-103", nil, {keep_year: true}) do
|
2510
|
+
def mock_iecbib_get_iec60050_103_01
|
2511
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-103", nil, { keep_year: true }) do
|
2525
2512
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
<organization>
|
2535
|
-
<name>International Electrotechnical Commission</name>
|
2536
|
-
<abbreviation>IEC</abbreviation>
|
2537
|
-
<uri>www.iec.ch</uri>
|
2538
|
-
</organization>
|
2539
|
-
</contributor>
|
2540
|
-
<language>en</language>
|
2541
|
-
<language>fr</language>
|
2542
|
-
<script>Latn</script>
|
2543
|
-
<status>
|
2544
|
-
<stage>60</stage>
|
2545
|
-
</status>
|
2546
|
-
<copyright>
|
2547
|
-
<from>2018</from>
|
2548
|
-
<owner>
|
2513
|
+
<bibitem type="standard" id="IEC60050-103">
|
2514
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2515
|
+
<docidentifier>IEC 60050-103:2009</docidentifier>
|
2516
|
+
<date type="published">
|
2517
|
+
<on>2009</on>
|
2518
|
+
</date>
|
2519
|
+
<contributor>
|
2520
|
+
<role type="publisher"/>
|
2549
2521
|
<organization>
|
2550
2522
|
<name>International Electrotechnical Commission</name>
|
2551
2523
|
<abbreviation>IEC</abbreviation>
|
2552
2524
|
<uri>www.iec.ch</uri>
|
2553
2525
|
</organization>
|
2554
|
-
</
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2526
|
+
</contributor>
|
2527
|
+
<language>en</language>
|
2528
|
+
<language>fr</language>
|
2529
|
+
<script>Latn</script>
|
2530
|
+
<status>
|
2531
|
+
<stage>60</stage>
|
2532
|
+
</status>
|
2533
|
+
<copyright>
|
2534
|
+
<from>2018</from>
|
2535
|
+
<owner>
|
2536
|
+
<organization>
|
2537
|
+
<name>International Electrotechnical Commission</name>
|
2538
|
+
<abbreviation>IEC</abbreviation>
|
2539
|
+
<uri>www.iec.ch</uri>
|
2540
|
+
</organization>
|
2541
|
+
</owner>
|
2542
|
+
</copyright>
|
2543
|
+
</bibitem>
|
2544
|
+
OUTPUT
|
2558
2545
|
end
|
2559
|
-
end
|
2546
|
+
end
|
2560
2547
|
|
2561
|
-
|
2562
|
-
|
2548
|
+
def mock_iecbib_get_iec60050_102_01
|
2549
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-102", nil, { keep_year: true }) do
|
2563
2550
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2564
|
-
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
<organization>
|
2573
|
-
<name>International Electrotechnical Commission</name>
|
2574
|
-
<abbreviation>IEC</abbreviation>
|
2575
|
-
<uri>www.iec.ch</uri>
|
2576
|
-
</organization>
|
2577
|
-
</contributor>
|
2578
|
-
<language>en</language>
|
2579
|
-
<language>fr</language>
|
2580
|
-
<script>Latn</script>
|
2581
|
-
<status>
|
2582
|
-
<stage>60</stage>
|
2583
|
-
</status>
|
2584
|
-
<copyright>
|
2585
|
-
<from>2018</from>
|
2586
|
-
<owner>
|
2551
|
+
<bibitem type="standard" id="IEC60050-102">
|
2552
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2553
|
+
<docidentifier>IEC 60050-102:2007</docidentifier>
|
2554
|
+
<date type="published">
|
2555
|
+
<on>2007</on>
|
2556
|
+
</date>
|
2557
|
+
<contributor>
|
2558
|
+
<role type="publisher"/>
|
2587
2559
|
<organization>
|
2588
2560
|
<name>International Electrotechnical Commission</name>
|
2589
2561
|
<abbreviation>IEC</abbreviation>
|
2590
2562
|
<uri>www.iec.ch</uri>
|
2591
2563
|
</organization>
|
2592
|
-
</
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2564
|
+
</contributor>
|
2565
|
+
<language>en</language>
|
2566
|
+
<language>fr</language>
|
2567
|
+
<script>Latn</script>
|
2568
|
+
<status>
|
2569
|
+
<stage>60</stage>
|
2570
|
+
</status>
|
2571
|
+
<copyright>
|
2572
|
+
<from>2018</from>
|
2573
|
+
<owner>
|
2574
|
+
<organization>
|
2575
|
+
<name>International Electrotechnical Commission</name>
|
2576
|
+
<abbreviation>IEC</abbreviation>
|
2577
|
+
<uri>www.iec.ch</uri>
|
2578
|
+
</organization>
|
2579
|
+
</owner>
|
2580
|
+
</copyright>
|
2581
|
+
</bibitem>
|
2582
|
+
OUTPUT
|
2596
2583
|
end
|
2597
|
-
end
|
2584
|
+
end
|
2598
2585
|
|
2599
|
-
|
2600
|
-
|
2586
|
+
def mock_iev
|
2587
|
+
expect(Iecbib::IecBibliography).to receive(:get).with("IEV", nil, {}) do
|
2601
2588
|
IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
<organization>
|
2611
|
-
<name>International Electrotechnical Commission</name>
|
2612
|
-
<abbreviation>IEC</abbreviation>
|
2613
|
-
<uri>www.iec.ch</uri>
|
2614
|
-
</organization>
|
2615
|
-
</contributor>
|
2616
|
-
<language>en</language>
|
2617
|
-
<language>fr</language>
|
2618
|
-
<script>Latn</script>
|
2619
|
-
<status>
|
2620
|
-
<stage>60</stage>
|
2621
|
-
</status>
|
2622
|
-
<copyright>
|
2623
|
-
<from>2018</from>
|
2624
|
-
<owner>
|
2589
|
+
<bibitem type="standard" id="IEC60050:2001">
|
2590
|
+
<title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
|
2591
|
+
<docidentifier>IEC 60050:2011</docidentifier>
|
2592
|
+
<date type="published">
|
2593
|
+
<on>2007</on>
|
2594
|
+
</date>
|
2595
|
+
<contributor>
|
2596
|
+
<role type="publisher"/>
|
2625
2597
|
<organization>
|
2626
2598
|
<name>International Electrotechnical Commission</name>
|
2627
2599
|
<abbreviation>IEC</abbreviation>
|
2628
2600
|
<uri>www.iec.ch</uri>
|
2629
2601
|
</organization>
|
2630
|
-
</
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2602
|
+
</contributor>
|
2603
|
+
<language>en</language>
|
2604
|
+
<language>fr</language>
|
2605
|
+
<script>Latn</script>
|
2606
|
+
<status>
|
2607
|
+
<stage>60</stage>
|
2608
|
+
</status>
|
2609
|
+
<copyright>
|
2610
|
+
<from>2018</from>
|
2611
|
+
<owner>
|
2612
|
+
<organization>
|
2613
|
+
<name>International Electrotechnical Commission</name>
|
2614
|
+
<abbreviation>IEC</abbreviation>
|
2615
|
+
<uri>www.iec.ch</uri>
|
2616
|
+
</organization>
|
2617
|
+
</owner>
|
2618
|
+
</copyright>
|
2619
|
+
</bibitem>
|
2620
|
+
OUTPUT
|
2634
2621
|
end.at_least :once
|
2635
|
-
end
|
2636
|
-
|
2622
|
+
end
|
2637
2623
|
end
|