metanorma-iso 1.7.1 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +0 -4
  3. data/lib/asciidoctor/iso/base.rb +12 -12
  4. data/lib/asciidoctor/iso/cleanup.rb +1 -1
  5. data/lib/asciidoctor/iso/isodoc.rng +19 -1
  6. data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
  7. data/lib/asciidoctor/iso/isostandard.rng +6 -0
  8. data/lib/metanorma/iso/version.rb +1 -1
  9. data/spec/asciidoctor-iso/amd_spec.rb +575 -573
  10. data/spec/asciidoctor-iso/base_spec.rb +445 -454
  11. data/spec/asciidoctor-iso/blocks_spec.rb +333 -288
  12. data/spec/asciidoctor-iso/cleanup_spec.rb +813 -704
  13. data/spec/asciidoctor-iso/inline_spec.rb +116 -91
  14. data/spec/asciidoctor-iso/lists_spec.rb +128 -121
  15. data/spec/asciidoctor-iso/refs_spec.rb +308 -250
  16. data/spec/asciidoctor-iso/section_spec.rb +273 -242
  17. data/spec/asciidoctor-iso/table_spec.rb +258 -242
  18. data/spec/asciidoctor-iso/validate_spec.rb +1099 -1165
  19. data/spec/isodoc/amd_spec.rb +967 -946
  20. data/spec/isodoc/blocks_spec.rb +530 -507
  21. data/spec/isodoc/i18n_spec.rb +953 -911
  22. data/spec/isodoc/inline_spec.rb +355 -293
  23. data/spec/isodoc/iso_spec.rb +338 -314
  24. data/spec/isodoc/metadata_spec.rb +392 -382
  25. data/spec/isodoc/postproc_spec.rb +833 -656
  26. data/spec/isodoc/ref_spec.rb +374 -331
  27. data/spec/isodoc/section_spec.rb +608 -525
  28. data/spec/isodoc/table_spec.rb +472 -411
  29. data/spec/isodoc/terms_spec.rb +209 -185
  30. data/spec/isodoc/xref_spec.rb +1370 -1236
  31. data/spec/metanorma/processor_spec.rb +28 -26
  32. data/spec/spec_helper.rb +176 -193
  33. metadata +2 -4
  34. data/.rubocop.ribose.yml +0 -66
  35. data/spec/assets/xref_error.adoc +0 -7
@@ -2,534 +2,557 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "renders figures (HTML)" do
5
- expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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>
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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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&#xA0;&#x2014; 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
- #{HTML_HDR}
61
- <br/>
62
- <div id="fwd">
63
- <h1 class="ForewordTitle">Foreword</h1>
64
- <p>
65
- </p>
66
- </div>
67
- <p class="zzSTDTitle1"/>
68
- <div id="scope">
69
- <h1>Scope</h1>
70
- <div id="N" class="figure">
71
-
72
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
73
- <p class="FigureTitle" style="text-align:center;">Figure 1&#160;&#8212; Split-it-right sample divider</p></div>
74
- <p>
75
- </p>
76
- </div>
77
- <div id="terms"><h1/>
78
- </div>
79
- <div id="widgets">
80
- <h1>Widgets</h1>
81
- <div id="widgets1">
82
- <div id="note1" class="figure">
83
-
84
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
85
- <p class="FigureTitle" style="text-align:center;">Figure 2&#160;&#8212; Split-it-right sample divider</p></div>
86
- <div id="note2" class="figure">
87
-
88
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
89
- <p class="FigureTitle" style="text-align:center;">Figure 3&#160;&#8212; Split-it-right sample divider</p></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
-
98
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
99
- <p class="FigureTitle" style="text-align:center;">Figure A.1&#160;&#8212; Split-it-right sample divider</p></div>
100
- </div>
101
- <div id="annex1b">
102
- <div id="Anote1" class="figure">
103
-
104
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
105
- <p class="FigureTitle" style="text-align:center;">Figure A.2&#160;&#8212; Split-it-right sample divider</p></div>
106
- <div id="Anote2" class="figure">
107
-
108
- <img src="rice_images/rice_image1.png" height="auto" width="auto"/>
109
- <p class="FigureTitle" style="text-align:center;">Figure A.3&#160;&#8212; Split-it-right sample divider</p></div>
110
- </div>
111
- </div>
112
- </div>
113
- </body>
114
- </html>
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&#160;&#8212; 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&#160;&#8212; 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&#160;&#8212; 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&#160;&#8212; 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&#160;&#8212; 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&#160;&#8212; 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
- it "renders subfigures (HTML)" do
119
- expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
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)&#xA0;&#x2014; Split-it-right sample divider</name>
145
- <image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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
- <figure id='note2'>
148
- <name>b)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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)&#xA0;&#x2014; 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
- <html lang='en'>
178
- <head/>
179
- <body lang='en'>
180
- <div class='title-section'>
181
- <p>&#160;</p>
182
- </div>
183
- <br/>
184
- <div class='prefatory-section'>
185
- <p>&#160;</p>
186
- </div>
187
- <br/>
188
- <div class='main-section'>
189
- <br/>
190
- <div id='fwd'>
191
- <h1 class='ForewordTitle'>Foreword</h1>
192
- <p>
193
- <a href='#N'/>
194
- <a href='#note1'/>
195
- <a href='#note2'/>
196
- <a href='#AN'/>
197
- <a href='#Anote1'/>
198
- <a href='#Anote2'/>
199
- </p>
200
- </div>
201
- <p class='zzSTDTitle1'/>
202
- <div id='scope'>
203
- <h1>Scope</h1>
204
- </div>
205
- <div id='terms'>
206
- <h1/>
207
- </div>
208
- <div id='widgets'>
209
- <h1>Widgets</h1>
210
- <div id='widgets1'>
211
- <div id='N' class='figure'>
212
- <div id='note1' class='figure'>
213
- <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
214
- <p class='FigureTitle' style='text-align:center;'>a)&#160;&#8212; Split-it-right sample divider</p>
215
- </div>
216
- <div id='note2' class='figure'>
217
- <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
218
- <p class='FigureTitle' style='text-align:center;'>b)&#160;&#8212; Split-it-right sample divider</p>
219
- </div>
220
- <p class='FigureTitle' style='text-align:center;'>Figure 1</p>
221
- </div>
222
- <p>
223
- <a href='#note1'/>
224
- <a href='#note2'/>
225
- </p>
226
- </div>
227
- </div>
228
- <br/>
229
- <div id='annex1' class='Section3'>
230
- <div id='annex1a'>
231
- </div>
232
- <div id='annex1b'>
233
- <div id='AN' class='figure'>
234
- <div id='Anote1' class='figure'>
235
- <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
236
- <p class='FigureTitle' style='text-align:center;'>a)&#160;&#8212; Split-it-right sample divider</p>
237
- </div>
238
- <div id='Anote2' class='figure'>
239
- <img src='rice_images/rice_image1.png' height='auto' width='auto'/>
240
- <p class='FigureTitle' style='text-align:center;'>b)&#160;&#8212; Split-it-right sample divider</p>
241
- </div>
242
- <p class='FigureTitle' style='text-align:center;'>Figure A.1</p>
243
- </div>
244
- </div>
245
- </div>
246
- </div>
247
- </body>
248
- </html>
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>&#160;</p>
183
+ </div>
184
+ <br/>
185
+ <div class='prefatory-section'>
186
+ <p>&#160;</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)&#160;&#8212; 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)&#160;&#8212; 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)&#160;&#8212; 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)&#160;&#8212; 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
- it "processes formulae (Presentation XML)" do
253
- expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
254
- <iso-standard xmlns="http://riboseinc.com/isoxml">
255
- <preface><foreword>
256
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
257
- <stem type="AsciiMath">r = 1 %</stem>
258
- <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
259
- <dt> <stem type="AsciiMath">r</stem> </dt>
260
- <dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p> </dd>
261
- <dt> <stem type="AsciiMath">s_1</stem> </dt>
262
- <dd> <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the other repeatability limit.</p> </dd>
263
- </dl>
264
- <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
265
- <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>
266
- </note>
267
- </formula>
268
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935">
269
- <stem type="AsciiMath">r = 1 %</stem>
270
- </formula>
271
- </foreword></preface>
272
- </iso-standard>
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 &quot;P&quot; prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; 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
- <?xml version='1.0'?>
275
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
276
- <preface>
277
- <foreword>
278
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181934' unnumbered='true'>
279
- <stem type='AsciiMath'>r = 1 %</stem>
280
- <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d'>
281
- <dt>
282
- <stem type='AsciiMath'>r</stem>
283
- </dt>
284
- <dd>
285
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
286
- </dd>
287
- <dt>
288
- <stem type='AsciiMath'>s_1</stem>
289
- </dt>
290
- <dd>
291
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
292
- </dd>
293
- </dl>
294
- <note id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0'>
295
- <name>NOTE</name>
296
- <p id='_511aaa98-4116-42af-8e5b-c87cdf5bfdc8'>
297
- [durationUnits] is essentially a duration statement without the "P"
298
- prefix. "P" is unnecessary because between "G" and "U" duration is
299
- always expressed.
300
- </p>
301
- </note>
302
- </formula>
303
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181935'>
304
- <name>1</name>
305
- <stem type='AsciiMath'>r = 1 %</stem>
306
- </formula>
307
- </foreword>
308
- </preface>
309
- </iso-standard>
310
- OUTPUT
311
- end
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
- it "processes formulae (HTML)" do
314
- expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
315
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
316
- <preface>
317
- <foreword>
318
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181934' unnumbered='true'>
319
- <stem type='AsciiMath'>r = 1 %</stem>
320
- <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d'>
321
- <dt>
322
- <stem type='AsciiMath'>r</stem>
323
- </dt>
324
- <dd>
325
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
326
- </dd>
327
- <dt>
328
- <stem type='AsciiMath'>s_1</stem>
329
- </dt>
330
- <dd>
331
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
332
- </dd>
333
- </dl>
334
- <note id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0'>
335
- <p id='_511aaa98-4116-42af-8e5b-c87cdf5bfdc8'>
336
- [durationUnits] is essentially a duration statement without the "P"
337
- prefix. "P" is unnecessary because between "G" and "U" duration is
338
- always expressed.
339
- </p>
340
- </note>
341
- </formula>
342
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181935'>
343
- <name>1</name>
344
- <stem type='AsciiMath'>r = 1 %</stem>
345
- </formula>
346
- </foreword>
347
- </preface>
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 &quot;P&quot;
347
+ prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; 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
- #{HTML_HDR}
351
- <br/>
352
- <div>
353
- <h1 class='ForewordTitle'>Foreword</h1>
354
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
355
- <p>
356
- <span class='stem'>(#(r = 1 %)#)</span>
357
- </p>
358
- </div>
359
- <p style='page-break-after:avoid;'>where</p>
360
- <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d' class='formula_dl'>
361
- <dt>
362
- <span class='stem'>(#(r)#)</span>
363
- </dt>
364
- <dd>
365
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
366
- </dd>
367
- <dt>
368
- <span class='stem'>(#(s_1)#)</span>
369
- </dt>
370
- <dd>
371
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
372
- </dd>
373
- </dl>
374
- <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
375
- <p>
376
- &#160; [durationUnits] is essentially a duration statement without
377
- the "P" prefix. "P" is unnecessary because between "G" and "U"
378
- duration is always expressed.
379
- </p>
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
+ &#160; [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
+ &#160; (1)
399
+ </p>
400
+ </div>
401
+ </div>
402
+ </div>
403
+ <p class='zzSTDTitle1'/>
380
404
  </div>
381
- </div>
382
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
383
- <p>
384
- <span class='stem'>(#(r = 1 %)#)</span>
385
- &#160; (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
- expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">').sub(%r{<p>\&#160;</p>\s*</div>.*$}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
399
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
400
- <preface>
401
- <foreword>
402
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181934' unnumbered='true'>
403
- <stem type='AsciiMath'>r = 1 %</stem>
404
- <dl id='_e4fe94fe-1cde-49d9-b1ad-743293b7e21d'>
405
- <dt>
406
- <stem type='AsciiMath'>r</stem>
407
- </dt>
408
- <dd>
409
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
410
- </dd>
411
- <dt>
412
- <stem type='AsciiMath'>s_1</stem>
413
- </dt>
414
- <dd>
415
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
416
- </dd>
417
- </dl>
418
- <note id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0'>
419
- <p id='_511aaa98-4116-42af-8e5b-c87cdf5bfdc8'>
420
- [durationUnits] is essentially a duration statement without the "P"
421
- prefix. "P" is unnecessary because between "G" and "U" duration is
422
- always expressed.
423
- </p>
424
- </note>
425
- </formula>
426
- <formula id='_be9158af-7e93-4ee2-90c5-26d31c181935'>
427
- <name>1</name>
428
- <stem type='AsciiMath'>r = 1 %</stem>
429
- </formula>
430
- </foreword>
431
- </preface>
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 &quot;P&quot;
433
+ prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; 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
- <div>
435
- <h1 class='ForewordTitle'>Foreword</h1>
436
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181934'><div class='formula'>
437
- <p>
438
- <span class='stem'>(#(r = 1 %)#)</span>
439
- <span style='mso-tab-count:1'>&#160; </span>
440
- </p>
441
- </div>
442
- <p>where</p>
443
- <table class='formula_dl'>
444
- <tr>
445
- <td valign='top' align='left'>
446
- <p align='left' style='margin-left:0pt;text-align:left;'>
447
- <span class='stem'>(#(r)#)</span>
448
- </p>
449
- </td>
450
- <td valign='top'>
451
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
452
- </td>
453
- </tr>
454
- <tr>
455
- <td valign='top' align='left'>
456
- <p align='left' style='margin-left:0pt;text-align:left;'>
457
- <span class='stem'>(#(s_1)#)</span>
458
- </p>
459
- </td>
460
- <td valign='top'>
461
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the other repeatability limit.</p>
462
- </td>
463
- </tr>
464
- </table>
465
- <div id='_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0' class='Note'>
466
- <p class='Note'>
467
- <span class='note_label'/>
468
- <span style='mso-tab-count:1'>&#160; </span>
469
- [durationUnits] is essentially a duration statement without the "P"
470
- prefix. "P" is unnecessary because between "G" and "U" duration is
471
- always expressed.
472
- </p>
473
- </div>
474
- </div>
475
- <div id='_be9158af-7e93-4ee2-90c5-26d31c181935'><div class='formula'>
476
- <p>
477
- <span class='stem'>(#(r = 1 %)#)</span>
478
- <span style='mso-tab-count:1'>&#160; </span>
479
- (1)
480
- </p>
481
- </div>
482
- </div>
483
- </div>
484
- OUTPUT
446
+ expect(xmlpp(output
447
+ .sub(%r{^.*<div>\s*<h1 class="ForewordTitle">}m, '<div><h1 class="ForewordTitle">')
448
+ .sub(%r{<p>&#160;</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'>&#160; </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'>&#160; </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'>&#160; </span>
494
+ (1)
495
+ </p>
496
+ </div>
497
+ </div>
498
+ </div>
499
+ OUTPUT
485
500
  end
486
501
 
487
- it "processes formulae with single definition list entry" do
488
- expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
489
- <iso-standard xmlns="http://riboseinc.com/isoxml">
490
- <preface><foreword>
491
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181934" unnumbered="true">
492
- <stem type="AsciiMath">r = 1 %</stem>
493
- <dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
494
- <dt>
495
- <stem type="AsciiMath">r</stem>
496
- </dt>
497
- <dd>
498
- <p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
499
- </dd>
500
- </dl>
501
- <note id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0">
502
- <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>
503
- </note>
504
- </formula>
505
- <formula id="_be9158af-7e93-4ee2-90c5-26d31c181935"><name>1</name>
506
- <stem type="AsciiMath">r = 1 %</stem>
507
- </formula>
508
- </foreword></preface>
509
- </iso-standard>
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 &quot;P&quot; prefix. &quot;P&quot; is unnecessary because between &quot;G&quot; and &quot;U&quot; 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
- #{HTML_HDR}
512
- <br/>
513
- <div>
514
- <h1 class="ForewordTitle">Foreword</h1>
515
- <div id="_be9158af-7e93-4ee2-90c5-26d31c181934"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span></p></div>
516
- <span class='zzMoveToFollowing'>
517
- where
518
- <span class='stem'>(#(r)#)</span>
519
- </span>
520
- <p id='_1b99995d-ff03-40f5-8f2e-ab9665a69b77'>is the repeatability limit.</p>
521
-
522
- <div id="_83083c7a-6c85-43db-a9fa-4d8edd0c9fc0" class="Note"><p>&#160; [durationUnits] is essentially a duration statement without the "P" prefix. "P" is unnecessary because between "G" and "U" duration is always expressed.</p></div>
523
- </div>
524
-
525
- <div id="_be9158af-7e93-4ee2-90c5-26d31c181935"><div class="formula"><p><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</p></div></div>
526
- </div>
527
- <p class="zzSTDTitle1"/>
528
- </div>
529
- </body>
530
- </html>
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>&#160; [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>&#160; (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