metanorma-iso 1.6.0 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +16 -29
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/iso/base.rb +13 -13
- data/lib/asciidoctor/iso/basicdoc.rng +5 -3
- data/lib/asciidoctor/iso/cleanup.rb +1 -1
- data/lib/asciidoctor/iso/front.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +134 -5
- data/lib/asciidoctor/iso/isostandard-amd.rng +11 -4
- data/lib/asciidoctor/iso/isostandard.rng +33 -107
- data/lib/asciidoctor/iso/validate.rb +79 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/base_convert.rb +11 -0
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/i18n-en.yaml +6 -0
- data/lib/isodoc/iso/i18n-fr.yaml +4 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
- data/lib/isodoc/iso/index.rb +139 -0
- data/lib/isodoc/iso/iso.amendment.xsl +1006 -317
- data/lib/isodoc/iso/iso.international-standard.xsl +1006 -317
- data/lib/isodoc/iso/presentation_xml_convert.rb +1 -4
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/xref.rb +33 -12
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -3
- data/spec/asciidoctor/amd_spec.rb +696 -0
- data/spec/asciidoctor/base_spec.rb +704 -0
- data/spec/asciidoctor/blocks_spec.rb +527 -0
- data/spec/asciidoctor/cleanup_spec.rb +1134 -0
- data/spec/asciidoctor/inline_spec.rb +195 -0
- data/spec/asciidoctor/lists_spec.rb +197 -0
- data/spec/asciidoctor/refs_spec.rb +375 -0
- data/spec/asciidoctor/section_spec.rb +393 -0
- data/spec/asciidoctor/table_spec.rb +329 -0
- data/spec/asciidoctor/validate_spec.rb +1555 -0
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +340 -316
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +834 -656
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +821 -519
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +184 -189
- metadata +22 -23
- data/.rubocop.ribose.yml +0 -66
- data/spec/asciidoctor-iso/amd_spec.rb +0 -694
- data/spec/asciidoctor-iso/base_spec.rb +0 -713
- data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
- data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
- data/spec/asciidoctor-iso/inline_spec.rb +0 -170
- data/spec/asciidoctor-iso/lists_spec.rb +0 -190
- data/spec/asciidoctor-iso/refs_spec.rb +0 -317
- data/spec/asciidoctor-iso/section_spec.rb +0 -362
- data/spec/asciidoctor-iso/table_spec.rb +0 -313
- data/spec/asciidoctor-iso/validate_spec.rb +0 -1251
- data/spec/assets/xref_error.adoc +0 -7
data/spec/isodoc/blocks_spec.rb
CHANGED
@@ -2,534 +2,557 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "renders figures (HTML)" do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
5
|
+
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
6
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
7
|
+
<preface>
|
8
|
+
<foreword id='fwd'>
|
9
|
+
<p>
|
10
|
+
</p>
|
11
|
+
</foreword>
|
12
|
+
</preface>
|
13
|
+
<sections>
|
14
|
+
<clause id='scope' type="scope">
|
15
|
+
<title>Scope</title>
|
16
|
+
<figure id='N'>
|
17
|
+
<name>Figure 1 — Split-it-right sample divider</name>
|
18
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
19
|
+
</figure>
|
20
|
+
<p>
|
21
|
+
</p>
|
22
|
+
</clause>
|
23
|
+
<terms id='terms'/>
|
24
|
+
<clause id='widgets'>
|
25
|
+
<title>Widgets</title>
|
26
|
+
<clause id='widgets1'>
|
27
|
+
<figure id='note1'>
|
28
|
+
<name>Figure 2 — Split-it-right sample divider</name>
|
29
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
30
|
+
</figure>
|
31
|
+
<figure id='note2'>
|
32
|
+
<name>Figure 3 — Split-it-right sample divider</name>
|
33
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
34
|
+
</figure>
|
35
|
+
<p>
|
36
|
+
</p>
|
37
|
+
</clause>
|
38
|
+
</clause>
|
39
|
+
</sections>
|
40
|
+
<annex id='annex1'>
|
41
|
+
<clause id='annex1a'>
|
42
|
+
<figure id='AN'>
|
43
|
+
<name>Figure A.1 — Split-it-right sample divider</name>
|
44
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
45
|
+
</figure>
|
46
|
+
</clause>
|
47
|
+
<clause id='annex1b'>
|
48
|
+
<figure id='Anote1'>
|
49
|
+
<name>Figure A.2 — Split-it-right sample divider</name>
|
50
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
51
|
+
</figure>
|
52
|
+
<figure id='Anote2'>
|
53
|
+
<name>Figure A.3 — Split-it-right sample divider</name>
|
54
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
55
|
+
</figure>
|
56
|
+
</clause>
|
57
|
+
</annex>
|
58
|
+
</iso-standard>
|
59
59
|
INPUT
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
60
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
61
|
+
#{HTML_HDR}
|
62
|
+
<br/>
|
63
|
+
<div id="fwd">
|
64
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
65
|
+
<p>
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
<p class="zzSTDTitle1"/>
|
69
|
+
<div id="scope">
|
70
|
+
<h1>Scope</h1>
|
71
|
+
<div id="N" class="figure">
|
72
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
73
|
+
<p class="FigureTitle" style="text-align:center;">Figure 1 — Split-it-right sample divider</p>
|
74
|
+
</div>
|
75
|
+
<p>
|
76
|
+
</p>
|
77
|
+
</div>
|
78
|
+
<div id="terms"><h1/></div>
|
79
|
+
<div id="widgets">
|
80
|
+
<h1>Widgets</h1>
|
81
|
+
<div id="widgets1">
|
82
|
+
<div id="note1" class="figure">
|
83
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
84
|
+
<p class="FigureTitle" style="text-align:center;">Figure 2 — Split-it-right sample divider</p>
|
85
|
+
</div>
|
86
|
+
<div id="note2" class="figure">
|
87
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
88
|
+
<p class="FigureTitle" style="text-align:center;">Figure 3 — Split-it-right sample divider</p>
|
89
|
+
</div>
|
90
|
+
<p> </p>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
<br/>
|
94
|
+
<div id="annex1" class="Section3">
|
95
|
+
<div id="annex1a">
|
96
|
+
<div id="AN" class="figure">
|
97
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
98
|
+
<p class="FigureTitle" style="text-align:center;">Figure A.1 — Split-it-right sample divider</p>
|
99
|
+
</div>
|
100
|
+
</div>
|
101
|
+
<div id="annex1b">
|
102
|
+
<div id="Anote1" class="figure">
|
103
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
104
|
+
<p class="FigureTitle" style="text-align:center;">Figure A.2 — Split-it-right sample divider</p>
|
105
|
+
</div>
|
106
|
+
<div id="Anote2" class="figure">
|
107
|
+
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
108
|
+
<p class="FigureTitle" style="text-align:center;">Figure A.3 — Split-it-right sample divider</p>
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</body>
|
114
|
+
</html>
|
115
115
|
OUTPUT
|
116
116
|
end
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
118
|
+
it "renders subfigures (HTML)" do
|
119
|
+
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
120
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
121
|
+
<preface>
|
122
|
+
<foreword id='fwd'>
|
123
|
+
<p>
|
124
|
+
<xref target='N'/>
|
125
|
+
<xref target='note1'/>
|
126
|
+
<xref target='note2'/>
|
127
|
+
<xref target='AN'/>
|
128
|
+
<xref target='Anote1'/>
|
129
|
+
<xref target='Anote2'/>
|
130
|
+
</p>
|
131
|
+
</foreword>
|
132
|
+
</preface>
|
133
|
+
<sections>
|
134
|
+
<clause id='scope' type="scope">
|
135
|
+
<title>Scope</title>
|
136
|
+
</clause>
|
137
|
+
<terms id='terms'/>
|
138
|
+
<clause id='widgets'>
|
139
|
+
<title>Widgets</title>
|
140
|
+
<clause id='widgets1'>
|
141
|
+
<figure id='N'>
|
142
|
+
<name>Figure 1</name>
|
143
|
+
<figure id='note1'>
|
144
|
+
<name>a) — Split-it-right sample divider</name>
|
145
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
146
|
+
</figure>
|
147
|
+
<figure id='note2'>
|
148
|
+
<name>b) — Split-it-right sample divider</name>
|
149
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
150
|
+
</figure>
|
151
|
+
</figure>
|
152
|
+
<p>
|
153
|
+
<xref target='note1'/>
|
154
|
+
<xref target='note2'/>
|
155
|
+
</p>
|
156
|
+
</clause>
|
157
|
+
</clause>
|
158
|
+
</sections>
|
159
|
+
<annex id='annex1'>
|
160
|
+
<clause id='annex1a'> </clause>
|
161
|
+
<clause id='annex1b'>
|
162
|
+
<figure id='AN'>
|
163
|
+
<name>Figure A.1</name>
|
164
|
+
<figure id='Anote1'>
|
165
|
+
<name>a) — Split-it-right sample divider</name>
|
166
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
167
|
+
</figure>
|
168
|
+
<figure id='Anote2'>
|
169
|
+
<name>b) — Split-it-right sample divider</name>
|
170
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
171
|
+
</figure>
|
146
172
|
</figure>
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
</figure>
|
151
|
-
</figure>
|
152
|
-
<p>
|
153
|
-
<xref target='note1'/>
|
154
|
-
<xref target='note2'/>
|
155
|
-
</p>
|
156
|
-
</clause>
|
157
|
-
</clause>
|
158
|
-
</sections>
|
159
|
-
<annex id='annex1'>
|
160
|
-
<clause id='annex1a'> </clause>
|
161
|
-
<clause id='annex1b'>
|
162
|
-
<figure id='AN'>
|
163
|
-
<name>Figure A.1</name>
|
164
|
-
<figure id='Anote1'>
|
165
|
-
<name>a) — Split-it-right sample divider</name>
|
166
|
-
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
167
|
-
</figure>
|
168
|
-
<figure id='Anote2'>
|
169
|
-
<name>b) — Split-it-right sample divider</name>
|
170
|
-
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
171
|
-
</figure>
|
172
|
-
</figure>
|
173
|
-
</clause>
|
174
|
-
</annex>
|
175
|
-
</iso-standard>
|
173
|
+
</clause>
|
174
|
+
</annex>
|
175
|
+
</iso-standard>
|
176
176
|
INPUT
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
177
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
178
|
+
<html lang='en'>
|
179
|
+
<head/>
|
180
|
+
<body lang='en'>
|
181
|
+
<div class='title-section'>
|
182
|
+
<p> </p>
|
183
|
+
</div>
|
184
|
+
<br/>
|
185
|
+
<div class='prefatory-section'>
|
186
|
+
<p> </p>
|
187
|
+
</div>
|
188
|
+
<br/>
|
189
|
+
<div class='main-section'>
|
190
|
+
<br/>
|
191
|
+
<div id='fwd'>
|
192
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
193
|
+
<p>
|
194
|
+
<a href='#N'/>
|
195
|
+
<a href='#note1'/>
|
196
|
+
<a href='#note2'/>
|
197
|
+
<a href='#AN'/>
|
198
|
+
<a href='#Anote1'/>
|
199
|
+
<a href='#Anote2'/>
|
200
|
+
</p>
|
201
|
+
</div>
|
202
|
+
<p class='zzSTDTitle1'/>
|
203
|
+
<div id='scope'>
|
204
|
+
<h1>Scope</h1>
|
205
|
+
</div>
|
206
|
+
<div id='terms'>
|
207
|
+
<h1/>
|
208
|
+
</div>
|
209
|
+
<div id='widgets'>
|
210
|
+
<h1>Widgets</h1>
|
211
|
+
<div id='widgets1'>
|
212
|
+
<div id='N' class='figure'>
|
213
|
+
<div id='note1' class='figure'>
|
214
|
+
<img src='rice_images/rice_image1.png' height='auto' width='auto'/>
|
215
|
+
<p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
|
216
|
+
</div>
|
217
|
+
<div id='note2' class='figure'>
|
218
|
+
<img src='rice_images/rice_image1.png' height='auto' width='auto'/>
|
219
|
+
<p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
|
220
|
+
</div>
|
221
|
+
<p class='FigureTitle' style='text-align:center;'>Figure 1</p>
|
222
|
+
</div>
|
223
|
+
<p>
|
224
|
+
<a href='#note1'/>
|
225
|
+
<a href='#note2'/>
|
226
|
+
</p>
|
227
|
+
</div>
|
228
|
+
</div>
|
229
|
+
<br/>
|
230
|
+
<div id='annex1' class='Section3'>
|
231
|
+
<div id='annex1a'>
|
232
|
+
</div>
|
233
|
+
<div id='annex1b'>
|
234
|
+
<div id='AN' class='figure'>
|
235
|
+
<div id='Anote1' class='figure'>
|
236
|
+
<img src='rice_images/rice_image1.png' height='auto' width='auto'/>
|
237
|
+
<p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
|
238
|
+
</div>
|
239
|
+
<div id='Anote2' class='figure'>
|
240
|
+
<img src='rice_images/rice_image1.png' height='auto' width='auto'/>
|
241
|
+
<p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
|
242
|
+
</div>
|
243
|
+
<p class='FigureTitle' style='text-align:center;'>Figure A.1</p>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
</div>
|
247
|
+
</div>
|
248
|
+
</body>
|
249
|
+
</html>
|
249
250
|
OUTPUT
|
250
251
|
end
|
251
252
|
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
253
|
+
it "processes formulae (Presentation XML)" do
|
254
|
+
output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)
|
255
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
256
|
+
<preface>
|
257
|
+
<foreword>
|
258
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
259
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
260
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
261
|
+
<dt>
|
262
|
+
<stem type="AsciiMath">r</stem>
|
263
|
+
</dt>
|
264
|
+
<dd>
|
265
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
266
|
+
</dd>
|
267
|
+
<dt>
|
268
|
+
<stem type="AsciiMath">s_1</stem>
|
269
|
+
</dt>
|
270
|
+
<dd>
|
271
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
272
|
+
</dd>
|
273
|
+
</dl>
|
274
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
275
|
+
<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>
|
276
|
+
</note>
|
277
|
+
</formula>
|
278
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
279
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
280
|
+
</formula>
|
281
|
+
</foreword>
|
282
|
+
</preface>
|
283
|
+
</iso-standard>
|
273
284
|
INPUT
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
</iso-standard>
|
310
|
-
OUTPUT
|
311
|
-
|
285
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
286
|
+
<?xml version='1.0'?>
|
287
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
288
|
+
<preface>
|
289
|
+
<foreword>
|
290
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
291
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
292
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
293
|
+
<dt>
|
294
|
+
<stem type="AsciiMath">r</stem>
|
295
|
+
</dt>
|
296
|
+
<dd>
|
297
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
298
|
+
</dd>
|
299
|
+
<dt>
|
300
|
+
<stem type="AsciiMath">s_1</stem>
|
301
|
+
</dt>
|
302
|
+
<dd>
|
303
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
304
|
+
</dd>
|
305
|
+
</dl>
|
306
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
307
|
+
<name>NOTE</name>
|
308
|
+
<p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P"
|
309
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
310
|
+
always expressed.
|
311
|
+
</p>
|
312
|
+
</note>
|
313
|
+
</formula>
|
314
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
315
|
+
<name>1</name>
|
316
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
317
|
+
</formula>
|
318
|
+
</foreword>
|
319
|
+
</preface>
|
320
|
+
</iso-standard>
|
321
|
+
OUTPUT
|
322
|
+
end
|
312
323
|
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
</iso-standard>
|
324
|
+
it "processes formulae (HTML)" do
|
325
|
+
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
326
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
327
|
+
<preface>
|
328
|
+
<foreword>
|
329
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
330
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
331
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
332
|
+
<dt>
|
333
|
+
<stem type="AsciiMath">r</stem>
|
334
|
+
</dt>
|
335
|
+
<dd>
|
336
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
337
|
+
</dd>
|
338
|
+
<dt>
|
339
|
+
<stem type="AsciiMath">s_1</stem>
|
340
|
+
</dt>
|
341
|
+
<dd>
|
342
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
343
|
+
</dd>
|
344
|
+
</dl>
|
345
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
346
|
+
<p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P"
|
347
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
348
|
+
always expressed.
|
349
|
+
</p>
|
350
|
+
</note>
|
351
|
+
</formula>
|
352
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
353
|
+
<name>1</name>
|
354
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
355
|
+
</formula>
|
356
|
+
</foreword>
|
357
|
+
</preface>
|
358
|
+
</iso-standard>
|
349
359
|
INPUT
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
360
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
361
|
+
#{HTML_HDR}
|
362
|
+
<br/>
|
363
|
+
<div>
|
364
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
365
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934'>
|
366
|
+
<div class='formula'>
|
367
|
+
<p>
|
368
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
369
|
+
</p>
|
370
|
+
</div>
|
371
|
+
<p style='page-break-after:avoid;'>where</p>
|
372
|
+
<dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d' class='formula_dl'>
|
373
|
+
<dt>
|
374
|
+
<span class='stem'>(#(r)#)</span>
|
375
|
+
</dt>
|
376
|
+
<dd>
|
377
|
+
<p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
|
378
|
+
</dd>
|
379
|
+
<dt>
|
380
|
+
<span class='stem'>(#(s_1)#)</span>
|
381
|
+
</dt>
|
382
|
+
<dd>
|
383
|
+
<p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
|
384
|
+
</dd>
|
385
|
+
</dl>
|
386
|
+
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
387
|
+
<p>
|
388
|
+
  [durationUnits] is essentially a duration statement without
|
389
|
+
the "P" prefix. "P" is unnecessary because between "G" and "U"
|
390
|
+
duration is always expressed.
|
391
|
+
</p>
|
392
|
+
</div>
|
393
|
+
</div>
|
394
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935'>
|
395
|
+
<div class='formula'>
|
396
|
+
<p>
|
397
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
398
|
+
  (1)
|
399
|
+
</p>
|
400
|
+
</div>
|
401
|
+
</div>
|
402
|
+
</div>
|
403
|
+
<p class='zzSTDTitle1'/>
|
380
404
|
</div>
|
381
|
-
</
|
382
|
-
|
383
|
-
<p>
|
384
|
-
<span class='stem'>(#(r = 1 %)#)</span>
|
385
|
-
  (1)
|
386
|
-
</p>
|
387
|
-
</div>
|
388
|
-
</div>
|
389
|
-
</div>
|
390
|
-
<p class='zzSTDTitle1'/>
|
391
|
-
</div>
|
392
|
-
</body>
|
393
|
-
</html>
|
405
|
+
</body>
|
406
|
+
</html>
|
394
407
|
OUTPUT
|
395
408
|
end
|
396
409
|
|
397
410
|
it "processes formulae (Word)" do
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
</iso-standard>
|
411
|
+
output = IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true)
|
412
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
413
|
+
<preface>
|
414
|
+
<foreword>
|
415
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
416
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
417
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
418
|
+
<dt>
|
419
|
+
<stem type="AsciiMath">r</stem>
|
420
|
+
</dt>
|
421
|
+
<dd>
|
422
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
423
|
+
</dd>
|
424
|
+
<dt>
|
425
|
+
<stem type="AsciiMath">s_1</stem>
|
426
|
+
</dt>
|
427
|
+
<dd>
|
428
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
429
|
+
</dd>
|
430
|
+
</dl>
|
431
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
432
|
+
<p id="_511aaa98-4116-42af-8e5b-c87cdf5bfdc8">[durationUnits] is essentially a duration statement without the "P"
|
433
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
434
|
+
always expressed.
|
435
|
+
</p>
|
436
|
+
</note>
|
437
|
+
</formula>
|
438
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
439
|
+
<name>1</name>
|
440
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
441
|
+
</formula>
|
442
|
+
</foreword>
|
443
|
+
</preface>
|
444
|
+
</iso-standard>
|
433
445
|
INPUT
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
446
|
+
expect(xmlpp(output
|
447
|
+
.sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">')
|
448
|
+
.sub(%r{<p> </p>\s*</div>.*$}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
449
|
+
<div>
|
450
|
+
<h1 class='ForewordTitle'>Foreword</h1>
|
451
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
|
452
|
+
<p>
|
453
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
454
|
+
<span style='mso-tab-count:1'>  </span>
|
455
|
+
</p>
|
456
|
+
</div>
|
457
|
+
<p>where</p>
|
458
|
+
<table class="formula_dl">
|
459
|
+
<tr>
|
460
|
+
<td align="left" valign="top">
|
461
|
+
<p align="left" style="margin-left:0pt;text-align:left;">
|
462
|
+
<span class="stem">(#(r)#)</span>
|
463
|
+
</p>
|
464
|
+
</td>
|
465
|
+
<td valign="top">
|
466
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
467
|
+
</td>
|
468
|
+
</tr>
|
469
|
+
<tr>
|
470
|
+
<td align="left" valign="top">
|
471
|
+
<p align="left" style="margin-left:0pt;text-align:left;">
|
472
|
+
<span class="stem">(#(s_1)#)</span>
|
473
|
+
</p>
|
474
|
+
</td>
|
475
|
+
<td valign="top">
|
476
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p>
|
477
|
+
</td>
|
478
|
+
</tr>
|
479
|
+
</table>
|
480
|
+
<div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
|
481
|
+
<p class='Note'>
|
482
|
+
<span class='note_label'/>
|
483
|
+
<span style='mso-tab-count:1'>  </span>
|
484
|
+
[durationUnits] is essentially a duration statement without the "P"
|
485
|
+
prefix. "P" is unnecessary because between "G" and "U" duration is
|
486
|
+
always expressed.
|
487
|
+
</p>
|
488
|
+
</div>
|
489
|
+
</div>
|
490
|
+
<div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
|
491
|
+
<p>
|
492
|
+
<span class='stem'>(#(r = 1 %)#)</span>
|
493
|
+
<span style='mso-tab-count:1'>  </span>
|
494
|
+
(1)
|
495
|
+
</p>
|
496
|
+
</div>
|
497
|
+
</div>
|
498
|
+
</div>
|
499
|
+
OUTPUT
|
485
500
|
end
|
486
501
|
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
<
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
</
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
502
|
+
it "processes formulae with single definition list entry" do
|
503
|
+
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
504
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
505
|
+
<preface>
|
506
|
+
<foreword>
|
507
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
|
508
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
509
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
510
|
+
<dt>
|
511
|
+
<stem type="AsciiMath">r</stem>
|
512
|
+
</dt>
|
513
|
+
<dd>
|
514
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
515
|
+
</dd>
|
516
|
+
</dl>
|
517
|
+
<note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
|
518
|
+
<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>
|
519
|
+
</note>
|
520
|
+
</formula>
|
521
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
522
|
+
<name>1</name>
|
523
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
524
|
+
</formula>
|
525
|
+
</foreword>
|
526
|
+
</preface>
|
527
|
+
</iso-standard>
|
510
528
|
INPUT
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
<
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
529
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
530
|
+
#{HTML_HDR}
|
531
|
+
<br/>
|
532
|
+
<div>
|
533
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
534
|
+
<div id="_be9158af-7e93-4ee2-90c5-26d31c181934">
|
535
|
+
<div class="formula">
|
536
|
+
<p><span class="stem">(#(r = 1 %)#)</span></p>
|
537
|
+
</div>
|
538
|
+
<span class='zzMoveToFollowing'>
|
539
|
+
where <span class='stem'>(#(r)#)</span>
|
540
|
+
</span>
|
541
|
+
<p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
|
542
|
+
<div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note">
|
543
|
+
<p>  [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p>
|
544
|
+
</div>
|
545
|
+
</div>
|
546
|
+
<div id="_be9158af-7e93-4ee2-90c5-26d31c181935">
|
547
|
+
<div class="formula">
|
548
|
+
<p><span class="stem">(#(r = 1 %)#)</span>  (1)</p>
|
549
|
+
</div>
|
550
|
+
</div>
|
551
|
+
</div>
|
552
|
+
<p class="zzSTDTitle1"/>
|
553
|
+
</div>
|
554
|
+
</body>
|
555
|
+
</html>
|
531
556
|
OUTPUT
|
532
557
|
end
|
533
|
-
|
534
|
-
|
535
558
|
end
|