metanorma-standoc 1.8.7 → 1.9.3

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