metanorma-iec 2.0.8 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/html/html_iec_titlepage.html +1 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +475 -180
- data/lib/isodoc/iec/init.rb +6 -5
- data/lib/isodoc/iec/presentation_xml_convert.rb +3 -3
- data/lib/isodoc/iec/xref.rb +4 -0
- data/lib/metanorma/iec/biblio.rng +37 -8
- data/lib/metanorma/iec/iec.rng +1 -0
- data/lib/metanorma/iec/isodoc.rng +56 -0
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/isodoc/blocks_spec.rb +146 -202
- data/spec/isodoc/i18n_spec.rb +22 -7
- data/spec/isodoc/iev_spec.rb +7 -7
- data/spec/isodoc/inline_spec.rb +255 -249
- data/spec/isodoc/ref_spec.rb +14 -62
- data/spec/metanorma/base_spec.rb +2 -2
- data/spec/metanorma/inline_spec.rb +6 -6
- metadata +4 -4
data/lib/isodoc/iec/init.rb
CHANGED
@@ -10,12 +10,14 @@ module IsoDoc
|
|
10
10
|
@meta = Metadata.new(lang, script, labels)
|
11
11
|
end
|
12
12
|
|
13
|
-
def xref_init(lang, script,
|
14
|
-
@xrefs = Xref.new(lang, script,
|
13
|
+
def xref_init(lang, script, _klass, labels, options)
|
14
|
+
@xrefs = Xref.new(lang, script,
|
15
|
+
HtmlConvert.new(language: lang, script: script),
|
16
|
+
labels, options)
|
15
17
|
end
|
16
18
|
|
17
|
-
|
18
|
-
@i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
|
19
|
+
def i18n_init(lang, script, i18nyaml = nil)
|
20
|
+
@i18n = I18n.new(lang, script, i18nyaml: i18nyaml || @i18nyaml)
|
19
21
|
end
|
20
22
|
|
21
23
|
def convert1(docxml, filename, dir)
|
@@ -26,4 +28,3 @@ module IsoDoc
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
end
|
29
|
-
|
@@ -7,8 +7,8 @@ module IsoDoc
|
|
7
7
|
def i18n_init(lang, script, i18nyaml = nil)
|
8
8
|
super
|
9
9
|
@i18n_lg = {}
|
10
|
-
@i18n_lg["en"] = I18n.new("en", "Latn", i18nyaml || @i18nyaml)
|
11
|
-
@i18n_lg["fr"] = I18n.new("fr", "Latn", i18nyaml || @i18nyaml)
|
10
|
+
@i18n_lg["en"] = I18n.new("en", "Latn", i18nyaml: i18nyaml || @i18nyaml)
|
11
|
+
@i18n_lg["fr"] = I18n.new("fr", "Latn", i18nyaml: i18nyaml || @i18nyaml)
|
12
12
|
@i18n_lg["default"] = @i18n
|
13
13
|
end
|
14
14
|
|
@@ -89,7 +89,7 @@ module IsoDoc
|
|
89
89
|
fr = docxml.at(ns("//term[@language = 'fr'][@tag = '#{en['tag']}']"))
|
90
90
|
merge_fr_into_en_term1(en, fr) if fr
|
91
91
|
end
|
92
|
-
@xrefs.parse docxml
|
92
|
+
@xrefs.parse_inclusions(clauses: true).parse docxml
|
93
93
|
docxml.xpath(ns("//term/name")).each(&:remove)
|
94
94
|
term(docxml)
|
95
95
|
end
|
data/lib/isodoc/iec/xref.rb
CHANGED
@@ -17,10 +17,14 @@ module IsoDoc
|
|
17
17
|
super
|
18
18
|
return unless @is_iev
|
19
19
|
|
20
|
+
if @parse_settings.empty? || @parse_settings[:clauses]
|
20
21
|
terms_iev_names(docxml)
|
22
|
+
end
|
23
|
+
if @parse_settings.empty?
|
21
24
|
middle_section_asset_names(docxml)
|
22
25
|
termnote_anchor_names(docxml)
|
23
26
|
termexample_anchor_names(docxml)
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
26
30
|
def terms_iev_names(docxml)
|
@@ -851,17 +851,46 @@
|
|
851
851
|
</define>
|
852
852
|
<define name="bplace">
|
853
853
|
<element name="place">
|
854
|
-
<
|
855
|
-
<
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
854
|
+
<choice>
|
855
|
+
<text/>
|
856
|
+
<group>
|
857
|
+
<ref name="bibliocity"/>
|
858
|
+
<zeroOrMore>
|
859
|
+
<ref name="biblioregion"/>
|
860
|
+
</zeroOrMore>
|
861
|
+
<zeroOrMore>
|
862
|
+
<ref name="bibliocountry"/>
|
863
|
+
</zeroOrMore>
|
864
|
+
</group>
|
865
|
+
</choice>
|
866
|
+
</element>
|
867
|
+
</define>
|
868
|
+
<define name="bibliocity">
|
869
|
+
<element name="city">
|
862
870
|
<text/>
|
863
871
|
</element>
|
864
872
|
</define>
|
873
|
+
<define name="biblioregion">
|
874
|
+
<element name="region">
|
875
|
+
<ref name="RegionType"/>
|
876
|
+
</element>
|
877
|
+
</define>
|
878
|
+
<define name="bibliocountry">
|
879
|
+
<element name="country">
|
880
|
+
<ref name="RegionType"/>
|
881
|
+
</element>
|
882
|
+
</define>
|
883
|
+
<define name="RegionType">
|
884
|
+
<optional>
|
885
|
+
<attribute name="iso"/>
|
886
|
+
</optional>
|
887
|
+
<optional>
|
888
|
+
<attribute name="recommended">
|
889
|
+
<data type="boolean"/>
|
890
|
+
</attribute>
|
891
|
+
</optional>
|
892
|
+
<text/>
|
893
|
+
</define>
|
865
894
|
<define name="bprice">
|
866
895
|
<element name="price">
|
867
896
|
<attribute name="currency"/>
|
data/lib/metanorma/iec/iec.rng
CHANGED
@@ -32,6 +32,43 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="admonition">
|
36
|
+
<element name="admonition">
|
37
|
+
<attribute name="type">
|
38
|
+
<ref name="AdmonitionType"/>
|
39
|
+
</attribute>
|
40
|
+
<optional>
|
41
|
+
<attribute name="class"/>
|
42
|
+
</optional>
|
43
|
+
<attribute name="id">
|
44
|
+
<data type="ID"/>
|
45
|
+
</attribute>
|
46
|
+
<optional>
|
47
|
+
<attribute name="uri">
|
48
|
+
<data type="anyURI"/>
|
49
|
+
</attribute>
|
50
|
+
</optional>
|
51
|
+
<optional>
|
52
|
+
<attribute name="coverpage">
|
53
|
+
<data type="boolean"/>
|
54
|
+
</attribute>
|
55
|
+
</optional>
|
56
|
+
<optional>
|
57
|
+
<attribute name="notag">
|
58
|
+
<data type="boolean"/>
|
59
|
+
</attribute>
|
60
|
+
</optional>
|
61
|
+
<optional>
|
62
|
+
<ref name="tname"/>
|
63
|
+
</optional>
|
64
|
+
<zeroOrMore>
|
65
|
+
<ref name="paragraph-with-footnote"/>
|
66
|
+
</zeroOrMore>
|
67
|
+
<zeroOrMore>
|
68
|
+
<ref name="note"/>
|
69
|
+
</zeroOrMore>
|
70
|
+
</element>
|
71
|
+
</define>
|
35
72
|
<define name="index">
|
36
73
|
<element name="index">
|
37
74
|
<optional>
|
@@ -851,6 +888,16 @@
|
|
851
888
|
<ref name="MultilingualRenderingType"/>
|
852
889
|
</attribute>
|
853
890
|
</optional>
|
891
|
+
<optional>
|
892
|
+
<attribute name="coverpage">
|
893
|
+
<data type="boolean"/>
|
894
|
+
</attribute>
|
895
|
+
</optional>
|
896
|
+
<optional>
|
897
|
+
<attribute name="notag">
|
898
|
+
<data type="boolean"/>
|
899
|
+
</attribute>
|
900
|
+
</optional>
|
854
901
|
<oneOrMore>
|
855
902
|
<choice>
|
856
903
|
<ref name="paragraph"/>
|
@@ -1178,6 +1225,7 @@
|
|
1178
1225
|
<ref name="concept"/>
|
1179
1226
|
<ref name="add"/>
|
1180
1227
|
<ref name="del"/>
|
1228
|
+
<ref name="span"/>
|
1181
1229
|
</choice>
|
1182
1230
|
</define>
|
1183
1231
|
<define name="add">
|
@@ -1204,6 +1252,14 @@
|
|
1204
1252
|
</choice>
|
1205
1253
|
</element>
|
1206
1254
|
</define>
|
1255
|
+
<define name="span">
|
1256
|
+
<element name="span">
|
1257
|
+
<attribute name="class"/>
|
1258
|
+
<oneOrMore>
|
1259
|
+
<ref name="TextElement"/>
|
1260
|
+
</oneOrMore>
|
1261
|
+
</element>
|
1262
|
+
</define>
|
1207
1263
|
<define name="concept">
|
1208
1264
|
<element name="concept">
|
1209
1265
|
<optional>
|
data/metanorma-iec.gemspec
CHANGED
@@ -27,7 +27,7 @@ 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.5.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-iso", "~> 2.
|
30
|
+
spec.add_dependency "metanorma-iso", "~> 2.1.0"
|
31
31
|
spec.add_dependency "ruby-jing"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -1,219 +1,163 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc::Iec do
|
4
|
-
|
5
|
-
it "processes admonitions" do
|
6
|
-
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
8
|
-
<preface><foreword>
|
9
|
-
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
10
|
-
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
11
|
-
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f3">Para 2.</p>
|
12
|
-
</admonition>
|
13
|
-
</foreword></preface>
|
14
|
-
</iso-standard>
|
15
|
-
INPUT
|
16
|
-
#{HTML_HDR}
|
17
|
-
<div>
|
18
|
-
<h1 class='ForewordTitle'>FOREWORD</h1>
|
19
|
-
<div class='boilerplate_legal'/>
|
20
|
-
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
21
|
-
<p>
|
22
|
-
CAUTION — Only use paddy or parboiled rice for the
|
23
|
-
determination of husked rice yield.
|
24
|
-
</p>
|
25
|
-
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f3'>Para 2.</p>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
#{IEC_TITLE1}
|
29
|
-
</div>
|
30
|
-
</body>
|
31
|
-
</html>
|
32
|
-
OUTPUT
|
33
|
-
end
|
34
|
-
|
35
|
-
it "processes admonitions with titles" do
|
36
|
-
expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
37
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
38
|
-
<preface><foreword>
|
39
|
-
<admonition id="_70234f78-64e5-4dfc-8b6f-f3f037348b6a" type="caution">
|
40
|
-
<name>Title</name>
|
41
|
-
<ul>
|
42
|
-
<li>List</li>
|
43
|
-
</ul>
|
44
|
-
<p id="_e94663cc-2473-4ccc-9a72-983a74d989f2">Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
45
|
-
</admonition>
|
46
|
-
</foreword></preface>
|
47
|
-
</iso-standard>
|
48
|
-
INPUT
|
49
|
-
#{HTML_HDR}
|
50
|
-
<div>
|
51
|
-
<h1 class='ForewordTitle'>FOREWORD</h1>
|
52
|
-
<div class='boilerplate_legal'/>
|
53
|
-
<div id='_70234f78-64e5-4dfc-8b6f-f3f037348b6a' class='Admonition'>
|
54
|
-
<p>Title — </p>
|
55
|
-
<ul>
|
56
|
-
<li>List</li>
|
57
|
-
</ul>
|
58
|
-
<p id='_e94663cc-2473-4ccc-9a72-983a74d989f2'>Only use paddy or parboiled rice for the determination of husked rice yield.</p>
|
59
|
-
</div>
|
60
|
-
</div>
|
61
|
-
#{IEC_TITLE1}
|
62
|
-
</div>
|
63
|
-
</body>
|
64
|
-
</html>
|
65
|
-
OUTPUT
|
66
|
-
end
|
67
|
-
|
68
4
|
it "processes formulae (Word)" do
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</dl>
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
</note>
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
5
|
+
input = <<~INPUT
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<preface><foreword>
|
8
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
9
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
10
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
11
|
+
<dt>
|
12
|
+
<stem type="AsciiMath">r</stem>
|
13
|
+
</dt>
|
14
|
+
<dd>
|
15
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
16
|
+
</dd>
|
17
|
+
</dl>
|
18
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
19
|
+
<name>NOTE</name>
|
20
|
+
<p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
|
21
|
+
</note>
|
22
|
+
</formula>
|
23
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935"><name>1</name>
|
24
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
25
|
+
</formula>
|
26
|
+
</foreword></preface>
|
27
|
+
</iso-standard>
|
92
28
|
INPUT
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
</span>
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
29
|
+
output = <<~OUTPUT
|
30
|
+
<html xmlns:epub='http://www.idpf.org/2007/ops' lang='en'>
|
31
|
+
<head>
|
32
|
+
<style>
|
33
|
+
</style>
|
34
|
+
<style>
|
35
|
+
</style>
|
36
|
+
</head>
|
37
|
+
<body lang='EN-US' link='blue' vlink='#954F72'>
|
38
|
+
<div class='WordSection2'>
|
39
|
+
<p>
|
40
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
41
|
+
</p>
|
42
|
+
#{IEC_TITLE}
|
43
|
+
<div>
|
44
|
+
<h1 class='ForewordTitle'>FOREWORD</h1>
|
45
|
+
<div class='boilerplate_legal'/>
|
46
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
|
47
|
+
<p class='formula'>
|
48
|
+
<span style='mso-tab-count:1'>  </span>
|
49
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
50
|
+
</p>
|
51
|
+
</div>
|
52
|
+
<span class='zzMoveToFollowing'>
|
53
|
+
where#{' '}
|
54
|
+
<span class='stem'>(#(r)#)</span>
|
55
|
+
</span>
|
56
|
+
<p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
|
57
|
+
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
58
|
+
<p class='Note'>
|
59
|
+
<span class='note_label'>NOTE</span>
|
60
|
+
<span style='mso-tab-count:1'>  </span>
|
61
|
+
[durationUnits] is essentially a duration statement without the "P"
|
62
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
63
|
+
always expressed.
|
64
|
+
</p>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
|
68
|
+
<p class='formula'>
|
69
|
+
<span style='mso-tab-count:1'>  </span>
|
70
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
71
|
+
<span style='mso-tab-count:1'>  </span>
|
72
|
+
(1)
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<p> </p>
|
78
|
+
</div>
|
79
|
+
<p>
|
80
|
+
<br clear='all' class='section'/>
|
136
81
|
</p>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
</p>
|
145
|
-
<div class='WordSection3'>
|
146
|
-
#{IEC_TITLE1}
|
147
|
-
</div>
|
148
|
-
<br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
|
149
|
-
<div class='colophon'/>
|
150
|
-
</body>
|
151
|
-
</html>
|
82
|
+
<div class='WordSection3'>
|
83
|
+
#{IEC_TITLE1}
|
84
|
+
</div>
|
85
|
+
<br clear='all' style='page-break-before:left;mso-break-type:section-break'/>
|
86
|
+
<div class='colophon'/>
|
87
|
+
</body>
|
88
|
+
</html>
|
152
89
|
OUTPUT
|
90
|
+
expect(xmlpp(IsoDoc::Iec::WordConvert.new({})
|
91
|
+
.convert("test", input, true)))
|
92
|
+
.to be_equivalent_to xmlpp(output)
|
153
93
|
end
|
154
94
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
</clause>
|
177
|
-
</sections>
|
178
|
-
|
95
|
+
it "cross-references formulae" do
|
96
|
+
input = <<~INPUT
|
97
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
98
|
+
<preface>
|
99
|
+
<foreword>
|
100
|
+
<p>
|
101
|
+
<xref target="N1"/>
|
102
|
+
<xref target="N2"/>
|
103
|
+
</p>
|
104
|
+
</foreword>
|
105
|
+
</preface>
|
106
|
+
<sections>
|
107
|
+
<clause id="intro"><title>First</title>
|
108
|
+
<formula id="N1">
|
109
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
110
|
+
</formula>
|
111
|
+
<clause id="xyz"><title>Preparatory</title>
|
112
|
+
<formula id="N2" inequality="true">
|
113
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
114
|
+
</formula>
|
115
|
+
<xref target="N2"/>
|
116
|
+
</clause>
|
117
|
+
</sections>
|
118
|
+
</iso-standard>
|
179
119
|
INPUT
|
180
|
-
|
181
|
-
|
182
|
-
<
|
183
|
-
<
|
184
|
-
<
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
<
|
191
|
-
<
|
192
|
-
1
|
193
|
-
|
194
|
-
First
|
195
|
-
</title>
|
196
|
-
<formula id='N1'>
|
197
|
-
<name>1</name>
|
198
|
-
<stem type='AsciiMath'>r = 1 %</stem>
|
199
|
-
</formula>
|
200
|
-
<clause id='xyz'>
|
201
|
-
<title depth='2'>
|
202
|
-
1.1
|
120
|
+
output = <<~OUTPUT
|
121
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
122
|
+
<preface>
|
123
|
+
<foreword displayorder="1">
|
124
|
+
<p>
|
125
|
+
<xref target='N1'>Clause 1, Equation (1)</xref>
|
126
|
+
<xref target='N2'>1.1, Inequality (2)</xref>
|
127
|
+
</p>
|
128
|
+
</foreword>
|
129
|
+
</preface>
|
130
|
+
<sections>
|
131
|
+
<clause id='intro' displayorder="2">
|
132
|
+
<title depth='1'>
|
133
|
+
1
|
203
134
|
<tab/>
|
204
|
-
|
135
|
+
First
|
205
136
|
</title>
|
206
|
-
<formula id='
|
207
|
-
<name>
|
137
|
+
<formula id='N1'>
|
138
|
+
<name>1</name>
|
208
139
|
<stem type='AsciiMath'>r = 1 %</stem>
|
209
140
|
</formula>
|
210
|
-
<
|
141
|
+
<clause id='xyz'>
|
142
|
+
<title depth='2'>
|
143
|
+
1.1
|
144
|
+
<tab/>
|
145
|
+
Preparatory
|
146
|
+
</title>
|
147
|
+
<formula id='N2' inequality='true'>
|
148
|
+
<name>2</name>
|
149
|
+
<stem type='AsciiMath'>r = 1 %</stem>
|
150
|
+
</formula>
|
151
|
+
<xref target='N2'>Inequality (2)</xref>
|
152
|
+
</clause>
|
211
153
|
</clause>
|
212
|
-
</
|
213
|
-
</
|
214
|
-
</iso-standard>
|
154
|
+
</sections>
|
155
|
+
</iso-standard>
|
215
156
|
OUTPUT
|
216
|
-
|
217
|
-
|
218
|
-
|
157
|
+
expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
|
158
|
+
.convert("test", input, true)
|
159
|
+
.gsub(%r{^.*<body}m, "<body")
|
160
|
+
.gsub(%r{</body>.*}m, "</body>")))
|
161
|
+
.to be_equivalent_to xmlpp(output)
|
162
|
+
end
|
219
163
|
end
|