metanorma-iso 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/lib/isodoc/iso/base_convert.rb +13 -13
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +69 -13
- data/lib/isodoc/iso/iso.international-standard.xsl +69 -13
- data/lib/isodoc/iso/metadata.rb +2 -2
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +19 -10
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +301 -306
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- metadata +3 -3
data/spec/isodoc/inline_spec.rb
CHANGED
@@ -318,7 +318,7 @@ RSpec.describe IsoDoc do
|
|
318
318
|
<?xml version='1.0'?>
|
319
319
|
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
320
320
|
<preface>
|
321
|
-
<foreword>
|
321
|
+
<foreword displayorder="1">
|
322
322
|
<p>
|
323
323
|
<eref bibitemid="IEV" citeas="IEV" type="inline">
|
324
324
|
<locality type="clause">
|
@@ -372,7 +372,7 @@ RSpec.describe IsoDoc do
|
|
372
372
|
</foreword>
|
373
373
|
</preface>
|
374
374
|
<bibliography>
|
375
|
-
<references id="_normative_references" normative="true" obligation="informative">
|
375
|
+
<references id="_normative_references" normative="true" obligation="informative" displayorder="2">
|
376
376
|
<title depth="1">1<tab/>
|
377
377
|
Normative References</title>
|
378
378
|
<bibitem id="ISO712" type="standard">
|
data/spec/isodoc/iso_spec.rb
CHANGED
@@ -177,8 +177,8 @@ RSpec.describe IsoDoc::Iso do
|
|
177
177
|
OUTPUT
|
178
178
|
end
|
179
179
|
|
180
|
-
it "processes examples
|
181
|
-
|
180
|
+
it "processes examples" do
|
181
|
+
input = <<~INPUT
|
182
182
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
183
183
|
<preface>
|
184
184
|
<foreword>
|
@@ -190,11 +190,11 @@ RSpec.describe IsoDoc::Iso do
|
|
190
190
|
</preface>
|
191
191
|
</iso-standard>
|
192
192
|
INPUT
|
193
|
-
|
193
|
+
presxml = <<~OUTPUT
|
194
194
|
<?xml version='1.0'?>
|
195
195
|
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
196
196
|
<preface>
|
197
|
-
<foreword>
|
197
|
+
<foreword displayorder="1">
|
198
198
|
<example id="samplecode">
|
199
199
|
<name>EXAMPLE — Title</name>
|
200
200
|
<p>Hello</p>
|
@@ -203,22 +203,8 @@ RSpec.describe IsoDoc::Iso do
|
|
203
203
|
</preface>
|
204
204
|
</iso-standard>
|
205
205
|
OUTPUT
|
206
|
-
end
|
207
206
|
|
208
|
-
|
209
|
-
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
210
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
211
|
-
<preface>
|
212
|
-
<foreword>
|
213
|
-
<example id="samplecode">
|
214
|
-
<name>EXAMPLE — Title</name>
|
215
|
-
<p>Hello</p>
|
216
|
-
</example>
|
217
|
-
</foreword>
|
218
|
-
</preface>
|
219
|
-
</iso-standard>
|
220
|
-
INPUT
|
221
|
-
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
207
|
+
html = <<~OUTPUT
|
222
208
|
#{HTML_HDR}
|
223
209
|
<br/>
|
224
210
|
<div>
|
@@ -232,10 +218,49 @@ RSpec.describe IsoDoc::Iso do
|
|
232
218
|
</body>
|
233
219
|
</html>
|
234
220
|
OUTPUT
|
221
|
+
|
222
|
+
word = <<~OUTPUT
|
223
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
224
|
+
<div class="WordSection1">
|
225
|
+
<p> </p>
|
226
|
+
</div>
|
227
|
+
<p>
|
228
|
+
<br clear="all" class="section"/>
|
229
|
+
</p>
|
230
|
+
<div class="WordSection2">
|
231
|
+
<p>
|
232
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
233
|
+
</p>
|
234
|
+
<div>
|
235
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
236
|
+
<div id="samplecode" class="example">
|
237
|
+
<p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
<p> </p>
|
241
|
+
</div>
|
242
|
+
<p>
|
243
|
+
<br clear="all" class="section"/>
|
244
|
+
</p>
|
245
|
+
<div class="WordSection3">
|
246
|
+
<p class="zzSTDTitle1"/>
|
247
|
+
</div>
|
248
|
+
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
249
|
+
<div class="colophon"/>
|
250
|
+
</body>
|
251
|
+
OUTPUT
|
252
|
+
expect(IsoDoc::Iso::PresentationXMLConvert.new({})
|
253
|
+
.convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
|
254
|
+
expect(IsoDoc::Iso::HtmlConvert.new({})
|
255
|
+
.convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
|
256
|
+
output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
|
257
|
+
expect(xmlpp(output
|
258
|
+
.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
259
|
+
.to be_equivalent_to xmlpp(word)
|
235
260
|
end
|
236
261
|
|
237
|
-
it "processes sequences of examples
|
238
|
-
|
262
|
+
it "processes sequences of examples" do
|
263
|
+
input = <<~INPUT
|
239
264
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
240
265
|
<preface>
|
241
266
|
<foreword>
|
@@ -250,11 +275,11 @@ RSpec.describe IsoDoc::Iso do
|
|
250
275
|
</preface>
|
251
276
|
</iso-standard>
|
252
277
|
INPUT
|
253
|
-
|
278
|
+
presxml = <<~OUTPUT
|
254
279
|
<?xml version='1.0'?>
|
255
280
|
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
256
281
|
<preface>
|
257
|
-
<foreword>
|
282
|
+
<foreword displayorder="1">
|
258
283
|
<example id="samplecode">
|
259
284
|
<name>EXAMPLE 1</name>
|
260
285
|
<quote>Hello</quote>
|
@@ -267,26 +292,7 @@ RSpec.describe IsoDoc::Iso do
|
|
267
292
|
</preface>
|
268
293
|
</iso-standard>
|
269
294
|
OUTPUT
|
270
|
-
|
271
|
-
|
272
|
-
it "processes sequences of examples (HTML)" do
|
273
|
-
output = IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", true)
|
274
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
275
|
-
<preface>
|
276
|
-
<foreword>
|
277
|
-
<example id="samplecode">
|
278
|
-
<name>EXAMPLE 1</name>
|
279
|
-
<quote>Hello</quote>
|
280
|
-
</example>
|
281
|
-
<example id="samplecode2">
|
282
|
-
<name>EXAMPLE 2 — Title</name>
|
283
|
-
<p>Hello</p>
|
284
|
-
</example>
|
285
|
-
</foreword>
|
286
|
-
</preface>
|
287
|
-
</iso-standard>
|
288
|
-
INPUT
|
289
|
-
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
295
|
+
html = <<~OUTPUT
|
290
296
|
#{HTML_HDR}
|
291
297
|
<br/>
|
292
298
|
<div>
|
@@ -304,105 +310,47 @@ RSpec.describe IsoDoc::Iso do
|
|
304
310
|
</body>
|
305
311
|
</html>
|
306
312
|
OUTPUT
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
<
|
313
|
-
<
|
314
|
-
|
315
|
-
|
316
|
-
<p>Hello</p>
|
317
|
-
</example>
|
318
|
-
</foreword>
|
319
|
-
</preface>
|
320
|
-
</iso-standard>
|
321
|
-
INPUT
|
322
|
-
expect(xmlpp(output.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
323
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
324
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
325
|
-
<div class="WordSection1">
|
326
|
-
<p> </p>
|
327
|
-
</div>
|
313
|
+
word = <<~OUTPUT
|
314
|
+
<body lang="EN-US" link="blue" vlink="#954F72">
|
315
|
+
<div class="WordSection1">
|
316
|
+
<p> </p>
|
317
|
+
</div>
|
318
|
+
<p>
|
319
|
+
<br clear="all" class="section"/>
|
320
|
+
</p>
|
321
|
+
<div class="WordSection2">
|
328
322
|
<p>
|
329
|
-
<br clear="all"
|
323
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
330
324
|
</p>
|
331
|
-
<div
|
332
|
-
<
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
337
|
-
<div id="samplecode" class="example">
|
338
|
-
<p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
339
|
-
</div>
|
325
|
+
<div>
|
326
|
+
<h1 class="ForewordTitle">Foreword</h1>
|
327
|
+
<div id="samplecode" class="example">
|
328
|
+
<p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">  </span></p>
|
329
|
+
<div class="Quote">Hello</div>
|
340
330
|
</div>
|
341
|
-
<
|
342
|
-
|
343
|
-
<p>
|
344
|
-
<br clear="all" class="section"/>
|
345
|
-
</p>
|
346
|
-
<div class="WordSection3">
|
347
|
-
<p class="zzSTDTitle1"/>
|
348
|
-
</div>
|
349
|
-
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
350
|
-
<div class="colophon"/>
|
351
|
-
</body>
|
352
|
-
OUTPUT
|
353
|
-
end
|
354
|
-
|
355
|
-
it "processes sequences of examples (Word)" do
|
356
|
-
output = IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true)
|
357
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
358
|
-
<preface>
|
359
|
-
<foreword>
|
360
|
-
<example id="samplecode">
|
361
|
-
<name>EXAMPLE 1</name>
|
362
|
-
<quote>Hello</quote>
|
363
|
-
</example>
|
364
|
-
<example id="samplecode2">
|
365
|
-
<name>EXAMPLE 2 — Title</name>
|
366
|
-
<p>Hello</p>
|
367
|
-
</example>
|
368
|
-
</foreword>
|
369
|
-
</preface>
|
370
|
-
</iso-standard>
|
371
|
-
INPUT
|
372
|
-
expect(xmlpp(output.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
373
|
-
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
374
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
375
|
-
<div class="WordSection1">
|
376
|
-
<p> </p>
|
377
|
-
</div>
|
378
|
-
<p>
|
379
|
-
<br clear="all" class="section"/>
|
380
|
-
</p>
|
381
|
-
<div class="WordSection2">
|
382
|
-
<p>
|
383
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
384
|
-
</p>
|
385
|
-
<div>
|
386
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
387
|
-
<div id="samplecode" class="example">
|
388
|
-
<p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">  </span></p>
|
389
|
-
<div class="Quote">Hello</div>
|
390
|
-
</div>
|
391
|
-
<div id="samplecode2" class="example">
|
392
|
-
<p><span class="example_label">EXAMPLE 2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
393
|
-
</div>
|
331
|
+
<div id="samplecode2" class="example">
|
332
|
+
<p><span class="example_label">EXAMPLE 2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
394
333
|
</div>
|
395
|
-
<p> </p>
|
396
334
|
</div>
|
397
|
-
<p>
|
398
|
-
|
399
|
-
|
400
|
-
<
|
401
|
-
|
402
|
-
|
403
|
-
<
|
404
|
-
|
405
|
-
|
406
|
-
|
335
|
+
<p> </p>
|
336
|
+
</div>
|
337
|
+
<p>
|
338
|
+
<br clear="all" class="section"/>
|
339
|
+
</p>
|
340
|
+
<div class="WordSection3">
|
341
|
+
<p class="zzSTDTitle1"/>
|
342
|
+
</div>
|
343
|
+
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
344
|
+
<div class="colophon"/>
|
345
|
+
</body>
|
346
|
+
OUTPUT
|
347
|
+
expect(IsoDoc::Iso::PresentationXMLConvert.new({})
|
348
|
+
.convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
|
349
|
+
expect(IsoDoc::Iso::HtmlConvert.new({})
|
350
|
+
.convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
|
351
|
+
output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
|
352
|
+
expect(xmlpp(output
|
353
|
+
.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
354
|
+
.to be_equivalent_to xmlpp(word)
|
407
355
|
end
|
408
356
|
end
|
@@ -148,6 +148,9 @@ RSpec.describe IsoDoc do
|
|
148
148
|
An Appendix</title>
|
149
149
|
</appendix>
|
150
150
|
</annex>
|
151
|
+
<bibliography>
|
152
|
+
<references id="R" normative="false"><title>Bibliography</title></references>
|
153
|
+
</bibliography>
|
151
154
|
</iso-standard>
|
152
155
|
INPUT
|
153
156
|
|
@@ -163,7 +166,7 @@ RSpec.describe IsoDoc do
|
|
163
166
|
</p>
|
164
167
|
<div class="Section3">
|
165
168
|
<a id="P" name="P"/>
|
166
|
-
<
|
169
|
+
<p class="ANNEX">Annex</p>
|
167
170
|
<div>
|
168
171
|
<a id="Q" name="Q"/>
|
169
172
|
<p class="h2Annex">A.1
|
@@ -177,6 +180,12 @@ RSpec.describe IsoDoc do
|
|
177
180
|
An Appendix</p>
|
178
181
|
</div>
|
179
182
|
</div>
|
183
|
+
<p class='MsoNormal'>
|
184
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
185
|
+
</p>
|
186
|
+
<div>
|
187
|
+
<p class='BiblioTitle'>Bibliography</p>
|
188
|
+
</div>
|
180
189
|
</div>
|
181
190
|
OUTPUT
|
182
191
|
end
|
@@ -227,9 +236,9 @@ RSpec.describe IsoDoc do
|
|
227
236
|
<p class="TermNum">
|
228
237
|
<a id="paddy1" name="paddy1"/>1.1</p>
|
229
238
|
<p class="Terms" style="text-align:left;">paddy</p>
|
230
|
-
<p class="
|
239
|
+
<p class="Definition">
|
231
240
|
<a id="_eb29b35e-123e-4d1c-b50b-2714d41e747f" name="_eb29b35e-123e-4d1c-b50b-2714d41e747f"/>rice retaining its husk after threshing</p>
|
232
|
-
<p class="
|
241
|
+
<p class="Source">[SOURCE:
|
233
242
|
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
234
243
|
, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
|
235
244
|
</div>
|
@@ -297,8 +306,9 @@ RSpec.describe IsoDoc do
|
|
297
306
|
<p class="MsoToc1">
|
298
307
|
<span lang="EN-GB" xml:lang="EN-GB">
|
299
308
|
<span style="mso-element:field-begin"/>
|
300
|
-
<span style=
|
301
|
-
|
309
|
+
<span style='mso-spacerun:yes'> </span>
|
310
|
+
TOC \o "1-3" \h \z \t "Heading 1;1;ANNEX;1;Biblio Title;1;Foreword
|
311
|
+
Title;1;Intro Title;1"
|
302
312
|
<span style="mso-element:field-separator"/></span>
|
303
313
|
<span class="MsoHyperlink">
|
304
314
|
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
@@ -658,14 +668,14 @@ RSpec.describe IsoDoc do
|
|
658
668
|
</p>
|
659
669
|
<div class="Section3">
|
660
670
|
<a id="P" name="P"/>
|
661
|
-
<div class="
|
671
|
+
<div class="Example">
|
662
672
|
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851c" name="_63112cbc-cde0-435f-9553-e0b8c4f5851c"/>
|
663
|
-
<p class="
|
673
|
+
<p class="Example">
|
664
674
|
<span style="mso-tab-count:1"> </span>'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
665
675
|
</div>
|
666
|
-
<div class="
|
676
|
+
<div class="Example">
|
667
677
|
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851d" name="_63112cbc-cde0-435f-9553-e0b8c4f5851d"/>
|
668
|
-
<p class="
|
678
|
+
<p class="Example">
|
669
679
|
<span style="mso-tab-count:1"> </span>'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
670
680
|
</div>
|
671
681
|
</div>
|
@@ -726,7 +736,6 @@ RSpec.describe IsoDoc do
|
|
726
736
|
</tr>
|
727
737
|
</table>
|
728
738
|
</div>
|
729
|
-
<p class="FigureTitle" style="text-align:center;"/>
|
730
739
|
</div>
|
731
740
|
</div>
|
732
741
|
</div>
|
data/spec/isodoc/ref_spec.rb
CHANGED
@@ -155,7 +155,7 @@ RSpec.describe IsoDoc do
|
|
155
155
|
<language current="true">en</language>
|
156
156
|
</bibdata>
|
157
157
|
<preface>
|
158
|
-
<foreword>
|
158
|
+
<foreword displayorder="1">
|
159
159
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">
|
160
160
|
<eref bibitemid="ISO712">ISO 712</eref>
|
161
161
|
<eref bibitemid="ISBN">[1]</eref>
|
@@ -168,7 +168,7 @@ RSpec.describe IsoDoc do
|
|
168
168
|
</foreword>
|
169
169
|
</preface>
|
170
170
|
<bibliography>
|
171
|
-
<references id="_normative_references" normative="true" obligation="informative">
|
171
|
+
<references id="_normative_references" normative="true" obligation="informative" displayorder="2">
|
172
172
|
<title depth="1">1<tab/>Normative References</title>
|
173
173
|
<p>The following documents are referred to in the text in such a way that
|
174
174
|
some or all of their content constitutes requirements of this document.
|
@@ -231,14 +231,14 @@ RSpec.describe IsoDoc do
|
|
231
231
|
|
232
232
|
<link target="http://www.icc.or.at"/>
|
233
233
|
)</formattedref>
|
234
|
-
<docidentifier type="ICC">167</docidentifier>
|
234
|
+
<docidentifier type="ICC">ICC 167</docidentifier>
|
235
235
|
</bibitem>
|
236
236
|
<note>
|
237
237
|
<name>NOTE</name>
|
238
238
|
<p>This is an annotation of ISO 20483:2013-2014</p>
|
239
239
|
</note>
|
240
240
|
</references>
|
241
|
-
<references id="_bibliography" normative="false" obligation="informative">
|
241
|
+
<references id="_bibliography" normative="false" obligation="informative" displayorder="3">
|
242
242
|
<title depth="1">Bibliography</title>
|
243
243
|
<bibitem id="ISBN" type="ISBN">
|
244
244
|
<title format="text/plain">Chemicals for analytical laboratory use</title>
|
@@ -294,7 +294,7 @@ RSpec.describe IsoDoc do
|
|
294
294
|
</bibitem>
|
295
295
|
<bibitem id="ref11">
|
296
296
|
<title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
|
297
|
-
<docidentifier type="IETF">RFC 10</docidentifier>
|
297
|
+
<docidentifier type="IETF">IETF RFC 10</docidentifier>
|
298
298
|
</bibitem>
|
299
299
|
<bibitem id="ref12">
|
300
300
|
<formattedref format="application/x-isodoc+xml">CitationWorks. 2019.
|
@@ -302,7 +302,7 @@ RSpec.describe IsoDoc do
|
|
302
302
|
<em>How to cite a reference</em>
|
303
303
|
.</formattedref>
|
304
304
|
<docidentifier type="metanorma">[Citn]</docidentifier>
|
305
|
-
<docidentifier type="IETF">RFC 20</docidentifier>
|
305
|
+
<docidentifier type="IETF">IETF RFC 20</docidentifier>
|
306
306
|
</bibitem>
|
307
307
|
</references>
|
308
308
|
</bibliography>
|
data/spec/isodoc/section_spec.rb
CHANGED
@@ -86,100 +86,86 @@ RSpec.describe IsoDoc do
|
|
86
86
|
INPUT
|
87
87
|
|
88
88
|
presxml = <<~OUTPUT
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
89
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
90
|
+
<preface>
|
91
|
+
<foreword obligation="informative" displayorder="1">
|
92
|
+
<title>Foreword</title>
|
93
|
+
<p id="A">This is a preamble</p>
|
94
|
+
</foreword>
|
95
|
+
<introduction id="B" obligation="informative" displayorder="2">
|
96
|
+
<title depth="1">0<tab/>Introduction</title>
|
97
|
+
<clause id="C" inline-header="false" obligation="informative">
|
98
|
+
<title depth="2">0.1<tab/>Introduction Subsection</title>
|
99
|
+
</clause>
|
100
|
+
<p>This is patent boilerplate</p>
|
101
|
+
</introduction>
|
102
|
+
</preface>
|
103
|
+
<sections>
|
104
|
+
<clause id="D" obligation="normative" type="scope" displayorder="3">
|
105
|
+
<title depth="1">1<tab/>Scope</title>
|
106
|
+
<p id="E">Text</p>
|
99
107
|
</clause>
|
100
|
-
<
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
</terms>
|
117
|
-
<definitions id='K' inline-header='true'>
|
118
|
-
<title>3.2</title>
|
108
|
+
<clause id="H" obligation="normative" displayorder="5">
|
109
|
+
<title depth="1">3<tab/>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
110
|
+
<terms id="I" obligation="normative">
|
111
|
+
<title depth="2">3.1<tab/>Normal Terms</title>
|
112
|
+
<term id="J"><name>3.1.1</name>
|
113
|
+
<preferred>Term2</preferred>
|
114
|
+
</term>
|
115
|
+
</terms>
|
116
|
+
<definitions id="K" inline-header="true"><title>3.2</title>
|
117
|
+
<dl>
|
118
|
+
<dt>Symbol</dt>
|
119
|
+
<dd>Definition</dd>
|
120
|
+
</dl>
|
121
|
+
</definitions>
|
122
|
+
</clause>
|
123
|
+
<definitions id="L" displayorder="6"><title>4</title>
|
119
124
|
<dl>
|
120
125
|
<dt>Symbol</dt>
|
121
126
|
<dd>Definition</dd>
|
122
127
|
</dl>
|
123
128
|
</definitions>
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<
|
130
|
-
|
131
|
-
|
132
|
-
<clause id='M' inline-header='false' obligation='normative'>
|
133
|
-
<title depth='1'>5<tab/>Clause 4</title>
|
134
|
-
<clause id='N' inline-header='false' obligation='normative'>
|
135
|
-
<title depth='2'>5.1<tab/>Introduction</title>
|
136
|
-
</clause>
|
137
|
-
<clause id='O' inline-header='false' obligation='normative'>
|
138
|
-
<title depth='2'>5.2<tab/>Clause 4.2</title>
|
139
|
-
</clause>
|
140
|
-
</clause>
|
141
|
-
</sections>
|
142
|
-
<annex id='P' inline-header='false' obligation='normative'>
|
143
|
-
<title>
|
144
|
-
<strong>Annex A</strong>
|
145
|
-
<br/>
|
146
|
-
(normative)
|
147
|
-
<br/>
|
148
|
-
<br/>
|
149
|
-
<strong>Annex</strong>
|
150
|
-
</title>
|
151
|
-
<clause id='Q' inline-header='false' obligation='normative'>
|
152
|
-
<title depth='2'>A.1<tab/>Annex A.1</title>
|
153
|
-
<clause id='Q1' inline-header='false' obligation='normative'>
|
154
|
-
<title depth='3'>A.1.1<tab/>Annex A.1a</title>
|
129
|
+
<clause id="M" inline-header="false" obligation="normative" displayorder="7">
|
130
|
+
<title depth="1">5<tab/>Clause 4</title>
|
131
|
+
<clause id="N" inline-header="false" obligation="normative">
|
132
|
+
<title depth="2">5.1<tab/>Introduction</title>
|
133
|
+
</clause>
|
134
|
+
<clause id="O" inline-header="false" obligation="normative">
|
135
|
+
<title depth="2">5.2<tab/>Clause 4.2</title>
|
136
|
+
</clause>
|
155
137
|
</clause>
|
156
|
-
</
|
157
|
-
<
|
158
|
-
<title
|
159
|
-
<clause id=
|
160
|
-
<title depth=
|
161
|
-
|
162
|
-
<tab/>
|
163
|
-
|
164
|
-
</title>
|
138
|
+
</sections>
|
139
|
+
<annex id="P" inline-header="false" obligation="normative" displayorder="8">
|
140
|
+
<title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
|
141
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
142
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
143
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
144
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
145
|
+
</clause>
|
165
146
|
</clause>
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</references>
|
175
|
-
<clause id='S' obligation='informative'>
|
176
|
-
<title depth='1'>Bibliography</title>
|
177
|
-
<references id='T' obligation='informative' normative='false'>
|
178
|
-
<title depth='2'>Bibliography Subsection</title>
|
147
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
148
|
+
<title depth="2">Appendix 1<tab/>An Appendix</title>
|
149
|
+
<clause id="Q2a" inline-header="false" obligation="normative">
|
150
|
+
<title depth="3">Appendix 1.1<tab/>Appendix subclause</title>
|
151
|
+
</clause>
|
152
|
+
</appendix>
|
153
|
+
<references id="Q3" normative="false">
|
154
|
+
<title depth="2">A.2<tab/>Annex Bibliography</title>
|
179
155
|
</references>
|
180
|
-
</
|
181
|
-
|
182
|
-
|
156
|
+
</annex>
|
157
|
+
<bibliography>
|
158
|
+
<references id="R" normative="true" obligation="informative" displayorder="4">
|
159
|
+
<title depth="1">2<tab/>Normative References</title>
|
160
|
+
</references>
|
161
|
+
<clause id="S" obligation="informative" displayorder="9">
|
162
|
+
<title depth="1">Bibliography</title>
|
163
|
+
<references id="T" normative="false" obligation="informative">
|
164
|
+
<title depth="2">Bibliography Subsection</title>
|
165
|
+
</references>
|
166
|
+
</clause>
|
167
|
+
</bibliography>
|
168
|
+
</iso-standard>
|
183
169
|
OUTPUT
|
184
170
|
|
185
171
|
html = <<~OUTPUT
|
@@ -259,7 +245,7 @@ RSpec.describe IsoDoc do
|
|
259
245
|
<div id="Q2">
|
260
246
|
<h2>Appendix 1  An Appendix</h2>
|
261
247
|
<div id="Q2a">
|
262
|
-
<h3>Appendix 1.1
|
248
|
+
<h3>Appendix 1.1  Appendix subclause</h3>
|
263
249
|
</div>
|
264
250
|
</div>
|
265
251
|
<div>
|
@@ -281,7 +267,7 @@ RSpec.describe IsoDoc do
|
|
281
267
|
word = <<~OUTPUT
|
282
268
|
<body lang="EN-US" link="blue" vlink="#954F72">
|
283
269
|
<div class="WordSection1">
|
284
|
-
<p
|
270
|
+
<p> </p>
|
285
271
|
</div>
|
286
272
|
<p>
|
287
273
|
<br class="section" clear="all"/>
|
@@ -292,7 +278,7 @@ RSpec.describe IsoDoc do
|
|
292
278
|
</p>
|
293
279
|
<div>
|
294
280
|
<h1 class="ForewordTitle">Foreword</h1>
|
295
|
-
<p id="A">This is a preamble</p>
|
281
|
+
<p id="A" class='ForewordText'>This is a preamble</p>
|
296
282
|
</div>
|
297
283
|
<p>
|
298
284
|
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
@@ -308,7 +294,7 @@ RSpec.describe IsoDoc do
|
|
308
294
|
</div>
|
309
295
|
<p>This is patent boilerplate</p>
|
310
296
|
</div>
|
311
|
-
<p
|
297
|
+
<p> </p>
|
312
298
|
</div>
|
313
299
|
<p>
|
314
300
|
<br class="section" clear="all"/>
|
@@ -383,7 +369,6 @@ RSpec.describe IsoDoc do
|
|
383
369
|
</p>
|
384
370
|
<div class="Section3" id="P">
|
385
371
|
<h1 class="Annex">
|
386
|
-
<b>Annex A</b>
|
387
372
|
<br/>(normative)
|
388
373
|
<br/>
|
389
374
|
<br/>
|
@@ -409,7 +394,7 @@ RSpec.describe IsoDoc do
|
|
409
394
|
</div>
|
410
395
|
</div>
|
411
396
|
<div>
|
412
|
-
<h2 class="
|
397
|
+
<h2 class="BiblioTitle">A.2
|
413
398
|
<span style="mso-tab-count:1">  </span>
|
414
399
|
Annex Bibliography</h2>
|
415
400
|
</div>
|
@@ -418,9 +403,9 @@ RSpec.describe IsoDoc do
|
|
418
403
|
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
419
404
|
</p>
|
420
405
|
<div>
|
421
|
-
<h1 class="
|
406
|
+
<h1 class="BiblioTitle">Bibliography</h1>
|
422
407
|
<div>
|
423
|
-
<h2 class="
|
408
|
+
<h2 class="BiblioTitle">Bibliography Subsection</h2>
|
424
409
|
</div>
|
425
410
|
</div>
|
426
411
|
</div>
|
@@ -428,12 +413,16 @@ RSpec.describe IsoDoc do
|
|
428
413
|
<div class="colophon"/>
|
429
414
|
</body>
|
430
415
|
OUTPUT
|
431
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
416
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
417
|
+
.convert("test", input, true)))
|
432
418
|
.to be_equivalent_to xmlpp(presxml)
|
433
|
-
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
419
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
420
|
+
.convert("test", presxml, true)))
|
434
421
|
.to be_equivalent_to xmlpp(html)
|
435
|
-
expect(xmlpp(IsoDoc::Iso::WordConvert.new({})
|
436
|
-
.
|
422
|
+
expect(xmlpp(IsoDoc::Iso::WordConvert.new({})
|
423
|
+
.convert("test", presxml, true)
|
424
|
+
.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
|
425
|
+
.to be_equivalent_to xmlpp(word)
|
437
426
|
end
|
438
427
|
|
439
428
|
it "processes subclauses with and without titles" do
|
@@ -455,7 +444,7 @@ RSpec.describe IsoDoc do
|
|
455
444
|
presxml = <<~OUTPUT
|
456
445
|
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
457
446
|
<sections>
|
458
|
-
<clause id='D' obligation='normative'>
|
447
|
+
<clause id='D' obligation='normative' displayorder="1">
|
459
448
|
<title depth='1'>1<tab/>Scope</title>
|
460
449
|
<clause id='D1' obligation='normative'>
|
461
450
|
<title depth='2'>1.1<tab/>Scope 1</title>
|
@@ -497,38 +486,42 @@ RSpec.describe IsoDoc do
|
|
497
486
|
</body>
|
498
487
|
</html>
|
499
488
|
OUTPUT
|
500
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
489
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
490
|
+
.convert("test", input, true)))
|
501
491
|
.to be_equivalent_to xmlpp(presxml)
|
502
|
-
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
492
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
493
|
+
.convert("test", presxml, true)))
|
503
494
|
.to be_equivalent_to xmlpp(html)
|
504
495
|
end
|
505
496
|
|
506
497
|
it "processes simple terms & definitions" do
|
507
|
-
|
508
|
-
|
509
|
-
<
|
510
|
-
<
|
511
|
-
<
|
512
|
-
|
513
|
-
<
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
</div>
|
498
|
+
input = <<~INPUT
|
499
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
500
|
+
<sections>
|
501
|
+
<terms id="H" obligation="normative">
|
502
|
+
<title>Terms, Definitions, Symbols and Abbreviated Terms</title>
|
503
|
+
<term id="J">
|
504
|
+
<name>1.1</name>
|
505
|
+
<preferred>Term2</preferred>
|
506
|
+
</term>
|
507
|
+
</terms>
|
508
|
+
</sections>
|
509
|
+
</iso-standard>
|
510
|
+
INPUT
|
511
|
+
output = <<~OUTPUT
|
512
|
+
#{HTML_HDR}
|
513
|
+
<p class="zzSTDTitle1"/>
|
514
|
+
<div id="H">
|
515
|
+
<h1>Terms, Definitions, Symbols and Abbreviated Terms</h1>
|
516
|
+
<p class="TermNum" id="J">1.1</p>
|
517
|
+
<p class="Terms" style="text-align:left;">Term2</p>
|
528
518
|
</div>
|
529
|
-
</
|
530
|
-
</
|
531
|
-
|
519
|
+
</div>
|
520
|
+
</body>
|
521
|
+
</html>
|
522
|
+
OUTPUT
|
523
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
524
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
532
525
|
end
|
533
526
|
|
534
527
|
it "processes inline section headers" do
|
@@ -686,191 +679,193 @@ RSpec.describe IsoDoc do
|
|
686
679
|
</bipm-standard>
|
687
680
|
INPUT
|
688
681
|
presxml = <<~OUTPUT
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
</iso-standard>
|
682
|
+
<iso-standard xmlns='https://open.ribose.com/standards/bipm' type='presentation'>
|
683
|
+
<bibdata>
|
684
|
+
<language current='true'>en</language>
|
685
|
+
<script current='true'>Latn</script>
|
686
|
+
</bibdata>
|
687
|
+
<sections>
|
688
|
+
<clause id='A' displayorder="1">
|
689
|
+
<title>1</title>
|
690
|
+
<bookmark id='_'/>
|
691
|
+
<bookmark id='_'/>
|
692
|
+
<bookmark id='_'/>
|
693
|
+
<bookmark id='_'/>
|
694
|
+
<bookmark id='_'/>
|
695
|
+
<clause id='B' inline-header='true'>
|
696
|
+
<title>1.1</title>
|
697
|
+
<bookmark id='_'/>
|
698
|
+
<bookmark id='_'/>
|
699
|
+
<bookmark id='_'/>
|
700
|
+
<bookmark id='_'/>
|
701
|
+
</clause>
|
702
|
+
</clause>
|
703
|
+
</sections>
|
704
|
+
<indexsect id='_'>
|
705
|
+
<title>Index</title>
|
706
|
+
<ul>
|
707
|
+
<li>
|
708
|
+
<em>Dasein</em>
|
709
|
+
, see
|
710
|
+
<em>Eman</em>
|
711
|
+
cipation, être
|
712
|
+
</li>
|
713
|
+
<li>
|
714
|
+
élongé,
|
715
|
+
<xref target='_' pagenumber='true'>Clause 1</xref>
|
716
|
+
</li>
|
717
|
+
<li>
|
718
|
+
<em>Eman</em>
|
719
|
+
cipation,
|
720
|
+
<xref target='_' pagenumber='true'>Clause 1</xref>
|
721
|
+
,
|
722
|
+
<xref target='_' pagenumber='true'>1.1</xref>
|
723
|
+
<ul>
|
724
|
+
<li>
|
725
|
+
dans la France,
|
726
|
+
<xref target='_' pagenumber='true'>Clause 1</xref>
|
727
|
+
<ul>
|
728
|
+
<li>
|
729
|
+
à Paris,
|
730
|
+
<xref target='_' pagenumber='true'>1.1</xref>
|
731
|
+
</li>
|
732
|
+
<li>
|
733
|
+
en Bretagne,
|
734
|
+
<xref target='_' pagenumber='true'>Clause 1</xref>
|
735
|
+
</li>
|
736
|
+
</ul>
|
737
|
+
</li>
|
738
|
+
<li>
|
739
|
+
dans les États-Unis,
|
740
|
+
<xref target='_' pagenumber='true'>1.1</xref>
|
741
|
+
</li>
|
742
|
+
</ul>
|
743
|
+
</li>
|
744
|
+
<li>
|
745
|
+
être
|
746
|
+
<ul>
|
747
|
+
<li>
|
748
|
+
Husserl, see zebra, see also
|
749
|
+
<em>Eman</em>
|
750
|
+
cipation, zebra
|
751
|
+
<ul>
|
752
|
+
<li>
|
753
|
+
en allemand,
|
754
|
+
<xref target='_' pagenumber='true'>Clause 1</xref>
|
755
|
+
</li>
|
756
|
+
</ul>
|
757
|
+
</li>
|
758
|
+
</ul>
|
759
|
+
</li>
|
760
|
+
<li>
|
761
|
+
zebra,
|
762
|
+
<xref target='_' pagenumber='true'>1.1</xref>
|
763
|
+
</li>
|
764
|
+
</ul>
|
765
|
+
</indexsect>
|
766
|
+
</iso-standard>
|
774
767
|
OUTPUT
|
775
768
|
html = <<~OUTPUT
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
</html>
|
769
|
+
<html lang='en'>
|
770
|
+
<head/>
|
771
|
+
<body lang='en'>
|
772
|
+
<div class='title-section'>
|
773
|
+
<p> </p>
|
774
|
+
</div>
|
775
|
+
<br/>
|
776
|
+
<div class='prefatory-section'>
|
777
|
+
<p> </p>
|
778
|
+
</div>
|
779
|
+
<br/>
|
780
|
+
<div class='main-section'>
|
781
|
+
<p class='zzSTDTitle1'/>
|
782
|
+
<div id='A'>
|
783
|
+
<h1>1</h1>
|
784
|
+
<a id='_'/>
|
785
|
+
<a id='_'/>
|
786
|
+
<a id='_'/>
|
787
|
+
<a id='_'/>
|
788
|
+
<a id='_'/>
|
789
|
+
<div id='B'>
|
790
|
+
<span class='zzMoveToFollowing'>
|
791
|
+
<b>1.1  </b>
|
792
|
+
</span>
|
793
|
+
<a id='_'/>
|
794
|
+
<a id='_'/>
|
795
|
+
<a id='_'/>
|
796
|
+
<a id='_'/>
|
797
|
+
</div>
|
798
|
+
</div>
|
799
|
+
<div id='_'>
|
800
|
+
<h1>Index</h1>
|
801
|
+
<ul>
|
802
|
+
<li>
|
803
|
+
<i>Dasein</i>
|
804
|
+
, see
|
805
|
+
<i>Eman</i>
|
806
|
+
cipation, être
|
807
|
+
</li>
|
808
|
+
<li>
|
809
|
+
élongé,
|
810
|
+
<a href='#_'>Clause 1</a>
|
811
|
+
</li>
|
812
|
+
<li>
|
813
|
+
<i>Eman</i>
|
814
|
+
cipation,
|
815
|
+
<a href='#_'>Clause 1</a>
|
816
|
+
,
|
817
|
+
<a href='#_'>1.1</a>
|
818
|
+
<ul>
|
819
|
+
<li>
|
820
|
+
dans la France,
|
821
|
+
<a href='#_'>Clause 1</a>
|
822
|
+
<ul>
|
823
|
+
<li>
|
824
|
+
à Paris,
|
825
|
+
<a href='#_'>1.1</a>
|
826
|
+
</li>
|
827
|
+
<li>
|
828
|
+
en Bretagne,
|
829
|
+
<a href='#_'>Clause 1</a>
|
830
|
+
</li>
|
831
|
+
</ul>
|
832
|
+
</li>
|
833
|
+
<li>
|
834
|
+
dans les États-Unis,
|
835
|
+
<a href='#_'>1.1</a>
|
836
|
+
</li>
|
837
|
+
</ul>
|
838
|
+
</li>
|
839
|
+
<li>
|
840
|
+
être
|
841
|
+
<ul>
|
842
|
+
<li>
|
843
|
+
Husserl, see zebra, see also
|
844
|
+
<i>Eman</i>
|
845
|
+
cipation, zebra
|
846
|
+
<ul>
|
847
|
+
<li>
|
848
|
+
en allemand,
|
849
|
+
<a href='#_'>Clause 1</a>
|
850
|
+
</li>
|
851
|
+
</ul>
|
852
|
+
</li>
|
853
|
+
</ul>
|
854
|
+
</li>
|
855
|
+
<li>
|
856
|
+
zebra,
|
857
|
+
<a href='#_'>1.1</a>
|
858
|
+
</li>
|
859
|
+
</ul>
|
860
|
+
</div>
|
861
|
+
</div>
|
862
|
+
</body>
|
863
|
+
</html>
|
871
864
|
OUTPUT
|
872
|
-
expect(xmlpp(strip_guid(IsoDoc::Iso::PresentationXMLConvert.new({})
|
873
|
-
.
|
865
|
+
expect(xmlpp(strip_guid(IsoDoc::Iso::PresentationXMLConvert.new({})
|
866
|
+
.convert("test", input, true)
|
867
|
+
.gsub(%r{<localized-strings>.*</localized-strings>}m, ""))))
|
868
|
+
.to be_equivalent_to xmlpp(presxml)
|
874
869
|
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({})
|
875
870
|
.convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
876
871
|
end
|