metanorma-iec 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cd21e4886d8c7426dd1e57de8b2b9a5ab7084ba8531511b3c0f0de3a45bf4a3
4
- data.tar.gz: 9f79a235ac0257bb71402e21dc68db605550bdafc8c9147a559ed2c687e1fad0
3
+ metadata.gz: 9269b3c3d3cbca9003e0cd77a30cd9a8e2c170236c43ff5d75621aaac3c3a49d
4
+ data.tar.gz: e942d482fb73842b2f1334219a99c1e90ac385e9451d96e4898c731caf601d9b
5
5
  SHA512:
6
- metadata.gz: 27946ec01bc3ed4506e848ba8595fee579e9e071cb994995ef658cd93c44e943f62487e1d5b458abde6024acb376adc48154030e0367e382a29f40540cc56abb
7
- data.tar.gz: 21bd7b1f85dafbc5da6994884c38119efa661fd3eca7f8b5e81f61e7f311ccca0dd5e983b3f929c5638011580563a344b4cec1602e7a3ed535408be187d6c8b0
6
+ metadata.gz: e90aa07d513f24ed78748662e3fc40e581ca5fddcf66a6f20d05bf54014f7c2803e64dfd02e67cb05b82125783e14915ea04ade4e23245ecf989c5eb941397eb
7
+ data.tar.gz: 633db8ee4bd8e6b36643523a54c9683f789b7da74f6394be682dee63d4666ba3f9503dbcc62087753d41977a60b56743f6a57dc859c9691452fed278fe9eb738
data/README.adoc CHANGED
@@ -1,11 +1,11 @@
1
1
  = metanorma-iec: Metanorma processor for the International Electrotechnical Commission
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-iec.svg["Gem Version", link="https://rubygems.org/gems/metanorma-iec"]
4
- image:https://img.shields.io/travis/metanorma/metanorma-iec/master.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-iec"]
5
- image:https://ci.appveyor.com/api/projects/status/odgc3ltblokvd6e7?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/metanorma-iec"]
4
+ image:https://travis-ci.com/metanorma/metanorma-iec.svg["Build Status", link="https://travis-ci.com/metanorma/metanorma-iec"]
5
+ image:https://ci.appveyor.com/api/projects/status/030ike7d50201e7m?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/metanorma/metanorma-iec"]
6
6
  image:https://codeclimate.com/github/metanorma/metanorma-iec/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-iec"]
7
-
8
- WARNING: This gem is still under development.
7
+ image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-iec.svg["Pull Requests", link="https://github.com/metanorma/metanorma-iec/pulls"]
8
+ image:https://img.shields.io/github/commits-since/metanorma/metanorma-iec/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-iec/releases"]
9
9
 
10
10
  == Functionality
11
11
 
@@ -341,11 +341,6 @@
341
341
  </oneOrMore>
342
342
  </element>
343
343
  </define>
344
- <define name="tclass">
345
- <element name="name">
346
- <text/>
347
- </element>
348
- </define>
349
344
  <define name="thead">
350
345
  <element name="thead">
351
346
  <ref name="tr"/>
@@ -515,19 +510,22 @@
515
510
  <attribute name="subsequence"/>
516
511
  </optional>
517
512
  <optional>
518
- <ref name="source"/>
513
+ <attribute name="class"/>
519
514
  </optional>
520
515
  <optional>
521
- <ref name="tname"/>
516
+ <ref name="source"/>
522
517
  </optional>
523
518
  <optional>
524
- <ref name="tclass"/>
519
+ <ref name="tname"/>
525
520
  </optional>
526
521
  <choice>
527
522
  <ref name="image"/>
528
523
  <ref name="video"/>
529
524
  <ref name="audio"/>
530
525
  <ref name="pre"/>
526
+ <oneOrMore>
527
+ <ref name="paragraph-with-footnote"/>
528
+ </oneOrMore>
531
529
  <zeroOrMore>
532
530
  <ref name="figure"/>
533
531
  </zeroOrMore>
@@ -43,11 +43,11 @@ name="CVP_Secretariat_Loca">Secretariat</a>: {{ secretariat }}</p>
43
43
  {% if unpublished %}
44
44
  <div class="coverpage_warning">
45
45
 
46
- <p>Warning for WDs
47
- and CDs<o:p></o:p></span></b></p>
46
+ <p>Warning for CDs, CDVs
47
+ and FDISs<o:p></o:p></span></b></p>
48
48
 
49
49
  <p>This
50
- document is not an ISO International Standard. It is distributed for review and
50
+ document is not an IEC International Standard. It is distributed for review and
51
51
  comment. It is subject to change without notice and may not be referred to as
52
52
  an International Standard.</p>
53
53
 
@@ -626,7 +626,7 @@ font-family: $monospacefont;
626
626
  font-variant-ligatures: none;
627
627
  }
628
628
 
629
- .figure, .Sourcecode {
629
+ .figure, .Sourcecode, .pseudocode {
630
630
  background-color: #f7f7f7;
631
631
  line-height: 1.6em;
632
632
  padding: 1.5em;
@@ -691,7 +691,7 @@ margin-top:0;
691
691
  }
692
692
 
693
693
 
694
- .example .Sourcecode {
694
+ .example .Sourcecode, .example .pseudocode {
695
695
  background: none;
696
696
  }
697
697
 
@@ -19,6 +19,26 @@ p.Sourcecode, li.Sourcecode, div.Sourcecode, pre.Sourcecode
19
19
  mso-ansi-language:EN-GB;
20
20
  mso-fareast-language:ZH-CN;
21
21
  mso-no-proof:yes;}
22
+ p.pseudocode, li.pseudocode, div.pseudocode
23
+ {mso-style-unhide:no;
24
+ mso-style-unhide:no;
25
+ margin-top:5.0pt;
26
+ margin-right:0cm;
27
+ margin-bottom:5.0pt;
28
+ margin-left:0cm;
29
+ mso-add-space:auto;
30
+ text-align:left;
31
+ mso-pagination:widow-orphan;
32
+ layout-grid-mode:char;
33
+ font-size:9.0pt;
34
+ mso-bidi-font-size:10.0pt;
35
+ font-family:"Arial",sans-serif;
36
+ mso-fareast-font-family:"Times New Roman";
37
+ mso-bidi-font-family:Arial;
38
+ letter-spacing:-.1pt;
39
+ mso-ansi-language:EN-GB;
40
+ mso-fareast-language:ZH-CN;
41
+ mso-no-proof:yes;}
22
42
  p.CODE-TableCell, li.CODE-TableCell, div.CODE-TableCell, pre.CODE-TableCell
23
43
  {mso-style-name:CODE-TableCell;
24
44
  mso-style-unhide:no;
@@ -783,6 +803,10 @@ div.example p.MsoListParagraph {
783
803
  font-size: 10.0pt;
784
804
  }
785
805
 
806
+ div.Note p.MsoListParagraph {
807
+ font-size: 8.0pt;
808
+ }
809
+
786
810
  div.example, td.example {
787
811
  margin:0in;
788
812
  margin-bottom:12.0pt;
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
6
6
 
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
27
27
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
28
28
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
29
29
 
30
- spec.add_dependency "asciidoctor", "~> 1.5.7"
31
30
  spec.add_dependency "ruby-jing"
32
31
  spec.add_dependency "isodoc", "~> 1.0.0"
33
32
  spec.add_dependency "metanorma-iso", "~> 1.3.0"
@@ -18,7 +18,7 @@ RSpec.describe Asciidoctor::Iec do
18
18
  #end
19
19
 
20
20
  it "processes a blank document" do
21
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
21
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
22
22
  #{ASCIIDOC_BLANK_HDR}
23
23
  INPUT
24
24
  #{BLANK_HDR}
@@ -29,7 +29,7 @@ RSpec.describe Asciidoctor::Iec do
29
29
 
30
30
  it "converts a blank document" do
31
31
  FileUtils.rm_f "test.doc"
32
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
32
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
33
33
  = Document title
34
34
  Author
35
35
  :docfile: test.adoc
@@ -45,7 +45,7 @@ RSpec.describe Asciidoctor::Iec do
45
45
  end
46
46
 
47
47
  it "processes default metadata" do
48
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
48
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
49
49
  = Document title
50
50
  Author
51
51
  :docfile: test.adoc
@@ -169,7 +169,7 @@ RSpec.describe Asciidoctor::Iec do
169
169
 
170
170
 
171
171
  it "processes complex metadata" do
172
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
172
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
173
173
  = Document title
174
174
  Author
175
175
  :docfile: test.adoc
@@ -323,7 +323,7 @@ RSpec.describe Asciidoctor::Iec do
323
323
  end
324
324
 
325
325
  it "defaults substage" do
326
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
326
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
327
327
  = Document title
328
328
  Author
329
329
  :docfile: test.adoc
@@ -386,7 +386,7 @@ OUTPUT
386
386
  end
387
387
 
388
388
  it "defaults substage for stage 60" do
389
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
389
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
390
390
  = Document title
391
391
  Author
392
392
  :docfile: test.adoc
@@ -449,7 +449,7 @@ OUTPUT
449
449
  end
450
450
 
451
451
  it "populates metadata for PRF" do
452
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
452
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
453
453
  = Document title
454
454
  Author
455
455
  :docfile: test.adoc
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::Iec do
4
4
  it "processes open blocks" do
5
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  --
8
8
  x
@@ -21,7 +21,7 @@ RSpec.describe Asciidoctor::Iec do
21
21
  end
22
22
 
23
23
  it "processes stem blocks" do
24
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
24
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
25
25
  #{ASCIIDOC_BLANK_HDR}
26
26
  [stem]
27
27
  ++++
@@ -42,7 +42,6 @@ RSpec.describe Asciidoctor::Iec do
42
42
 
43
43
  <formula id="_">
44
44
  <stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub> <mrow> <mrow> <mi mathvariant="bold-italic">F</mi> </mrow> </mrow> <mrow> <mrow> <mi mathvariant="bold-italic">Α</mi> </mrow> </mrow> </msub> </math></stem>
45
- </stem>
46
45
  </formula>
47
46
  </sections>
48
47
  </iso-standard>
@@ -50,7 +49,7 @@ RSpec.describe Asciidoctor::Iec do
50
49
  end
51
50
 
52
51
  it "ignores review blocks unless document is in draft mode" do
53
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
52
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
54
53
  #{ASCIIDOC_BLANK_HDR}
55
54
  [[foreword]]
56
55
  .Foreword
@@ -71,7 +70,7 @@ RSpec.describe Asciidoctor::Iec do
71
70
  end
72
71
 
73
72
  it "processes review blocks if document is in draft mode" do
74
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)).sub(/^.+<sections>/m, "")).to be_equivalent_to <<~"OUTPUT"
73
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)).sub(/^.+<sections>/m, "<sections>").sub(%r{</sections>.*$}m, "</sections>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
75
74
  = Document title
76
75
  Author
77
76
  :docfile: test.adoc
@@ -91,16 +90,16 @@ RSpec.describe Asciidoctor::Iec do
91
90
  For further information on the Foreword, see *ISO/IEC Directives, Part 2, 2016, Clause 12.*
92
91
  ****
93
92
  INPUT
93
+ <sections>
94
94
  <p id="foreword">Foreword</p>
95
95
  <review reviewer="ISO" id="_" date="20170101T00:00:00Z" from="foreword" to="foreword"><p id="_">A Foreword shall appear in each document. The generic text is shown here. It does not contain requirements, recommendations or permissions.</p>
96
96
  <p id="_">For further information on the Foreword, see <strong>ISO/IEC Directives, Part 2, 2016, Clause 12.</strong></p></review></sections>
97
- </iso-standard>
98
97
 
99
98
  OUTPUT
100
99
  end
101
100
 
102
101
  it "processes term notes" do
103
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
102
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
104
103
  #{ASCIIDOC_BLANK_HDR}
105
104
  == Terms and Definitions
106
105
 
@@ -127,7 +126,7 @@ RSpec.describe Asciidoctor::Iec do
127
126
  end
128
127
 
129
128
  it "processes notes" do
130
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
129
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
131
130
  #{ASCIIDOC_BLANK_HDR}
132
131
  NOTE: This is a note
133
132
  INPUT
@@ -143,7 +142,7 @@ RSpec.describe Asciidoctor::Iec do
143
142
  end
144
143
 
145
144
  it "processes literals" do
146
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
145
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
147
146
  #{ASCIIDOC_BLANK_HDR}
148
147
  ....
149
148
  LITERAL
@@ -160,7 +159,7 @@ RSpec.describe Asciidoctor::Iec do
160
159
  end
161
160
 
162
161
  it "processes simple admonitions with Asciidoc names" do
163
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
162
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
164
163
  #{ASCIIDOC_BLANK_HDR}
165
164
  CAUTION: Only use paddy or parboiled rice for the determination of husked rice yield.
166
165
  INPUT
@@ -177,7 +176,7 @@ RSpec.describe Asciidoctor::Iec do
177
176
 
178
177
 
179
178
  it "processes complex admonitions with non-Asciidoc names" do
180
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
179
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
181
180
  #{ASCIIDOC_BLANK_HDR}
182
181
  [CAUTION,type=Safety Precautions]
183
182
  .Safety Precautions
@@ -210,7 +209,7 @@ RSpec.describe Asciidoctor::Iec do
210
209
  end
211
210
 
212
211
  it "processes term examples" do
213
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
212
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
214
213
  #{ASCIIDOC_BLANK_HDR}
215
214
  == Terms and Definitions
216
215
 
@@ -239,7 +238,7 @@ RSpec.describe Asciidoctor::Iec do
239
238
  end
240
239
 
241
240
  it "processes examples" do
242
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
241
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
243
242
  #{ASCIIDOC_BLANK_HDR}
244
243
  [example]
245
244
  ====
@@ -258,7 +257,7 @@ RSpec.describe Asciidoctor::Iec do
258
257
  end
259
258
 
260
259
  it "processes preambles" do
261
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
260
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
262
261
  #{ASCIIDOC_BLANK_HDR}
263
262
  This is a preamble
264
263
 
@@ -277,7 +276,7 @@ RSpec.describe Asciidoctor::Iec do
277
276
  end
278
277
 
279
278
  it "processes images" do
280
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
279
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
281
280
  #{ASCIIDOC_BLANK_HDR}
282
281
  .Split-it-right sample divider
283
282
  image::spec/examples/rice_images/rice_image1.png[]
@@ -295,7 +294,7 @@ RSpec.describe Asciidoctor::Iec do
295
294
  end
296
295
 
297
296
  it "accepts width and height attributes on images" do
298
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
297
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
299
298
  #{ASCIIDOC_BLANK_HDR}
300
299
  [height=4,width=3]
301
300
  image::spec/examples/rice_images/rice_image1.png[]
@@ -312,7 +311,7 @@ RSpec.describe Asciidoctor::Iec do
312
311
  end
313
312
 
314
313
  it "accepts auto for width and height attributes on images" do
315
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
314
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
316
315
  #{ASCIIDOC_BLANK_HDR}
317
316
  [height=4,width=auto]
318
317
  image::spec/examples/rice_images/rice_image1.png[]
@@ -329,7 +328,7 @@ RSpec.describe Asciidoctor::Iec do
329
328
  end
330
329
 
331
330
  it "accepts alignment attribute on paragraphs" do
332
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
331
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
333
332
  #{ASCIIDOC_BLANK_HDR}
334
333
  [align=right]
335
334
  This para is right-aligned.
@@ -343,7 +342,7 @@ RSpec.describe Asciidoctor::Iec do
343
342
  end
344
343
 
345
344
  it "processes blockquotes" do
346
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
345
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
347
346
  #{ASCIIDOC_BLANK_HDR}
348
347
  [quote, ISO, "ISO7301,section 1"]
349
348
  ____
@@ -363,7 +362,7 @@ RSpec.describe Asciidoctor::Iec do
363
362
  end
364
363
 
365
364
  it "processes source code" do
366
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
365
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
367
366
  #{ASCIIDOC_BLANK_HDR}
368
367
  [source,ruby]
369
368
  --
@@ -385,7 +384,7 @@ RSpec.describe Asciidoctor::Iec do
385
384
  end
386
385
 
387
386
  it "processes callouts" do
388
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
387
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
389
388
  #{ASCIIDOC_BLANK_HDR}
390
389
  [source,ruby]
391
390
  --
@@ -412,7 +411,7 @@ RSpec.describe Asciidoctor::Iec do
412
411
  end
413
412
 
414
413
  it "processes unmodified term sources" do
415
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
414
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
416
415
  #{ASCIIDOC_BLANK_HDR}
417
416
  == Terms and Definitions
418
417
 
@@ -440,7 +439,7 @@ RSpec.describe Asciidoctor::Iec do
440
439
  end
441
440
 
442
441
  it "processes modified term sources" do
443
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
442
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
444
443
  #{ASCIIDOC_BLANK_HDR}
445
444
  == Terms and Definitions
446
445
 
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::Iec do
4
4
  it "removes empty text elements" do
5
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
5
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  == {blank}
8
8
  INPUT
@@ -17,7 +17,7 @@ RSpec.describe Asciidoctor::Iec do
17
17
  end
18
18
 
19
19
  it "processes stem-only terms as admitted" do
20
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
20
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
21
21
  #{ASCIIDOC_BLANK_HDR}
22
22
  == Terms and Definitions
23
23
 
@@ -43,7 +43,7 @@ RSpec.describe Asciidoctor::Iec do
43
43
  end
44
44
 
45
45
  it "moves term domains out of the term definition paragraph" do
46
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
46
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
47
47
  #{ASCIIDOC_BLANK_HDR}
48
48
  == Terms and Definitions
49
49
 
@@ -69,7 +69,7 @@ RSpec.describe Asciidoctor::Iec do
69
69
  end
70
70
 
71
71
  it "permits multiple blocks in term definition paragraph" do
72
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
72
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
73
73
  = Document title
74
74
  Author
75
75
  :docfile: test.adoc
@@ -107,7 +107,7 @@ RSpec.describe Asciidoctor::Iec do
107
107
  end
108
108
 
109
109
  it "strips any initial boilerplate from terms and definitions" do
110
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
110
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
111
111
  #{ASCIIDOC_BLANK_HDR}
112
112
  == Terms and Definitions
113
113
 
@@ -135,84 +135,8 @@ RSpec.describe Asciidoctor::Iec do
135
135
  OUTPUT
136
136
  end
137
137
 
138
- it "converts xrefs to references into erefs" do
139
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
140
- #{ASCIIDOC_BLANK_HDR}
141
- <<iso216>>
142
-
143
- [bibliography]
144
- == Normative References
145
- * [[[iso216,ISO 216:2001]]], _Reference_
146
- INPUT
147
- #{BLANK_HDR}
148
- <preface><foreword obligation="informative">
149
- <title>Foreword</title>
150
- <p id="_">
151
- <eref type="inline" bibitemid="iso216" citeas="ISO 216:2001"/>
152
- </p>
153
- </foreword></preface><sections>
154
- </sections><bibliography><references id="_" obligation="informative">
155
- <title>Normative References</title>
156
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
157
- <bibitem id="iso216" type="standard">
158
- <title format="text/plain">Reference</title>
159
- <docidentifier>ISO 216:2001</docidentifier>
160
- <date type="published">
161
- <on>2001</on>
162
- </date>
163
- <contributor>
164
- <role type="publisher"/>
165
- <organization>
166
- <name>International Organization for Standardization</name>
167
- <abbreviation>ISO</abbreviation>
168
- </organization>
169
- </contributor>
170
- </bibitem>
171
- </references>
172
- </bibliography
173
- </iso-standard>
174
- OUTPUT
175
- end
176
-
177
- it "extracts localities from erefs" do
178
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
179
- #{ASCIIDOC_BLANK_HDR}
180
- <<iso216,whole,clause=3,example=9-11,locality:prelude=33,locality:entirety:the reference>>
181
-
182
- [bibliography]
183
- == Normative References
184
- * [[[iso216,ISO 216]]], _Reference_
185
- INPUT
186
- #{BLANK_HDR}
187
- <preface><foreword obligation="informative">
188
- <title>Foreword</title>
189
- <p id="_">
190
- <eref type="inline" bibitemid="iso216" citeas="ISO 216"><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</referenceFrom></locality><locality type="locality:entirety"/>the reference</eref>
191
- </p>
192
- </foreword></preface><sections>
193
- </sections><bibliography><references id="_" obligation="informative">
194
- <title>Normative References</title>
195
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
196
- <bibitem id="iso216" type="standard">
197
- <title format="text/plain">Reference</title>
198
- <docidentifier>ISO 216</docidentifier>
199
- <contributor>
200
- <role type="publisher"/>
201
- <organization>
202
- <name>International Organization for Standardization</name>
203
- <abbreviation>ISO</abbreviation>
204
- </organization>
205
- </contributor>
206
- </bibitem>
207
- </references>
208
- </bibliography>
209
- </iso-standard>
210
- OUTPUT
211
- end
212
-
213
-
214
138
  it "strips type from xrefs" do
215
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
139
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
216
140
  #{ASCIIDOC_BLANK_HDR}
217
141
  <<iso216>>
218
142
 
@@ -247,7 +171,7 @@ RSpec.describe Asciidoctor::Iec do
247
171
  end
248
172
 
249
173
  it "processes localities in term sources" do
250
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
174
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
251
175
  #{ASCIIDOC_BLANK_HDR}
252
176
  == Terms and Definitions
253
177
 
@@ -275,7 +199,7 @@ RSpec.describe Asciidoctor::Iec do
275
199
  end
276
200
 
277
201
  it "removes extraneous material from Normative References" do
278
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
202
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
279
203
  #{ASCIIDOC_BLANK_HDR}
280
204
  [bibliography]
281
205
  == Normative References
@@ -306,7 +230,7 @@ RSpec.describe Asciidoctor::Iec do
306
230
  end
307
231
 
308
232
  it "inserts IDs into paragraphs" do
309
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
233
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
310
234
  #{ASCIIDOC_BLANK_HDR}
311
235
  Paragraph
312
236
  INPUT
@@ -319,7 +243,7 @@ RSpec.describe Asciidoctor::Iec do
319
243
  end
320
244
 
321
245
  it "inserts IDs into notes" do
322
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
246
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
323
247
  #{ASCIIDOC_BLANK_HDR}
324
248
  [example]
325
249
  ====
@@ -339,7 +263,7 @@ RSpec.describe Asciidoctor::Iec do
339
263
  end
340
264
 
341
265
  it "moves table key inside table" do
342
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
266
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
343
267
  #{ASCIIDOC_BLANK_HDR}
344
268
  |===
345
269
  |a |b |c
@@ -371,7 +295,7 @@ RSpec.describe Asciidoctor::Iec do
371
295
  end
372
296
 
373
297
  it "processes headerrows attribute for table without header rows" do
374
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
298
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
375
299
  #{ASCIIDOC_BLANK_HDR}
376
300
  [headerrows=3]
377
301
  |===
@@ -410,7 +334,7 @@ RSpec.describe Asciidoctor::Iec do
410
334
  end
411
335
 
412
336
  it "processes headerrows attribute for table with header rows" do
413
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
337
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
414
338
  #{ASCIIDOC_BLANK_HDR}
415
339
  [headerrows=3]
416
340
  |===
@@ -454,38 +378,8 @@ RSpec.describe Asciidoctor::Iec do
454
378
  OUTPUT
455
379
  end
456
380
 
457
- it "moves table notes inside table" do
458
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
459
- #{ASCIIDOC_BLANK_HDR}
460
- |===
461
- |a |b |c
462
- |===
463
-
464
- NOTE: Note 1
465
-
466
- NOTE: Note 2
467
- INPUT
468
- #{BLANK_HDR}
469
- <sections><table id="_">
470
- <tbody>
471
- <tr>
472
- <td align="left">a</td>
473
- <td align="left">b</td>
474
- <td align="left">c</td>
475
- </tr>
476
- </tbody>
477
- <note id="_">
478
- <p id="_">Note 1</p>
479
- </note><note id="_">
480
- <p id="_">Note 2</p>
481
- </note></table>
482
-
483
- </sections>
484
- OUTPUT
485
- end
486
-
487
381
  it "moves formula key inside formula" do
488
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
382
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
489
383
  #{ASCIIDOC_BLANK_HDR}
490
384
  [stem]
491
385
  ++++
@@ -512,7 +406,7 @@ RSpec.describe Asciidoctor::Iec do
512
406
  end
513
407
 
514
408
  it "moves footnotes inside figures" do
515
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
409
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
516
410
  #{ASCIIDOC_BLANK_HDR}
517
411
  image::spec/examples/rice_images/rice_image1.png[]
518
412
 
@@ -536,7 +430,7 @@ RSpec.describe Asciidoctor::Iec do
536
430
  end
537
431
 
538
432
  it "moves figure key inside figure" do
539
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
433
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
540
434
  #{ASCIIDOC_BLANK_HDR}
541
435
  image::spec/examples/rice_images/rice_image1.png[]
542
436
 
@@ -561,7 +455,7 @@ RSpec.describe Asciidoctor::Iec do
561
455
  end
562
456
 
563
457
  it "numbers bibliographic notes and footnotes sequentially" do
564
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
458
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
565
459
  #{ASCIIDOC_BLANK_HDR}
566
460
  footnote:[Footnote]
567
461
 
@@ -613,7 +507,7 @@ RSpec.describe Asciidoctor::Iec do
613
507
  end
614
508
 
615
509
  it "defaults section obligations" do
616
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
510
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
617
511
  #{ASCIIDOC_BLANK_HDR}
618
512
 
619
513
  == Clause
@@ -638,7 +532,7 @@ RSpec.describe Asciidoctor::Iec do
638
532
  end
639
533
 
640
534
  it "extends clause levels past 5" do
641
- expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
535
+ expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iec, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
642
536
  #{ASCIIDOC_BLANK_HDR}
643
537
 
644
538
  == Clause1