metanorma-standoc 1.8.5 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/.rubocop.yml +5 -1
  4. data/Gemfile.devel +0 -0
  5. data/lib/asciidoctor/standoc/base.rb +41 -36
  6. data/lib/asciidoctor/standoc/biblio.rng +4 -6
  7. data/lib/asciidoctor/standoc/blocks.rb +27 -12
  8. data/lib/asciidoctor/standoc/blocks_notes.rb +20 -14
  9. data/lib/asciidoctor/standoc/cleanup.rb +32 -78
  10. data/lib/asciidoctor/standoc/cleanup_block.rb +56 -59
  11. data/lib/asciidoctor/standoc/cleanup_boilerplate.rb +32 -21
  12. data/lib/asciidoctor/standoc/cleanup_footnotes.rb +1 -0
  13. data/lib/asciidoctor/standoc/cleanup_image.rb +71 -0
  14. data/lib/asciidoctor/standoc/cleanup_maths.rb +37 -28
  15. data/lib/asciidoctor/standoc/cleanup_ref.rb +21 -13
  16. data/lib/asciidoctor/standoc/cleanup_ref_dl.rb +1 -1
  17. data/lib/asciidoctor/standoc/cleanup_reqt.rb +47 -0
  18. data/lib/asciidoctor/standoc/cleanup_section.rb +21 -15
  19. data/lib/asciidoctor/standoc/converter.rb +3 -1
  20. data/lib/asciidoctor/standoc/front.rb +35 -18
  21. data/lib/asciidoctor/standoc/front_contributor.rb +5 -5
  22. data/lib/asciidoctor/standoc/inline.rb +1 -1
  23. data/lib/asciidoctor/standoc/isodoc.rng +130 -1
  24. data/lib/asciidoctor/standoc/lists.rb +4 -2
  25. data/lib/asciidoctor/standoc/macros.rb +40 -13
  26. data/lib/asciidoctor/standoc/ref.rb +87 -112
  27. data/lib/asciidoctor/standoc/ref_date_id.rb +62 -0
  28. data/lib/asciidoctor/standoc/ref_sect.rb +12 -12
  29. data/lib/asciidoctor/standoc/terms.rb +10 -6
  30. data/lib/asciidoctor/standoc/utils.rb +32 -6
  31. data/lib/asciidoctor/standoc/validate.rb +12 -12
  32. data/lib/metanorma/standoc/version.rb +5 -5
  33. data/metanorma-standoc.gemspec +11 -11
  34. data/spec/asciidoctor/base_spec.rb +78 -8
  35. data/spec/asciidoctor/blocks_spec.rb +10 -0
  36. data/spec/asciidoctor/cleanup_sections_spec.rb +14 -14
  37. data/spec/asciidoctor/cleanup_spec.rb +1860 -1874
  38. data/spec/asciidoctor/inline_spec.rb +272 -273
  39. data/spec/asciidoctor/macros_spec.rb +8 -2
  40. data/spec/asciidoctor/refs_spec.rb +135 -7
  41. data/spec/asciidoctor/section_spec.rb +670 -687
  42. data/spec/assets/html-override.css +1 -0
  43. data/spec/assets/word-override.css +1 -0
  44. data/spec/spec_helper.rb +11 -9
  45. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +60 -60
  46. data/spec/vcr_cassettes/isobib_get_123.yml +16 -16
  47. data/spec/vcr_cassettes/isobib_get_123_1.yml +32 -32
  48. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +41 -41
  49. data/spec/vcr_cassettes/isobib_get_123_2001.yml +15 -15
  50. data/spec/vcr_cassettes/isobib_get_124.yml +17 -17
  51. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +14 -14
  52. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +53 -49
  53. metadata +71 -68
  54. data/.rubocop.ribose.yml +0 -66
  55. data/.rubocop.tb.yml +0 -650
  56. data/spec/asciidoctor/macros_lutaml_spec.rb +0 -80
@@ -959,6 +959,9 @@ RSpec.describe Asciidoctor::Standoc do
959
959
  [.source]
960
960
  <<ISO2191,section=1>>
961
961
 
962
+ [.source]
963
+ <<ISO2191,droploc%capital%section=1>>
964
+
962
965
  === Term2
963
966
 
964
967
  Definition
@@ -986,6 +989,13 @@ RSpec.describe Asciidoctor::Standoc do
986
989
  </localityStack>
987
990
  </origin>
988
991
  </termsource>
992
+ <termsource status="identical">
993
+ <origin bibitemid="ISO2191" type="inline" citeas="" case='capital' droploc='true'>
994
+ <localityStack>
995
+ <locality type="section"><referenceFrom>1</referenceFrom></locality>
996
+ </localityStack>
997
+ </origin>
998
+ </termsource>
989
999
  </term>
990
1000
  <term id='term-term2'>
991
1001
  <preferred>Term2</preferred>
@@ -560,15 +560,15 @@ INPUT
560
560
  </title>
561
561
  <p id='_'>There are no normative references in this document.</p>
562
562
  </references>
563
- <references id='_' normative='false' obligation='informative'>
564
- <title>Bibliography
563
+ <references id='_' normative='true' obligation='informative'>
564
+ <title>Normative References 2.
565
565
  <fn reference='1'>
566
566
  <p id='_'>A</p>
567
567
  </fn>
568
568
  </title>
569
569
  </references>
570
570
  <references id='_' normative='false' obligation='informative'>
571
- <title>Bibliography.
571
+ <title>Bibliography
572
572
  <fn reference='1'>
573
573
  <p id='_'>A</p>
574
574
  </fn>
@@ -803,8 +803,8 @@ INPUT
803
803
  <title>Normative references</title>
804
804
  <p id='_'>There are no normative references in this document.</p>
805
805
  </references>
806
- <references id='_' normative='false' obligation='informative'>
807
- <title>Bibliography</title>
806
+ <references id='_' normative='true' obligation='informative'>
807
+ <title>Normative References 2</title>
808
808
  </references>
809
809
  <references id='_' normative='false' obligation='informative'>
810
810
  <title>Bibliography</title>
@@ -1037,11 +1037,11 @@ INPUT
1037
1037
  <title>Références normatives</title>
1038
1038
  <p id='_'>Le présent document ne contient aucune référence normative.</p>
1039
1039
  </references>
1040
- <references id='_' normative='false' obligation='informative'>
1041
- <title>Bibliographie</title>
1040
+ <references id='_' normative='true' obligation='informative'>
1041
+ <title>Normative References 2</title>
1042
1042
  </references>
1043
1043
  <references id='_' normative='false' obligation='informative'>
1044
- <title>Bibliography</title>
1044
+ <title>Bibliographie</title>
1045
1045
  </references>
1046
1046
  <clause id='_' obligation='informative'>
1047
1047
  <title>Bibliography 2</title>
@@ -1268,11 +1268,11 @@ INPUT
1268
1268
  <title>规范性引用文件</title>
1269
1269
  <p id='_'>本文件并没有规范性引用文件。</p>
1270
1270
  </references>
1271
- <references id='_' normative='false' obligation='informative'>
1272
- <title>参考文献</title>
1271
+ <references id='_' normative='true' obligation='informative'>
1272
+ <title>Normative References 2</title>
1273
1273
  </references>
1274
1274
  <references id='_' normative='false' obligation='informative'>
1275
- <title>Bibliography</title>
1275
+ <title>参考文献</title>
1276
1276
  </references>
1277
1277
  <clause id='_' obligation='informative'>
1278
1278
  <title>Bibliography 2</title>
@@ -1499,11 +1499,11 @@ INPUT
1499
1499
  <title>Normaj citaĵoj</title>
1500
1500
  <p id='_'>There are no normative references in this document.</p>
1501
1501
  </references>
1502
- <references id='_' normative='false' obligation='informative'>
1503
- <title>Bibliografio</title>
1502
+ <references id='_' normative='true' obligation='informative'>
1503
+ <title>Normative References 2</title>
1504
1504
  </references>
1505
1505
  <references id='_' normative='false' obligation='informative'>
1506
- <title>Bibliography</title>
1506
+ <title>Bibliografio</title>
1507
1507
  </references>
1508
1508
  <clause id='_' obligation='informative'>
1509
1509
  <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
- 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)))).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
- [.svgmap]
19
- ====
20
- image::action_schemaexpg1.svg[]
21
-
22
- * <<ref1,Computer>>; mn://action_schema
23
- * http://www.example.com[Phone]; http://www.example.com
24
- ====
25
-
26
- [svgmap]
27
- ====
28
- [alt=Workmap]
29
- image::action_schemaexpg2.svg[]
30
-
31
- * <<ref1,Computer>>; href1.htm
32
- * http://www.example.com[Phone]; mn://basic_attribute_schema
33
- * <<express:action_schema:action_schema.basic,Coffee>>; mn://support_resource_schema
34
- ====
35
- INPUT
36
- #{BLANK_HDR}
37
- <sections>
38
- <svgmap id='_'>
39
- <target href='http://www.example.com'>
40
- <xref target='ref1'>Computer</xref>
41
- </target>
42
- </svgmap>
43
- <figure id='_'>
44
- <image src='action_schemaexpg1.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto'/>
45
- </figure>
46
- <svgmap id='_'>
47
- <figure id='_'>
48
- <image src='action_schemaexpg2.svg' id='_' mimetype='image/svg+xml' height='auto' width='auto' alt='Workmap'/>
49
- </figure>
50
- <target href='mn://support_resource_schema'>
51
- <eref bibitemid='express_action_schema' citeas=''>
52
- <localityStack>
53
- <locality type='anchor'>
54
- <referenceFrom>action_schema.basic</referenceFrom>
55
- </locality>
56
- </localityStack>
57
- Coffee
58
- </eref>
59
- </target>
60
- </svgmap>
61
- </sections>
62
- <bibliography>
63
- <references hidden='true' normative='false'>
64
- <bibitem id='express_action_schema' type='internal'>
65
- <docidentifier type='repository'>express/action_schema</docidentifier>
66
- </bibitem>
67
- </references>
68
- </bibliography>
69
- </standard-document>
70
- OUTPUT
71
- expect(xmlpp(File.read("action_schemaexpg1.svg", encoding: "utf-8").sub(%r{<image .*</image>}m, ""))).to be_equivalent_to <<~OUTPUT
72
- <?xml version='1.0' encoding='UTF-8'?>
73
- <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
74
- <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1' x='0px' y='0px' viewBox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve'>
75
- <style type='text/css'> .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} </style>
76
- <a xlink:href='#ref1'>
77
- <rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
78
- </a>
79
- <a xlink:href='mn://basic_attribute_schema'>
80
- <rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
81
- </a>
82
- <a xlink:href='mn://support_resource_schema'>
83
- <rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
84
- </a>
85
- </svg>
86
- OUTPUT
87
- expect(xmlpp(File.read("action_schemaexpg2.svg", encoding: "utf-8").sub(%r{<image .*</image>}m, ""))).to be_equivalent_to <<~OUTPUT
88
- <?xml version='1.0' encoding='UTF-8'?>
89
- <!-- Generator: Adobe Illustrator 25.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
90
- <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1' id='Layer_1' x='0px' y='0px' viewBox='0 0 595.28 841.89' style='enable-background:new 0 0 595.28 841.89;' xml:space='preserve'>
91
- <style type='text/css'> .st0{fill:none;stroke:#000000;stroke-miterlimit:10;} </style>
92
- <a xlink:href='mn://action_schema'>
93
- <rect x='123.28' y='273.93' class='st0' width='88.05' height='41.84'/>
94
- </a>
95
- <a xlink:href='http://www.example.com'>
96
- <rect x='324.69' y='450.52' class='st0' width='132.62' height='40.75'/>
97
- </a>
98
- <a xlink:href='mn://support_resource_schema'>
99
- <rect x='324.69' y='528.36' class='st0' width='148.16' height='40.75'/>
100
- </a>
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
- #{ASCIIDOC_BLANK_HDR}
108
-
109
- [source]
110
- ----
111
- <tag/>
112
- ----
102
+ #{ASCIIDOC_BLANK_HDR}
113
103
 
114
- [[A]]
115
- [source]
116
- ----
117
- var {{{*x*}}} : {{{<<A,recursive>>}}} <tag/>
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
- #{BLANK_HDR}
123
- <sections>
124
- <sourcecode id='_'>&lt;tag/&gt;</sourcecode>
125
- <sourcecode id='A'>
126
- var
127
- <strong>x</strong>
128
- :
129
- <xref target='A'>recursive</xref>
130
- &lt;tag/&gt;
131
- </sourcecode>
132
- </sections>
133
- </standard-document>
117
+ #{BLANK_HDR}
118
+ <sections>
119
+ <sourcecode id='_'>&lt;tag/&gt;</sourcecode>
120
+ <sourcecode id='A'>
121
+ var
122
+ <strong>x</strong>
123
+ :
124
+ <xref target='A'>recursive</xref>
125
+ &lt;tag/&gt;
126
+ </sourcecode>
127
+ </sections>
128
+ </standard-document>
134
129
  OUTPUT
135
130
  end
136
131
 
137
- it "processes markup in sourcecode with custom delimiters" do
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
- #{BLANK_HDR}
157
- <sections>
158
- <sourcecode id='A'>
159
- var
160
- <strong>x</strong>
161
- :
162
- <xref target='A'>recursive</xref>
163
- </sourcecode>
164
- </sections>
165
- </standard-document>
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
- #{BLANK_HDR}
178
- <sections>
179
- <clause id="_" inline-header="false" obligation="normative">
180
- <title>“Quotation” A’s</title>
181
- <p id='_'>‘24:00:00’.</p>
182
- </clause>
183
- </sections>
184
- </standard-document>
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
- #{BLANK_HDR}
201
- <sections>
202
- <clause id="_" inline-header="false" obligation="normative">
203
- <title>“Quotation” A’s</title>
204
- </clause>
205
- </sections>
206
- </standard-document>
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
- it "does not apply smartquotes when requested not to" do
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
- #{BLANK_HDR}
225
- <sections>
226
- <clause id="_" inline-header="false" obligation="normative">
227
- <title>"Quotation" A's</title>
228
- <p id="_">
229
- <tt>"quote" A's</tt>
230
- </p>
231
- </clause>
232
- </sections>
233
- </standard-document>
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
- #{BLANK_HDR}
265
- <sections>
266
- <clause id="_" inline-header="false" obligation="normative"><title>“Quotation” A’s</title><p id="_">“Quotation” A’s</p>
267
- <p id="_">
268
- <tt>"quote" A’s</tt>
269
- </p>
270
- <sourcecode id="_">"quote" A's</sourcecode>
271
- <figure id='_' class='pseudocode'>
272
- <p id='_'>"quote" A's</p>
273
- </figure>
274
- </clause>
275
- </sections>
276
- </standard-document>
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
  <&amp;>
286
280
  INPUT
287
- #{BLANK_HDR}
288
- <sections>
289
- <clause id="_" inline-header="false" obligation="normative">
290
- <p id="_">&lt;&amp;&gt;</p>
291
- </clause>
292
- </sections>
293
- </standard-document>
281
+ #{BLANK_HDR}
282
+ <sections>
283
+ <clause id="_" inline-header="false" obligation="normative">
284
+ <p id="_">&lt;&amp;&gt;</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
- #{BLANK_HDR}
303
- <sections>
304
- <clause id="_" inline-header="false" obligation="normative">
296
+ #{BLANK_HDR}
297
+ <sections>
298
+ <clause id="_" inline-header="false" obligation="normative">
305
299
 
306
- </clause>
307
- </sections>
308
- </standard-document>
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
- #{BLANK_HDR}
324
- <sections>
325
- <terms id="_" obligation="normative">
326
- <title>Terms and definitions</title>
327
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
328
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
329
- <mrow>
330
- <mi>t</mi>
331
- </mrow>
332
- <mrow>
333
- <mn>90</mn>
334
- </mrow>
335
- </msub></math></stem></preferred><admitted><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
336
- <mrow>
337
- <mi>t</mi>
338
- </mrow>
339
- <mrow>
340
- <mn>91</mn>
341
- </mrow>
342
- </msub></math></stem></admitted>
343
- <definition><p id="_">Time</p></definition></term>
344
- </terms>
345
- </sections>
346
- </standard-document>
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
- #{BLANK_HDR}
366
- <sections>
367
- <terms id="_" obligation="normative">
368
- <title>Terms and definitions</title>
369
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
370
- <term id="term-tempus">
371
- <preferred>Tempus</preferred>
372
- <domain>relativity</domain><definition><p id="_"> Time</p></definition>
373
- </term>
374
- <term id='term-tempus1'>
375
- <preferred>Tempus1</preferred>
376
- <domain>relativity2</domain>
377
- <definition>
378
- <p id='_'>Time2</p>
379
- <p id='_'> </p>
380
- </definition>
381
- </term>
382
- </terms>
383
- </sections>
384
- </standard-document>
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
- #{BLANK_HDR}
409
- <sections>
410
- <terms id="_" obligation="normative">
411
- <title>Terms and definitions</title>
412
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
413
- <term id="term-t90"><preferred><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
414
- <mrow>
415
- <mi>t</mi>
416
- </mrow>
417
- <mrow>
418
- <mn>90</mn>
419
- </mrow>
420
- </msub></math></stem></preferred><definition><formula id="_">
421
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub>
422
- <mrow>
423
- <mi>t</mi>
424
- </mrow>
425
- <mrow>
426
- <mi>A</mi>
427
- </mrow>
428
- </msub></math></stem>
429
- </formula>
430
- <p id="_">This paragraph is extraneous</p></definition>
431
- </term>
432
- </terms>
433
- </sections>
434
- </standard-document>
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
- #{ASCIIDOC_BLANK_HDR}
441
-
442
- [stem]
443
- ++++
444
- r = 1 %
445
- r = 1 %
446
- ++++
434
+ #{ASCIIDOC_BLANK_HDR}
447
435
 
448
- NOTE: That formula does not do much
436
+ [stem]
437
+ ++++
438
+ r = 1 %
439
+ r = 1 %
440
+ ++++
449
441
 
450
- Indeed.
442
+ NOTE: That formula does not do much
443
+
444
+ Indeed.
451
445
  INPUT
452
- #{BLANK_HDR}
453
- <sections><formula id="_">
454
- <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>
455
- <note id="_">
456
- <p id="_">That formula does not do much</p>
457
- </note></formula>
458
-
459
- <p id="_">Indeed.</p></sections>
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
- it "does not move notes inside preceding blocks, if they are marked as keep-separate" do
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
- #{BLANK_HDR}
482
- <sections><formula id="_">
483
- <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>
484
- <note id="_">
485
- <p id="_">That formula does not do much</p>
486
- </note>
487
-
488
- <p id="_">Indeed.</p></sections>
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
- #{BLANK_HDR}
504
- <sections><sourcecode id="_" lang="ruby">[1...x].each do |y|
505
- puts y
506
- end</sourcecode>
507
- <note id="_">
508
- <p id="_">That loop does not do much</p>
509
- </note></sections>
510
- </standard-document>
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
- #{BLANK_HDR}
567
- <preface><foreword id="_" obligation="informative">
568
- <title>Foreword</title>
569
- <p id="_">
570
- <eref type="inline" bibitemid="iso216" citeas="ISO 216">
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
- <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"/>
613
+ <locality type='whole'/>
614
+ <locality type='clause'>
615
+ <referenceFrom>3</referenceFrom>
616
+ </locality>
573
617
  </localityStack>
574
- the reference,xyz</eref>
575
- <eref type='inline' bibitemid='iso216' citeas='ISO 216'>
576
- <localityStack>
577
- <locality type='whole'/>
578
- <locality type='clause'>
579
- <referenceFrom>3</referenceFrom>
580
- </locality>
581
- <locality type='example'>
582
- <referenceFrom>9</referenceFrom>
583
- <referenceTo>11</referenceTo>
584
- </locality>
585
- <locality type='locality:prelude'>
586
- <referenceFrom>33</referenceFrom>
587
- </locality>
588
- <locality type='locality:entirety'>
589
- <referenceFrom>the reference</referenceFrom>
590
- </locality>
591
- </localityStack>
592
- <localityStack>
593
- <locality type='whole'/>
594
- <locality type='clause'>
595
- <referenceFrom>3</referenceFrom>
596
- </locality>
597
- <locality type='example'>
598
- <referenceFrom>9</referenceFrom>
599
- <referenceTo>11</referenceTo>
600
- </locality>
601
- <locality type='locality:prelude'>
602
- <referenceFrom>33</referenceFrom>
603
- </locality>
604
- <locality type='locality:entirety'/>
605
- </localityStack>
606
- the reference,xyz
607
- </eref>
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
- #{BLANK_HDR}
660
- <preface>
661
- <foreword id="_" obligation="informative">
662
- <title>Foreword</title>
663
- <p id="_">
664
- <eref type="inline" bibitemid="iso216" citeas="ISO 216"/>
665
- </p>
666
- </foreword></preface><sections>
667
- </sections><bibliography><references id="_" obligation="informative" normative="false">
668
- <title>Bibliography</title>
669
- <bibitem id="iso216" type="standard">
670
- <title format="text/plain">Reference</title>
671
- <docidentifier>ISO 216</docidentifier>
672
- <docnumber>216</docnumber>
673
- <contributor>
674
- <role type="publisher"/>
675
- <organization>
676
- <name>ISO</name>
677
- </organization>
678
- </contributor>
679
- </bibitem>
680
- </references></bibliography>
681
- </standard-document>
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
- INPUT
695
- #{BLANK_HDR}
696
- <sections>
697
- <terms id="_" obligation="normative">
698
- <title>Terms and definitions</title>
699
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
700
- <term id="term-term1">
701
- <preferred>Term1</preferred>
702
- <termsource status="identical">
703
- <origin bibitemid="ISO2191" type="inline" citeas="">
704
- <localityStack>
705
- <locality type="section"><referenceFrom>1</referenceFrom></locality>
706
- </localityStack>
707
- </origin>
708
- </termsource>
709
- </term>
710
- </terms>
711
- </sections>
712
- </standard-document>
713
- OUTPUT
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
- #{BLANK_HDR}
722
- <sections>
723
- <p id="_">Paragraph</p>
724
- </sections>
725
- </standard-document>
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
- #{BLANK_HDR}
738
- <sections>
739
- <example id="_">
740
- <note id="_">
741
- <p id="_">This note has no ID</p>
742
- </note>
743
- </example>
744
- </sections>
745
- </standard-document>
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
- #{BLANK_HDR}
774
- <sections>
775
- <table id='_'>
776
- <tbody>
777
- <tr>
778
- <td valign='top' align='left'>a</td>
779
- <td valign='top' align='left'>b</td>
780
- <td valign='top' align='left'>c</td>
781
- </tr>
782
- </tbody>
783
- <dl id='_' key='true'>
784
- <dt>a</dt>
785
- <dd>
786
- <p id='_'>b</p>
787
- </dd>
788
- </dl>
789
- </table>
790
- <table id='_'>
791
- <tbody>
792
- <tr>
793
- <td valign='top' align='left'>a</td>
794
- <td valign='top' align='left'>b</td>
795
- <td valign='top' align='left'>c</td>
796
- </tr>
797
- </tbody>
798
- <dl id='_' key='true'>
799
- <dt>a</dt>
800
- <dd>
801
- <p id='_'>b</p>
802
- </dd>
803
- </dl>
804
- </table>
805
- <table id='_'>
806
- <tbody>
807
- <tr>
808
- <td valign='top' align='left'>a</td>
809
- <td valign='top' align='left'>b</td>
810
- <td valign='top' align='left'>c</td>
811
- </tr>
812
- </tbody>
813
- </table>
814
- <dl id='_'>
815
- <dt>a</dt>
816
- <dd>
817
- <p id='_'>b</p>
818
- </dd>
819
- </dl>
820
- </sections>
821
- </standard-document>
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
- #{BLANK_HDR}
837
- <sections>
838
- <table id="_"><thead><tr>
839
- <th valign="top" align="left">a</th>
840
- <th valign="top" align="left">b</th>
841
- <th valign="top" align="left">c</th>
842
- </tr><tr>
843
- <th valign="top" align="left">a</th>
844
- <th valign="top" align="left">b</th>
845
- <th valign="top" align="left">c</th>
846
- </tr><tr>
847
- <th valign="top" align="left">a</th>
848
- <th valign="top" align="left">b</th>
849
- <th valign="top" align="left">c</th>
850
- </tr></thead>
851
- <tbody>
852
- <tr>
853
- <td valign="top" align="left">a</td>
854
- <td valign="top" align="left">b</td>
855
- <td valign="top" align="left">c</td>
856
- </tr>
857
- </tbody>
858
- </table>
859
- </sections>
860
- </standard-document>
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
- #{BLANK_HDR}
877
- <sections>
878
- <table id="_">
879
- <thead>
880
- <tr>
881
- <th valign="top" align="left">a</th>
882
- <th valign="top" align="left">b</th>
883
- <th valign="top" align="left">c</th>
884
- </tr>
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><tr>
890
- <th valign="top" align="left">a</th>
891
- <th valign="top" align="left">b</th>
892
- <th valign="top" align="left">c</th>
893
- </tr></thead>
894
- <tbody>
895
-
896
-
897
- <tr>
898
- <td valign="top" align="left">a</td>
899
- <td valign="top" align="left">b</td>
900
- <td valign="top" align="left">c</td>
901
- </tr>
902
- </tbody>
903
- </table>
904
- </sections>
905
- </standard-document>
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
- #{BLANK_HDR}
921
- <sections><table id="_">
922
- <tbody>
923
- <tr>
924
- <td valign="top" align="left">a</td>
925
- <td valign="top" align="left">b</td>
926
- <td valign="top" align="left">c</td>
927
- </tr>
928
- </tbody>
929
- <note id="_">
930
- <p id="_">Note 1</p>
931
- </note><note id="_">
932
- <p id="_">Note 2</p>
933
- </note></table>
934
-
935
- </sections>
936
- </standard-document>
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
- #{BLANK_HDR}
968
- <sections>
969
- <formula id='_'>
970
- <stem type='MathML'>
971
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
972
- <mi>F</mi>
973
- <mi>or</mi>
974
- <mi>μ</mi>
975
- <mi>l</mi>
976
- <mi>a</mi>
977
- </math>
978
- </stem>
979
- <dl id='_' key='true'>
980
- <dt>a</dt>
981
- <dd>
982
- <p id='_'>b</p>
983
- </dd>
984
- </dl>
985
- </formula>
986
- <formula id='_'>
987
- <stem type='MathML'>
988
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
989
- <mi>F</mi>
990
- <mi>or</mi>
991
- <mi>μ</mi>
992
- <mi>l</mi>
993
- <mi>a</mi>
994
- </math>
995
- </stem>
996
- <dl id='_' key='true'>
997
- <dt>a</dt>
998
- <dd>
999
- <p id='_'>b</p>
1000
- </dd>
1001
- </dl>
1002
- </formula>
1003
- <formula id='_'>
1004
- <stem type='MathML'>
1005
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
1006
- <mi>F</mi>
1007
- <mi>or</mi>
1008
- <mi>μ</mi>
1009
- <mi>l</mi>
1010
- <mi>a</mi>
1011
- </math>
1012
- </stem>
1013
- </formula>
1014
- <dl id='_'>
1015
- <dt>a</dt>
1016
- <dd>
1017
- <p id='_'>b</p>
1018
- </dd>
1019
- </dl>
1020
- </sections>
1021
- </standard-document>
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
- #{BLANK_HDR}
1038
- <sections><figure id="_">
1039
- <name>
1040
- Figuretitle.
1041
- <fn reference='1'>
1042
- <p id='_'>xyz</p>
1043
- </fn>
1044
- </name>
1045
- <image src="spec/examples/rice_images/rice_image1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
1046
- <fn reference="a">
1047
- <p id="_">This is a footnote to a figure</p>
1048
- </fn><fn reference="b">
1049
- <p id="_">This is another footnote to a figure</p>
1050
- </fn></figure>
1051
- <p id='_'>
1052
- A
1053
- <fn reference='2'>
1054
- <p id='_'>This is a third footnote</p>
1055
- </fn>
1056
- </p>
1057
-
1058
- </sections>
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
- #{BLANK_HDR}
1083
- <sections>
1084
- <figure id='_'>
1085
- <image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
1086
- <dl id='_' key='true'>
1087
- <dt>a</dt>
1088
- <dd>
1089
- <p id='_'>b</p>
1090
- </dd>
1091
- </dl>
1092
- </figure>
1093
- <figure id='_'>
1094
- <image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
1095
- <dl id='_' key='true'>
1096
- <dt>a</dt>
1097
- <dd>
1098
- <p id='_'>b</p>
1099
- </dd>
1100
- </dl>
1101
- </figure>
1102
- <figure id='_'>
1103
- <image src='spec/examples/rice_images/rice_image1.png' id='_' mimetype='image/png' height='auto' width='auto'/>
1104
- </figure>
1105
- <dl id='_'>
1106
- <dt>a</dt>
1107
- <dd>
1108
- <p id='_'>b</p>
1109
- </dd>
1110
- </dl>
1111
- </sections>
1112
- </standard-document>
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
- #{BLANK_HDR}
1133
- <sections>
1134
- <figure id="figureC-2"><name>Stages of gelatinization</name><figure id="_">
1135
- <name>Initial stages: No grains are fully gelatinized (ungelatinized starch granules are visible inside the kernels)</name>
1136
- <image src="spec/examples/rice_images/rice_image3_1.png" id="_" mimetype="image/png" height="auto" width="auto"/>
1137
- </figure>
1138
- <figure id="_">
1139
- <name>Intermediate stages: Some fully gelatinized kernels are visible</name>
1140
- <image src="spec/examples/rice_images/rice_image3_2.png" id="_" mimetype="image/png" height="auto" width="auto"/>
1141
- </figure>
1142
- <figure id="_">
1143
- <name>Final stages: All kernels are fully gelatinized</name>
1144
- <image src="spec/examples/rice_images/rice_image3_3.png" id="_" mimetype="image/png" height="auto" width="auto"/>
1145
- </figure></figure>
1146
- </sections>
1147
- </standard-document>
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
- it "rearranges term note, term example, term source" do
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
- #{BLANK_HDR}
1225
- <sections>
1226
- <terms id="_" obligation="normative">
1227
- <title>Terms and definitions</title>
1228
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
1229
- <term id="term-term"><preferred>Term</preferred>
1230
-
1231
-
1232
-
1233
- <termnote id="_">
1234
- <p id="_">Note</p>
1235
- </termnote><termnote id="_">
1236
- <p id="_">Note 2</p>
1237
- </termnote><termexample id="_">
1238
- <p id="_">Example 1</p>
1239
- </termexample><termexample id="_">
1240
- <p id="_">Example 2</p>
1241
- </termexample><termsource status="identical">
1242
- <origin bibitemid="ISO2191" type="inline" citeas="">
1243
- <localityStack>
1244
- <locality type="section"><referenceFrom>1</referenceFrom></locality>
1245
- </localityStack>
1246
- </origin>
1247
- </termsource></term>
1248
- </terms>
1249
- </sections>
1250
- </standard-document>
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
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1266
- #{CACHED_ISOBIB_BLANK_HDR}
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
- [bibliography]
1269
- == Normative References
1270
- * [[[iev,IEV]]], _iev_
1271
+ [bibliography]
1272
+ == Normative References
1273
+ * [[[iev,IEV]]], _iev_
1271
1274
 
1272
- == Terms and definitions
1273
- === Automation1
1275
+ == Terms and definitions
1276
+ === Automation1
1274
1277
 
1275
- [.source]
1276
- <<iev,clause="103-01-02">>
1278
+ [.source]
1279
+ <<iev,clause="103-01-02">>
1277
1280
 
1278
- === Automation2
1281
+ === Automation2
1279
1282
 
1280
- [.source]
1281
- <<iev,clause="102-01-02">>
1283
+ [.source]
1284
+ <<iev,clause="102-01-02">>
1282
1285
 
1283
- === Automation3
1286
+ === Automation3
1284
1287
 
1285
- [.source]
1286
- <<iev,clause="103-01-02">>
1288
+ [.source]
1289
+ <<iev,clause="103-01-02">>
1287
1290
  INPUT
1288
- #{BLANK_HDR}
1289
-
1290
- <sections>
1291
- <terms id="_" obligation="normative"><title>Terms and definitions</title>
1292
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
1293
- <term id="term-automation1">
1294
- <preferred>Automation1</preferred>
1295
- <termsource status="identical">
1296
- <origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
1297
- <localityStack>
1298
- <locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
1299
- </localityStack>
1300
- </origin>
1301
- </termsource>
1302
- </term>
1303
- <term id="term-automation2">
1304
- <preferred>Automation2</preferred>
1305
- <termsource status="identical">
1306
- <origin bibitemid="IEC60050-102" type="inline" citeas="IEC 60050-102:2007">
1307
- <localityStack>
1308
- <locality type="clause"><referenceFrom>102-01-02</referenceFrom></locality>
1309
- </localityStack>
1310
- </origin>
1311
- </termsource>
1312
- </term>
1313
- <term id="term-automation3">
1314
- <preferred>Automation3</preferred>
1315
- <termsource status="identical">
1316
- <origin bibitemid="IEC60050-103" type="inline" citeas="IEC 60050-103:2009">
1317
- <localityStack>
1318
- <locality type="clause"><referenceFrom>103-01-02</referenceFrom></locality>
1319
- </localityStack>
1320
- </origin>
1321
- </termsource>
1322
- </term></terms></sections><bibliography><references id="_" obligation="informative" normative="true">
1323
- <title>Normative references</title>
1324
- #{NORM_REF_BOILERPLATE}
1325
- <bibitem type="standard" id="IEC60050-102">
1326
- <fetched>#{Date.today}</fetched>
1327
- <title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
1328
- <title type="title-part" format="text/plain" language="en" script="Latn">Part 102: Mathematics — General concepts and linear algebra</title>
1329
- <title type='main' format='text/plain' language='en' script='Latn'>International Electrotechnical Vocabulary (IEV) — Part 102: Mathematics — General concepts and linear algebra</title>
1330
- <uri type="src">https://webstore.iec.ch/publication/160</uri>
1331
- <uri type="obp">/preview/info_iec60050-102%7Bed1.0%7Db.pdf</uri>
1332
- <docidentifier type="IEC">IEC 60050-102:2007</docidentifier>
1333
- <docidentifier type='URN'>urn:iec:std:iec:60050-102:2007:::en</docidentifier>
1334
- <date type="published">
1335
- <on>2007-08-27</on>
1336
- </date>
1337
- <contributor>
1338
- <role type="publisher"/>
1339
- <organization>
1340
- <name>International Electrotechnical Commission</name>
1341
- <abbreviation>IEC</abbreviation>
1342
- <uri>www.iec.ch</uri>
1343
- </organization>
1344
- </contributor>
1345
- <edition>1.0</edition>
1346
- <language>en</language>
1347
- <script>Latn</script>
1348
- <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.&#13; It has the status of a horizontal standard in accordance with IEC Guide 108.</abstract>
1349
- <status>
1350
- <stage>60</stage>
1351
- <substage>60</substage>
1352
- </status>
1353
- <copyright>
1354
- <from>2007</from>
1355
- <owner>
1356
- <organization>
1357
- <name>International Electrotechnical Commission</name>
1358
- <abbreviation>IEC</abbreviation>
1359
- <uri>www.iec.ch</uri>
1360
- </organization>
1361
- </owner>
1362
- </copyright>
1363
- <place>Geneva</place>
1364
- </bibitem><bibitem type="standard" id="IEC60050-103">
1365
- <fetched>#{Date.today}</fetched>
1366
- <title type="title-main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV)</title>
1367
- <title type="title-part" format="text/plain" language="en" script="Latn">Part 103: Mathematics — Functions</title>
1368
- <title type="main" format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary (IEV) — Part 103: Mathematics — Functions</title>
1369
- <uri type="src">https://webstore.iec.ch/publication/161</uri>
1370
- <uri type="obp">/preview/info_iec60050-103%7Bed1.0%7Db.pdf</uri>
1371
- <docidentifier type="IEC">IEC 60050-103:2009</docidentifier>
1372
- <docidentifier type='URN'>urn:iec:std:iec:60050-103:2009:::en</docidentifier>
1373
- <date type="published">
1374
- <on>2009-12-14</on>
1375
- </date>
1376
- <contributor>
1377
- <role type="publisher"/>
1378
- <organization>
1379
- <name>International Electrotechnical Commission</name>
1380
- <abbreviation>IEC</abbreviation>
1381
- <uri>www.iec.ch</uri>
1382
- </organization>
1383
- </contributor>
1384
- <edition>1.0</edition>
1385
- <language>en</language>
1386
- <script>Latn</script>
1387
- <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>
1388
- <status>
1389
- <stage>60</stage>
1390
- <substage>60</substage>
1391
- </status>
1392
- <copyright>
1393
- <from>2009</from>
1394
- <owner>
1395
- <organization>
1396
- <name>International Electrotechnical Commission</name>
1397
- <abbreviation>IEC</abbreviation>
1398
- <uri>www.iec.ch</uri>
1399
- </organization>
1400
- </owner>
1401
- </copyright>
1402
- <place>Geneva</place>
1403
- </bibitem>
1404
- </references></bibliography>
1405
- </standard-document>
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.&#13; 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
- it "counts footnotes with link-only content as separate footnotes" do
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
- #{ASCIIDOC_BLANK_HDR}
1417
-
1418
- footnote:[http://www.example.com]
1418
+ #{ASCIIDOC_BLANK_HDR}
1419
1419
 
1420
- footnote:[http://www.example.com]
1420
+ footnote:[http://www.example.com]
1421
1421
 
1422
- footnote:[http://www.example1.com]
1422
+ footnote:[http://www.example.com]
1423
+
1424
+ footnote:[http://www.example1.com]
1423
1425
  INPUT
1424
- #{BLANK_HDR}
1425
- <sections><p id="_"><fn reference="1">
1426
- <p id="_">
1427
- <link target="http://www.example.com"/>
1428
- </p>
1429
- </fn>
1430
- </p>
1431
- <p id="_"><fn reference="1">
1432
- <p id="_">
1433
- <link target="http://www.example.com"/>
1434
- </p>
1435
- </fn>
1436
- </p>
1437
- <p id="_"><fn reference="2">
1438
- <p id="_">
1439
- <link target="http://www.example1.com"/>
1440
- </p>
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
- it "retains AsciiMath on request" do
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
- #{BLANK_HDR}
1462
- <sections>
1463
- <p id="_">
1464
- <stem type="AsciiMath">1/r</stem>
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
- #{BLANK_HDR}
1484
- <sections>
1485
- <p id="_">
1486
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac>
1487
- <mrow>
1488
- <mn>1</mn>
1489
- </mrow>
1490
- <mrow>
1491
- <mi>r</mi>
1492
- </mrow>
1493
- </mfrac></math></stem>
1494
- </p>
1495
- </sections>
1496
- </standard-document>
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
- it "cleans up text MathML" do
1501
- expect(Asciidoctor::Standoc::Converter.new(nil, backend: :standoc, header_footer: true).cleanup(Nokogiri::XML(<<~"INPUT")).to_xml).to be_equivalent_to xmlpp(<<~"OUTPUT")
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">&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;mfrac&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mi&gt;r&lt;/mi&gt;&lt;/mfrac&gt;&lt;/math&gt;</stem>
1505
1504
  </sections>
1506
1505
  </standard-document>
1507
1506
  INPUT
1508
- #{BLANK_HDR}
1509
- <sections>
1510
- <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mi>r</mi></mfrac></math></stem>
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
- it "renumbers numeric references in Bibliography sequentially" do
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
- #{BLANK_HDR}
1533
- <sections><clause id="_" inline-header="false" obligation="normative">
1534
- <title>Clause</title>
1535
- <p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
1536
- <eref type="inline" bibitemid="iso124" citeas="ISO 124"/></p>
1537
- </clause>
1538
- </sections><bibliography><references id="_" obligation="informative" normative="false">
1539
- <title>Bibliography</title>
1540
- <bibitem id="iso124" type="standard">
1541
- <title format="text/plain">Standard 124</title>
1542
- <docidentifier>ISO 124</docidentifier>
1543
- <docnumber>124</docnumber>
1544
- <contributor>
1545
- <role type="publisher"/>
1546
- <organization>
1547
- <name>ISO</name>
1548
- </organization>
1549
- </contributor>
1550
- </bibitem>
1551
- <bibitem id="iso123">
1552
- <formattedref format="application/x-isodoc+xml">
1553
- <em>Standard 123</em>
1554
- </formattedref>
1555
- <docidentifier type="metanorma">[2]</docidentifier>
1556
- </bibitem>
1557
- </references></bibliography>
1558
- </standard-document>
1559
- OUTPUT
1560
- end
1561
-
1562
- it "renumbers numeric references in Bibliography subclauses sequentially" do
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
- #{BLANK_HDR}
1595
- <sections><clause id="_" inline-header="false" obligation="normative">
1596
- <title>Clause</title>
1597
- <p id="_"><eref type="inline" bibitemid="iso123" citeas="[2]"/>
1598
- <eref type="inline" bibitemid="iso124" citeas="ISO 124"/>
1599
- <eref type="inline" bibitemid="iso125" citeas="ISO 125"/>
1600
- <eref type="inline" bibitemid="iso126" citeas="[4]"/></p>
1601
- </clause>
1602
- </sections><bibliography><clause id="_" obligation="informative"><title>Bibliography</title><references id="_" obligation="informative" normative="false">
1603
- <title>Clause 1</title>
1604
- <bibitem id="iso124" type="standard">
1605
- <title format="text/plain">Standard 124</title>
1606
- <docidentifier>ISO 124</docidentifier>
1607
- <docnumber>124</docnumber>
1608
- <contributor>
1609
- <role type="publisher"/>
1610
- <organization>
1611
- <name>ISO</name>
1612
- </organization>
1613
- </contributor>
1614
- </bibitem>
1615
- <bibitem id="iso123">
1616
- <formattedref format="application/x-isodoc+xml">
1617
- <em>Standard 123</em>
1618
- </formattedref>
1619
- <docidentifier type="metanorma">[2]</docidentifier>
1620
- </bibitem>
1621
- </references>
1622
- <references id="_" obligation="informative" normative="false">
1623
- <bibitem id="iso125" type="standard">
1624
- <title format="text/plain">Standard 124</title>
1625
- <docidentifier>ISO 125</docidentifier>
1626
- <docnumber>125</docnumber>
1627
- <contributor>
1628
- <role type="publisher"/>
1629
- <organization>
1630
- <name>ISO</name>
1631
- </organization>
1632
- </contributor>
1633
- </bibitem>
1634
- <bibitem id="iso126">
1635
- <formattedref format="application/x-isodoc+xml">
1636
- <em>Standard 123</em>
1637
- </formattedref>
1638
- <docidentifier type="metanorma">[4]</docidentifier>
1639
- </bibitem>
1640
- </references>
1641
- </clause>
1642
- <clause id='_' obligation='informative'>
1643
- <title>Bibliography Redux</title>
1644
- <references id='_' normative='false' obligation='informative'>
1645
- <title>Clause 1</title>
1646
- <bibitem id='iso127' type='standard'>
1647
- <title format='text/plain'>Standard 124</title>
1648
- <docidentifier>ISO 124</docidentifier>
1649
- <docnumber>124</docnumber>
1650
- <contributor>
1651
- <role type='publisher'/>
1652
- <organization>
1653
- <name>ISO</name>
1654
- </organization>
1655
- </contributor>
1656
- </bibitem>
1657
- <bibitem id='iso128'>
1658
- <formattedref format='application/x-isodoc+xml'>
1659
- <em>Standard 123</em>
1660
- </formattedref>
1661
- <docidentifier type='metanorma'>[6]</docidentifier>
1662
- </bibitem>
1663
- </references></clause></bibliography>
1664
- </standard-document>
1665
- OUTPUT
1666
- end
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
- = Document title
1671
- Author
1672
- :docfile: test.adoc
1673
- :nodoc:
1674
- :novalid:
1675
- :no-isobib:
1676
- :translated-from: IEC 60050-102
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
- [bibliography]
1679
- == Normative References
1675
+ [bibliography]
1676
+ == Normative References
1680
1677
 
1681
1678
  INPUT
1682
- <?xml version='1.0' encoding='UTF-8'?>
1683
- <standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
1684
- <bibdata type='standard'>
1685
- <title language='en' format='text/plain'>Document title</title>
1686
- <language>en</language>
1687
- <script>Latn</script>
1688
- <status>
1689
- <stage>published</stage>
1690
- </status>
1691
- <copyright>
1692
- <from>#{Date.today.year}</from>
1693
- </copyright>
1694
- <relation type='translatedFrom'>
1695
- <bibitem>
1696
- <title>--</title>
1697
- <docidentifier>IEC 60050-102</docidentifier>
1698
- </bibitem>
1699
- </relation>
1700
- <ext>
1701
- <doctype>article</doctype>
1702
- </ext>
1703
- </bibdata>
1704
- <sections> </sections>
1705
- <bibliography>
1706
- <references id='_' obligation='informative' normative="true">
1707
- <title>Normative references</title>
1708
- <p id="_">There are no normative references in this document.</p>
1709
- </references>
1710
- </bibliography>
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
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1717
- = Document title
1718
- Author
1719
- :docfile: test.adoc
1720
- :nodoc:
1721
- :novalid:
1722
- :no-isobib:
1723
- :docstage: 10
1724
- :boilerplate-authority: spec/assets/boilerplate.xml
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
- == Clause 1
1723
+ == Clause 1
1727
1724
 
1728
1725
  INPUT
1729
- <standard-document xmlns='https://www.metanorma.org/ns/standoc' type="semantic" version="#{Metanorma::Standoc::VERSION}">
1730
- <bibdata type='standard'>
1731
- <title language='en' format='text/plain'>Document title</title>
1732
- <language>en</language>
1733
- <script>Latn</script>
1734
- <status>
1735
- <stage>10</stage>
1736
- </status>
1737
- <copyright>
1738
- <from>#{Date.today.year}</from>
1739
- </copyright>
1740
- <ext>
1741
- <doctype>article</doctype>
1742
- </ext>
1743
- </bibdata>
1744
- <boilerplate>
1745
- <text>10</text>
1746
- </boilerplate>
1747
- <sections>
1748
- <clause id='_' inline-header='false' obligation='normative'>
1749
- <title>Clause 1</title>
1750
- </clause>
1751
- </sections>
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
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1758
- #{ASCIIDOC_BLANK_HDR}
1759
-
1760
- [[L]]
1761
- == Symbols and abbreviated terms
1762
-
1763
- α:: Definition 1
1764
- Xa:: Definition 2
1765
- x_1_:: Definition 3
1766
- x_m_:: Definition 4
1767
- x:: Definition 5
1768
- stem:[n]:: Definition 6
1769
- m:: Definition 7
1770
- INPUT
1771
- #{BLANK_HDR}
1772
- <sections>
1773
- <definitions id='L' obligation="normative">
1774
- <title>Symbols and abbreviated terms</title>
1775
- <dl id='_'>
1776
- <dt>m</dt>
1777
- <dd>
1778
- <p id='_'>Definition 7</p>
1779
- </dd>
1780
- <dt>
1781
- <stem type='MathML'>
1782
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
1783
- <mi>n</mi>
1784
- </math>
1785
- </stem>
1786
- </dt>
1787
- <dd>
1788
- <p id='_'>Definition 6</p>
1789
- </dd>
1790
- <dt>x</dt>
1791
- <dd>
1792
- <p id='_'>Definition 5</p>
1793
- </dd>
1794
- <dt>x_m_</dt>
1795
- <dd>
1796
- <p id='_'>Definition 4</p>
1797
- </dd>
1798
- <dt>x_1_</dt>
1799
- <dd>
1800
- <p id='_'>Definition 3</p>
1801
- </dd>
1802
- <dt>Xa</dt>
1803
- <dd>
1804
- <p id='_'>Definition 2</p>
1805
- </dd>
1806
- <dt>α</dt>
1807
- <dd>
1808
- <p id='_'>Definition 1</p>
1809
- </dd>
1810
- </dl>
1811
- </definitions>
1812
- </sections>
1813
- </standard-document>
1814
- OUTPUT
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
- it "sorts symbols lists" do
1818
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1819
- #{ASCIIDOC_BLANK_HDR}
1820
-
1821
- [[L]]
1822
- == Symbols and abbreviated terms
1823
-
1824
- stem:[alpha]:: Definition 1
1825
- xa:: Definition 2
1826
- stem:[x_1]:: Definition 3
1827
- stem:[x_m]:: Definition 4
1828
- x:: Definition 5
1829
- INPUT
1830
- #{BLANK_HDR}
1831
- <sections>
1832
- <definitions id='L' obligation="normative">
1833
- <title>Symbols and abbreviated terms</title>
1834
- <dl id='_'>
1835
- <dt>x</dt>
1836
- <dd>
1837
- <p id='_'>Definition 5</p>
1838
- </dd>
1839
- <dt><stem type='MathML'>
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
- <msub>
1842
- <mrow>
1843
- <mi>x</mi>
1844
- </mrow>
1845
- <mrow>
1846
- <mi>m</mi>
1847
- </mrow>
1848
- </msub>
1849
- </math>
1850
- </stem></dt>
1851
- <dd>
1852
- <p id='_'>Definition 4</p>
1853
- </dd>
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
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
1892
- #{ASCIIDOC_BLANK_HDR}
1893
-
1894
- == Clause
1895
-
1896
- [.requirement,subsequence="A",inherit="/ss/584/2015/level/1 &amp; /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 &amp; /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
- it "moves %beforeclause admonitions to right position" do
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 &amp; /ss/584/2015/level/2"]
1894
+ .Title
1895
+ ====
1896
+ inherit:[A]
1897
+ inherit:[B]
1898
+ I recommend this
1899
+ ====
2021
1900
 
2022
- it "fixes illegal anchors" do
2023
- input = <<~INPUT
2024
- #{ASCIIDOC_BLANK_HDR}
2025
-
2026
- [[a:b]]
2027
- == A
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
- it "moves title footnotes to bibdata" do
2085
- input = <<~INPUT
2086
- = Document title footnote:[ABC] footnote:[DEF]
2087
- Author
2088
- :docfile: test.adoc
2089
- :nodoc:
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
- end
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 &amp; /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
- it "converts UnitsML to MathML" do
2123
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~INPUT, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
2124
- = Document title
2125
- Author
2126
- :stem:
2127
-
2128
- [stem]
2129
- ++++
2130
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2131
- <mrow>
2132
- <mn>7</mn>
2133
- <mtext>unitsml(m*kg^-2)</mtext>
2134
- <mo>+</mo>
2135
- <mn>8</mn>
2136
- <mtext>unitsml(m*kg^-2)</mtext>
2137
- </mrow>
2138
- </math>
2139
- ++++
2140
- INPUT
2141
- #{BLANK_HDR}
2142
- <misc-container>
2143
- <UnitsML xmlns='http://unitsml.nist.gov/2005'>
2144
- <UnitSet>
2145
- <Unit xml:id='U_m.kg-2' dimensionURL='#D_LM-2'>
2146
- <UnitSystem name='SI' type='SI_derived' xml:lang='en-US'/>
2147
- <UnitName xml:lang='en'>m*kg^-2</UnitName>
2148
- <UnitSymbol type='HTML'>
2149
- m&#160;kg
2150
- <sup>&#8722;2</sup>
2151
- </UnitSymbol>
2152
- <UnitSymbol type='MathML'>
2153
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2154
- <mrow>
2155
- <mi mathvariant='normal'>m</mi>
2156
- <mo rspace='thickmathspace'>&#8290;</mo>
2157
- <msup>
2158
- <mrow>
2159
- <mi mathvariant='normal'>kg</mi>
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&#160;kg
2143
+ <sup>&#8722;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'>&#8290;</mo>
2150
+ <msup>
2151
+ <mrow>
2152
+ <mi mathvariant='normal'>kg</mi>
2153
+ </mrow>
2154
+ <mrow>
2155
+ <mo>&#8722;</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'>&#8290;</mo>
2192
+ <mrow xref='U_m.kg-2'>
2193
+ <mi mathvariant='normal'>m</mi>
2194
+ <mo rspace='thickmathspace'>&#8290;</mo>
2195
+ <msup>
2196
+ <mrow>
2197
+ <mi mathvariant='normal'>kg</mi>
2198
+ </mrow>
2199
+ <mrow>
2200
+ <mo>&#8722;</mo>
2201
+ <mn>2</mn>
2202
+ </mrow>
2203
+ </msup>
2160
2204
  </mrow>
2161
- <mrow>
2162
- <mo>&#8722;</mo>
2163
- <mn>2</mn>
2205
+ <mo>+</mo>
2206
+ <mn>8</mn>
2207
+ <mo rspace='thickmathspace'>&#8290;</mo>
2208
+ <mrow xref='U_m.kg-2'>
2209
+ <mi mathvariant='normal'>m</mi>
2210
+ <mo rspace='thickmathspace'>&#8290;</mo>
2211
+ <msup>
2212
+ <mrow>
2213
+ <mi mathvariant='normal'>kg</mi>
2214
+ </mrow>
2215
+ <mrow>
2216
+ <mo>&#8722;</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'>&#8290;</mo>
2199
- <mrow xref='U_m.kg-2'>
2200
- <mi mathvariant='normal'>m</mi>
2201
- <mo rspace='thickmathspace'>&#8290;</mo>
2202
- <msup>
2203
- <mrow>
2204
- <mi mathvariant='normal'>kg</mi>
2205
- </mrow>
2206
- <mrow>
2207
- <mo>&#8722;</mo>
2208
- <mn>2</mn>
2209
- </mrow>
2210
- </msup>
2211
- </mrow>
2212
- <mo>+</mo>
2213
- <mn>8</mn>
2214
- <mo rspace='thickmathspace'>&#8290;</mo>
2215
- <mrow xref='U_m.kg-2'>
2216
- <mi mathvariant='normal'>m</mi>
2217
- <mo rspace='thickmathspace'>&#8290;</mo>
2218
- <msup>
2219
- <mrow>
2220
- <mi mathvariant='normal'>kg</mi>
2221
- </mrow>
2222
- <mrow>
2223
- <mo>&#8722;</mo>
2224
- <mn>2</mn>
2225
2221
  </mrow>
2226
- </msup>
2227
- </mrow>
2228
- </mrow>
2229
- </math>
2230
- </stem>
2231
- </formula>
2232
- </sections>
2233
- </standard-document>
2234
- OUTPUT
2222
+ </math>
2223
+ </stem>
2224
+ </formula>
2225
+ </sections>
2226
+ </standard-document>
2227
+ OUTPUT
2228
+ end
2235
2229
 
2236
- end
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
- it "customises italicisation of MathML" do
2239
- input = <<~INPUT
2240
- = Document title
2241
- Author
2242
- :stem:
2243
-
2244
- [stem]
2245
- ++++
2246
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2247
- <mi>A</mi>
2248
- <mo>+</mo>
2249
- <mi>a</mi>
2250
- <mo>+</mo>
2251
- <mi>Α</mi>
2252
- <mo>+</mo>
2253
- <mi>α</mi>
2254
- <mo>+</mo>
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
- <mo>+</mo>
2277
- <mi>α</mi>
2278
- <mo>+</mo>
2279
- <mi>AB</mi>
2280
- <mstyle mathvariant='italic'>
2281
- <mrow>
2282
- <mi>Α</mi>
2283
- </mrow>
2284
- </mstyle>
2285
- </math>
2286
- </stem>
2287
- </formula>
2288
- </sections>
2289
- </standard-document>
2290
- OUTPUT
2291
- mock_mathml_italicise({ uppergreek: false, upperroman: true, lowergreek: true, lowerroman: true })
2292
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
2293
- #{BLANK_HDR}
2294
- <sections>
2295
- <formula id='_'>
2296
- <stem type='MathML'>
2297
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2298
- <mi>A</mi>
2299
- <mo>+</mo>
2300
- <mi>a</mi>
2301
- <mo>+</mo>
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
- <mo>+</mo>
2331
- <mi>α</mi>
2332
- <mo>+</mo>
2333
- <mi>AB</mi>
2334
- <mstyle mathvariant='italic'>
2335
- <mrow>
2336
- <mi>Α</mi>
2337
- </mrow>
2338
- </mstyle>
2339
- </math>
2340
- </stem>
2341
- </formula>
2342
- </sections>
2343
- </standard-document>
2344
- OUTPUT
2345
- mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: false, lowerroman: true })
2346
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
2347
- #{BLANK_HDR}
2348
- <sections>
2349
- <formula id='_'>
2350
- <stem type='MathML'>
2351
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2352
- <mi>A</mi>
2353
- <mo>+</mo>
2354
- <mi>a</mi>
2355
- <mo>+</mo>
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
- <mo>+</mo>
2358
- <mi mathvariant="normal">α</mi>
2359
- <mo>+</mo>
2360
- <mi>AB</mi>
2361
- <mstyle mathvariant='italic'>
2362
- <mrow>
2363
- <mi>Α</mi>
2364
- </mrow>
2365
- </mstyle>
2366
- </math>
2367
- </stem>
2368
- </formula>
2369
- </sections>
2370
- </standard-document>
2371
- OUTPUT
2372
- mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: false })
2373
- expect(xmlpp(strip_guid(Asciidoctor.convert(input, backend: :standoc, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
2374
- #{BLANK_HDR}
2375
- <sections>
2376
- <formula id='_'>
2377
- <stem type='MathML'>
2378
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
2379
- <mi>A</mi>
2380
- <mo>+</mo>
2381
- <mi mathvariant="normal">a</mi>
2382
- <mo>+</mo>
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
- <mo>+</mo>
2385
- <mi>α</mi>
2386
- <mo>+</mo>
2387
- <mi>AB</mi>
2388
- <mstyle mathvariant='italic'>
2389
- <mrow>
2390
- <mi>Α</mi>
2391
- </mrow>
2392
- </mstyle>
2393
- </math>
2394
- </stem>
2395
- </formula>
2396
- </sections>
2397
- </standard-document>
2398
- OUTPUT
2399
- mock_mathml_italicise({ uppergreek: true, upperroman: true, lowergreek: true, lowerroman: true })
2400
-
2401
-
2402
- end
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
- #{BLANK_HDR}
2426
- <sections>
2427
- <clause id='_' inline-header='false' obligation='normative'>
2428
- <title>Clause</title>
2429
- <p id='_'>
2430
- <eref bibitemid='uml_A' citeas="">
2431
- <localityStack>
2432
- <locality type='anchor'><referenceFrom>A.B.C</referenceFrom></locality>
2433
- </localityStack>
2434
- C
2435
- </eref>
2436
- <eref bibitemid='uml_A' citeas=""/>
2437
- <xref target='action.AA'>AA</xref>
2438
- <xref target='action'>** Missing target action.AB</xref>
2439
- </p>
2440
- </clause>
2441
- <clause id='action' type='express-schema' inline-header='false' obligation='normative'>
2442
- <title>Action</title>
2443
- <clause id='action.AA' inline-header='false' obligation='normative'>
2444
- <title>AA</title>
2445
- </clause>
2446
- </clause>
2447
- </sections>
2448
- <bibliography>
2449
- <references id='_' normative='false' obligation='informative'>
2450
- <title>Bibliography</title>
2451
- <bibitem id='D'>
2452
- <formattedref format='application/x-isodoc+xml'>F</formattedref>
2453
- <docidentifier>E</docidentifier>
2454
- </bibitem>
2455
- </references>
2456
- <references hidden='true' normative='false'>
2457
- <bibitem id='uml_A' type='internal'>
2458
- <docidentifier type='repository'>uml/A</docidentifier>
2459
- </bibitem>
2460
- </references>
2461
- </bibliography>
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
- #{BLANK_HDR}
2483
- <sections>
2484
- <clause id='B' type='express-schema' inline-header='false' obligation='normative'>
2485
- <title>Clause</title>
2486
- <note id='B1'>
2487
- <p id='_'>X</p>
2488
- </note>
2489
- <p id='_'>
2490
- <eref bibitemid='express-schema_A' citeas=''>
2491
- <localityStack>
2492
- <locality type='anchor'>
2493
- <referenceFrom>A.B.C</referenceFrom>
2494
- </locality>
2495
- </localityStack>
2496
- C
2497
- </eref>
2498
- <eref bibitemid='express-schema_A' citeas=''/>
2499
- <xref target='B'/>
2500
- <xref target='B1'/>
2501
- </p>
2502
- </clause>
2503
- </sections>
2504
- <bibliography>
2505
- <references hidden='true' normative='false'>
2506
- <bibitem id='express-schema_A' type='internal'>
2507
- <docidentifier type='repository'>express-schema/A</docidentifier>
2508
- </bibitem>
2509
- </references>
2510
- </bibliography>
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
- allow_any_instance_of(::Asciidoctor::Standoc::Cleanup).to receive(:mathml_mi_italics).and_return(x)
2507
+ allow_any_instance_of(::Asciidoctor::Standoc::Cleanup).to receive(:mathml_mi_italics).and_return(x)
2520
2508
  end
2521
2509
 
2522
-
2523
- def mock_iecbib_get_iec60050_103_01
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
- <bibitem type="standard" id="IEC60050-103">
2527
- <title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
2528
- <docidentifier>IEC 60050-103:2009</docidentifier>
2529
- <date type="published">
2530
- <on>2009</on>
2531
- </date>
2532
- <contributor>
2533
- <role type="publisher"/>
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
- </owner>
2555
- </copyright>
2556
- </bibitem>
2557
- OUTPUT
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
- def mock_iecbib_get_iec60050_102_01
2562
- expect(Iecbib::IecBibliography).to receive(:get).with("IEC 60050-102", nil, {keep_year: true}) do
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
- <bibitem type="standard" id="IEC60050-102">
2565
- <title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
2566
- <docidentifier>IEC 60050-102:2007</docidentifier>
2567
- <date type="published">
2568
- <on>2007</on>
2569
- </date>
2570
- <contributor>
2571
- <role type="publisher"/>
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
- </owner>
2593
- </copyright>
2594
- </bibitem>
2595
- OUTPUT
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
- def mock_iev
2600
- expect(Iecbib::IecBibliography).to receive(:get).with("IEV", nil, {}) do
2586
+ def mock_iev
2587
+ expect(Iecbib::IecBibliography).to receive(:get).with("IEV", nil, {}) do
2601
2588
  IsoBibItem::XMLParser.from_xml(<<~"OUTPUT")
2602
- <bibitem type="standard" id="IEC60050:2001">
2603
- <title format="text/plain" language="en" script="Latn">International Electrotechnical Vocabulary</title>
2604
- <docidentifier>IEC 60050:2011</docidentifier>
2605
- <date type="published">
2606
- <on>2007</on>
2607
- </date>
2608
- <contributor>
2609
- <role type="publisher"/>
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
- </owner>
2631
- </copyright>
2632
- </bibitem>
2633
- OUTPUT
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