metanorma-iso 1.8.0 → 1.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/lib/asciidoctor/iso/base.rb +14 -11
- data/lib/asciidoctor/iso/biblio.rng +1 -0
- data/lib/asciidoctor/iso/cleanup.rb +40 -24
- data/lib/asciidoctor/iso/front.rb +28 -16
- data/lib/asciidoctor/iso/front_id.rb +66 -50
- data/lib/asciidoctor/iso/isodoc.rng +191 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -0
- data/lib/asciidoctor/iso/section.rb +2 -1
- data/lib/asciidoctor/iso/validate.rb +22 -110
- data/lib/asciidoctor/iso/validate_image.rb +97 -0
- data/lib/asciidoctor/iso/validate_requirements.rb +26 -20
- data/lib/asciidoctor/iso/validate_section.rb +55 -29
- data/lib/asciidoctor/iso/validate_style.rb +36 -24
- data/lib/asciidoctor/iso/validate_title.rb +2 -4
- data/lib/isodoc/iso/base_convert.rb +20 -14
- 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 +666 -193
- data/lib/isodoc/iso/iso.international-standard.xsl +666 -193
- data/lib/isodoc/iso/metadata.rb +3 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +15 -14
- data/lib/isodoc/iso/sts_convert.rb +10 -13
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/isodoc/iso/xref.rb +44 -29
- data/lib/metanorma/iso/processor.rb +1 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -3
- data/spec/asciidoctor/base_spec.rb +426 -305
- data/spec/asciidoctor/blocks_spec.rb +96 -34
- data/spec/asciidoctor/cleanup_spec.rb +383 -25
- data/spec/asciidoctor/section_spec.rb +0 -14
- data/spec/asciidoctor/validate_spec.rb +218 -83
- 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 +492 -442
- 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
- data/spec/spec_helper.rb +16 -15
- metadata +8 -7
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
|