metanorma-iec 2.1.11 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/iec/html/htmlstyle.css +6 -0
  3. data/lib/isodoc/iec/iec.international-standard.xsl +460 -152
  4. data/lib/isodoc/iec/presentation_xml_convert.rb +8 -6
  5. data/lib/isodoc/iec/word_convert.rb +9 -35
  6. data/lib/metanorma/iec/biblio.rng +5 -0
  7. data/lib/metanorma/iec/iec_intro_en.xml +11 -12
  8. data/lib/metanorma/iec/iec_intro_fr.xml +11 -11
  9. data/lib/metanorma/iec/isodoc.rng +47 -13
  10. data/lib/metanorma/iec/version.rb +1 -1
  11. data/metanorma-iec.gemspec +5 -2
  12. metadata +4 -36
  13. data/.github/workflows/automerge.yml +0 -31
  14. data/.github/workflows/rake.yml +0 -15
  15. data/.github/workflows/release.yml +0 -24
  16. data/Rakefile +0 -8
  17. data/bin/rspec +0 -18
  18. data/spec/assets/header.html +0 -7
  19. data/spec/assets/html.css +0 -2
  20. data/spec/assets/iso.xml +0 -71
  21. data/spec/assets/rice_image1.png +0 -0
  22. data/spec/assets/word.css +0 -2
  23. data/spec/assets/wordintro.html +0 -4
  24. data/spec/assets/xref_error.adoc +0 -7
  25. data/spec/isodoc/blocks_spec.rb +0 -200
  26. data/spec/isodoc/i18n_spec.rb +0 -607
  27. data/spec/isodoc/iev_spec.rb +0 -888
  28. data/spec/isodoc/inline_spec.rb +0 -256
  29. data/spec/isodoc/iso_spec.rb +0 -211
  30. data/spec/isodoc/metadata_spec.rb +0 -251
  31. data/spec/isodoc/postproc_spec.rb +0 -303
  32. data/spec/isodoc/ref_spec.rb +0 -335
  33. data/spec/isodoc/section_spec.rb +0 -566
  34. data/spec/isodoc/terms_spec.rb +0 -192
  35. data/spec/metanorma/base_spec.rb +0 -1041
  36. data/spec/metanorma/blocks_spec.rb +0 -470
  37. data/spec/metanorma/cleanup_spec.rb +0 -372
  38. data/spec/metanorma/iev_spec.rb +0 -254
  39. data/spec/metanorma/inline_spec.rb +0 -145
  40. data/spec/metanorma/lists_spec.rb +0 -194
  41. data/spec/metanorma/processor_spec.rb +0 -171
  42. data/spec/metanorma/section_spec.rb +0 -348
  43. data/spec/metanorma/validate_spec.rb +0 -56
  44. data/spec/spec_helper.rb +0 -305
@@ -1,607 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe IsoDoc do
4
- it "processes English" do
5
- input = <<~INPUT
6
- <iso-standard xmlns="http://riboseinc.com/isoxml">
7
- <bibdata>
8
- <docnumber>1</docnumber>
9
- <language>en</language>
10
- <ext>
11
- <doctype>international-standard</doctype>
12
- <horizontal>true</horizontal>
13
- <function>emc</function>
14
- </ext>
15
- </bibdata>
16
- <preface>
17
- <foreword obligation="informative">
18
- <title>Foreword</title>
19
- <p id="A">This is a preamble</p>
20
- </foreword>
21
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
22
- <title>Introduction Subsection</title>
23
- </clause>
24
- <p>This is patent boilerplate</p>
25
- </introduction></preface><sections>
26
- <clause id="D" obligation="normative" type="scope">
27
- <title>Scope</title>
28
- <p id="E">Text</p>
29
- </clause>
30
-
31
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
32
- <title>Normal Terms</title>
33
- <term id="J">
34
- <preferred>Term2</preferred>
35
- </term>
36
- </terms>
37
- <definitions id="K">
38
- <dl>
39
- <dt>Symbol</dt>
40
- <dd>Definition</dd>
41
- </dl>
42
- </definitions>
43
- </clause>
44
- <definitions id="L">
45
- <dl>
46
- <dt>Symbol</dt>
47
- <dd>Definition</dd>
48
- </dl>
49
- </definitions>
50
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
51
- <title>Introduction</title>
52
- </clause>
53
- <clause id="O" inline-header="false" obligation="normative">
54
- <title>Clause 4.2</title>
55
- </clause></clause>
56
-
57
- </sections><annex id="P" inline-header="false" obligation="normative">
58
- <title>Annex</title>
59
- <clause id="Q" inline-header="false" obligation="normative">
60
- <title>Annex A.1</title>
61
- <clause id="Q1" inline-header="false" obligation="normative">
62
- <title>Annex A.1a</title>
63
- </clause>
64
- </clause>
65
- <appendix id="Q2" inline-header="false" obligation="normative">
66
- <title>An Appendix</title>
67
- </appendix>
68
- </annex><bibliography><references id="R" obligation="informative" normative="true">
69
- <title>Normative References</title>
70
- </references><clause id="S" obligation="informative">
71
- <title>Bibliography</title>
72
- <references id="T" obligation="informative" normative="false">
73
- <title>Bibliography Subsection</title>
74
- </references>
75
- </clause>
76
- </bibliography>
77
- </iso-standard>
78
- INPUT
79
-
80
- presxml = <<~OUTPUT
81
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
82
- <bibdata>
83
- <docnumber>1</docnumber>
84
- <language current="true">en</language>
85
- <ext>
86
- <doctype language="">international-standard</doctype><doctype language="fr">Norme internationale</doctype><doctype language="en">International Standard</doctype>
87
- <horizontal language=''>true</horizontal><horizontal language="fr">Norme horizontale</horizontal><horizontal language="en">Horizontal Standard</horizontal>
88
- <function language="">emc</function><function language="fr">Publication fondamentale en CEM</function><function language="en">Basic EMC Publication</function>
89
- </ext>
90
- </bibdata>
91
- <preface>
92
- <foreword obligation="informative" displayorder="1">
93
- <title>Foreword</title>
94
- <p id="A">This is a preamble</p>
95
- </foreword>
96
- <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
97
- <title depth="2">0.1<tab/>Introduction Subsection</title>
98
- </clause>
99
- <p>This is patent boilerplate</p>
100
- </introduction></preface><sections>
101
- <clause id="D" obligation="normative" type="scope" displayorder="3">
102
- <title depth="1">1<tab/>Scope</title>
103
- <p id="E">Text</p>
104
- </clause>
105
- <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
106
- <title depth="2">3.1<tab/>Normal Terms</title>
107
- <term id="J"><name>3.1.1</name>
108
- <preferred>Term2</preferred>
109
- </term>
110
- </terms>
111
- <definitions id="K"><title>3.2</title>
112
- <dl>
113
- <dt>Symbol</dt>
114
- <dd>Definition</dd>
115
- </dl>
116
- </definitions>
117
- </clause>
118
- <definitions id="L" displayorder="6"><title>4</title>
119
- <dl>
120
- <dt>Symbol</dt>
121
- <dd>Definition</dd>
122
- </dl>
123
- </definitions>
124
- <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
125
- <title depth="2">5.1<tab/>Introduction</title>
126
- </clause>
127
- <clause id="O" inline-header="false" obligation="normative">
128
- <title depth="2">5.2<tab/>Clause 4.2</title>
129
- </clause></clause>
130
- </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
131
- <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
132
- <clause id="Q" inline-header="false" obligation="normative">
133
- <title depth="2">A.1<tab/>Annex A.1</title>
134
- <clause id="Q1" inline-header="false" obligation="normative">
135
- <title depth="3">A.1.1<tab/>Annex A.1a</title>
136
- </clause>
137
- </clause>
138
- <appendix id="Q2" inline-header="false" obligation="normative">
139
- <title depth="2">Appendix 1<tab/>An Appendix</title>
140
- </appendix>
141
- </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
142
- <title depth="1">2<tab/>Normative References</title>
143
- </references><clause id="S" obligation="informative" displayorder="9">
144
- <title depth="1">Bibliography</title>
145
- <references id="T" obligation="informative" normative="false">
146
- <title depth="2">Bibliography Subsection</title>
147
- </references>
148
- </clause>
149
- </bibliography>
150
- </iso-standard>
151
- OUTPUT
152
-
153
- html = <<~OUTPUT
154
- #{HTML_HDR}
155
- <div>
156
- <h1 class="ForewordTitle">FOREWORD</h1>
157
- <div class="boilerplate_legal"/>
158
- <p id="A">This is a preamble</p>
159
- </div>
160
- <br/>
161
- <div class="Section3" id="B">
162
- <h1 class="IntroTitle">0&#160; Introduction</h1>
163
- <div id="C"><h2>0.1&#160; Introduction Subsection</h2>
164
-
165
- </div>
166
- <p>This is patent boilerplate</p>
167
- </div>
168
- #{IEC_TITLE1}
169
- <div id="D">
170
- <h1>1&#160; Scope</h1>
171
- <p id="E">Text</p>
172
- </div>
173
- <div>
174
- <h1>2&#160; Normative References</h1>
175
- </div>
176
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
177
- <div id="I"><h2>3.1&#160; Normal Terms</h2>
178
-
179
- <p class="TermNum" id="J">3.1.1</p>
180
- <p class="Terms" style="text-align:left;">Term2</p>
181
-
182
- </div><div id="K"><h2>3.2</h2>
183
- <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
184
- </div></div>
185
- <div id="L" class="Symbols">
186
- <h1>4</h1>
187
- <dl>
188
- <dt>
189
- <p>Symbol</p>
190
- </dt>
191
- <dd>Definition</dd>
192
- </dl>
193
- </div>
194
- <div id="M">
195
- <h1>5&#160; Clause 4</h1>
196
- <div id="N"><h2>5.1&#160; Introduction</h2>
197
-
198
- </div>
199
- <div id="O"><h2>5.2&#160; Clause 4.2</h2>
200
-
201
- </div>
202
- </div>
203
- <br/>
204
- <div id="P" class="Section3">
205
- <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
206
- <div id="Q"><h2>A.1&#160; Annex A.1</h2>
207
-
208
- <div id="Q1"><h3>A.1.1&#160; Annex A.1a</h3>
209
-
210
- </div>
211
- </div>
212
- <div id="Q2"><h2>Appendix 1&#160; An Appendix</h2>
213
-
214
- </div>
215
- </div>
216
- <br/>
217
- <div>
218
- <h1 class="Section3">Bibliography</h1>
219
- <div>
220
- <h2 class="Section3">Bibliography Subsection</h2>
221
- </div>
222
- </div>
223
- </div>
224
- </body>
225
- </html>
226
- OUTPUT
227
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
228
- .convert("test", input, true)
229
- .sub(%r{<localized-strings>.*</localized-strings>}m, "")))
230
- .to be_equivalent_to xmlpp(presxml)
231
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
232
- .convert("test", presxml, true)))
233
- .to be_equivalent_to xmlpp(html)
234
- end
235
-
236
- it "defaults to English" do
237
- input = <<~INPUT
238
- <iso-standard xmlns="http://riboseinc.com/isoxml">
239
- <bibdata>
240
- <language>tlh</language>
241
- </bibdata>
242
- <preface>
243
- <foreword obligation="informative">
244
- <title>Foreword</title>
245
- <p id="A">This is a preamble</p>
246
- </foreword>
247
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
248
- <title>Introduction Subsection</title>
249
- </clause>
250
- <p>This is patent boilerplate</p>
251
- </introduction></preface><sections>
252
- <clause id="D" obligation="normative" type="scope">
253
- <title>Scope</title>
254
- <p id="E">Text</p>
255
- </clause>
256
-
257
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
258
- <title>Normal Terms</title>
259
- <term id="J">
260
- <preferred>Term2</preferred>
261
- </term>
262
- </terms>
263
- <definitions id="K">
264
- <dl>
265
- <dt>Symbol</dt>
266
- <dd>Definition</dd>
267
- </dl>
268
- </definitions>
269
- </clause>
270
- <definitions id="L">
271
- <dl>
272
- <dt>Symbol</dt>
273
- <dd>Definition</dd>
274
- </dl>
275
- </definitions>
276
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
277
- <title>Introduction</title>
278
- </clause>
279
- <clause id="O" inline-header="false" obligation="normative">
280
- <title>Clause 4.2</title>
281
- </clause></clause>
282
-
283
- </sections><annex id="P" inline-header="false" obligation="normative">
284
- <title>Annex</title>
285
- <clause id="Q" inline-header="false" obligation="normative">
286
- <title>Annex A.1</title>
287
- <clause id="Q1" inline-header="false" obligation="normative">
288
- <title>Annex A.1a</title>
289
- </clause>
290
- </clause>
291
- <appendix id="Q2" inline-header="false" obligation="normative">
292
- <title>An Appendix</title>
293
- </appendix>
294
- </annex><bibliography><references id="R" obligation="informative" normative="true">
295
- <title>Normative References</title>
296
- </references><clause id="S" obligation="informative">
297
- <title>Bibliography</title>
298
- <references id="T" obligation="informative" normative="false">
299
- <title>Bibliography Subsection</title>
300
- </references>
301
- </clause>
302
- </bibliography>
303
- </iso-standard>
304
- INPUT
305
- output = <<~OUTPUT
306
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
307
- <bibdata>
308
- <language current="true">tlh</language>
309
- </bibdata>
310
- <preface>
311
- <foreword obligation="informative" displayorder="1">
312
- <title>Foreword</title>
313
- <p id="A">This is a preamble</p>
314
- </foreword>
315
- <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
316
- <title depth="2">0.1<tab/>Introduction Subsection</title>
317
- </clause>
318
- <p>This is patent boilerplate</p>
319
- </introduction></preface><sections>
320
- <clause id="D" obligation="normative" type="scope" displayorder="3">
321
- <title depth="1">1<tab/>Scope</title>
322
- <p id="E">Text</p>
323
- </clause>
324
- <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
325
- <title depth="2">3.1<tab/>Normal Terms</title>
326
- <term id="J"><name>3.1.1</name>
327
- <preferred>Term2</preferred>
328
- </term>
329
- </terms>
330
- <definitions id="K"><title>3.2</title>
331
- <dl>
332
- <dt>Symbol</dt>
333
- <dd>Definition</dd>
334
- </dl>
335
- </definitions>
336
- </clause>
337
- <definitions id="L" displayorder="6"><title>4</title>
338
- <dl>
339
- <dt>Symbol</dt>
340
- <dd>Definition</dd>
341
- </dl>
342
- </definitions>
343
- <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
344
- <title depth="2">5.1<tab/>Introduction</title>
345
- </clause>
346
- <clause id="O" inline-header="false" obligation="normative">
347
- <title depth="2">5.2<tab/>Clause 4.2</title>
348
- </clause></clause>
349
- </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
350
- <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
351
- <clause id="Q" inline-header="false" obligation="normative">
352
- <title depth="2">A.1<tab/>Annex A.1</title>
353
- <clause id="Q1" inline-header="false" obligation="normative">
354
- <title depth="3">A.1.1<tab/>Annex A.1a</title>
355
- </clause>
356
- </clause>
357
- <appendix id="Q2" inline-header="false" obligation="normative">
358
- <title depth="2">Appendix 1<tab/>An Appendix</title>
359
- </appendix>
360
- </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
361
- <title depth="1">2<tab/>Normative References</title>
362
- </references><clause id="S" obligation="informative" displayorder="9">
363
- <title depth="1">Bibliography</title>
364
- <references id="T" obligation="informative" normative="false">
365
- <title depth="2">Bibliography Subsection</title>
366
- </references>
367
- </clause>
368
- </bibliography>
369
- </iso-standard>
370
- OUTPUT
371
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
372
- .convert("test", input, true)
373
- .sub(%r{<localized-strings>.*</localized-strings>}m, "")))
374
- .to be_equivalent_to xmlpp(output)
375
- end
376
-
377
- it "processes French" do
378
- input = <<~INPUT
379
- <iso-standard xmlns="http://riboseinc.com/isoxml">
380
- <bibdata>
381
- <language>fr</language>
382
- <ext>
383
- <doctype>international-standard</doctype>
384
- <horizontal>false</horizontal>
385
- <function>emc</function>
386
- </ext>
387
- </bibdata>
388
- <preface>
389
- <foreword obligation="informative">
390
- <title>Foreword</title>
391
- <p id="A">This is a preamble</p>
392
- </foreword>
393
- <introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
394
- <title>Introduction Subsection</title>
395
- </clause>
396
- <p>This is patent boilerplate</p>
397
- </introduction></preface><sections>
398
- <clause id="D" obligation="normative" type="scope">
399
- <title>Scope</title>
400
- <p id="E">Text</p>
401
- </clause>
402
-
403
- <clause id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
404
- <title>Normal Terms</title>
405
- <term id="J">
406
- <preferred>Term2</preferred>
407
- </term>
408
- </terms>
409
- <definitions id="K">
410
- <dl>
411
- <dt>Symbol</dt>
412
- <dd>Definition</dd>
413
- </dl>
414
- </definitions>
415
- </clause>
416
- <definitions id="L">
417
- <dl>
418
- <dt>Symbol</dt>
419
- <dd>Definition</dd>
420
- </dl>
421
- </definitions>
422
- <clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
423
- <title>Introduction</title>
424
- </clause>
425
- <clause id="O" inline-header="false" obligation="normative">
426
- <title>Clause 4.2</title>
427
- </clause></clause>
428
-
429
- </sections><annex id="P" inline-header="false" obligation="normative">
430
- <title>Annex</title>
431
- <clause id="Q" inline-header="false" obligation="normative">
432
- <title>Annex A.1</title>
433
- <clause id="Q1" inline-header="false" obligation="normative">
434
- <title>Annex A.1a</title>
435
- </clause>
436
- </clause>
437
- <appendix id="Q2" inline-header="false" obligation="normative">
438
- <title>An Appendix</title>
439
- </appendix>
440
- </annex><bibliography><references id="R" obligation="informative" normative="true">
441
- <title>Normative References</title>
442
- </references><clause id="S" obligation="informative">
443
- <title>Bibliography</title>
444
- <references id="T" obligation="informative" normative="false">
445
- <title>Bibliography Subsection</title>
446
- </references>
447
- </clause>
448
- </bibliography>
449
- </iso-standard>
450
- INPUT
451
-
452
- presxml = <<~OUTPUT
453
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
454
- <bibdata>
455
- <language current="true">fr</language>
456
- <ext>
457
- <doctype language="">international-standard</doctype><doctype language="fr">Norme internationale</doctype><doctype language="en">International Standard</doctype>
458
- <horizontal>false</horizontal>
459
- <function language="">emc</function><function language="fr">Publication fondamentale en CEM</function><function language="en">Basic EMC Publication</function>
460
- </ext>
461
- </bibdata>
462
- <preface>
463
- <foreword obligation="informative" displayorder="1">
464
- <title>Foreword</title>
465
- <p id="A">This is a preamble</p>
466
- </foreword>
467
- <introduction id="B" obligation="informative" displayorder="2"><title depth="1">0<tab/>Introduction</title><clause id="C" inline-header="false" obligation="informative">
468
- <title depth="2">0.1<tab/>Introduction Subsection</title>
469
- </clause>
470
- <p>This is patent boilerplate</p>
471
- </introduction></preface><sections>
472
- <clause id="D" obligation="normative" type="scope" displayorder="3">
473
- <title depth="1">1<tab/>Scope</title>
474
- <p id="E">Text</p>
475
- </clause>
476
- <clause id="H" obligation="normative" displayorder="5"><title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
477
- <title depth="2">3.1<tab/>Normal Terms</title>
478
- <term id="J"><name>3.1.1</name>
479
- <preferred>Term2</preferred>
480
- </term>
481
- </terms>
482
- <definitions id="K"><title>3.2</title>
483
- <dl>
484
- <dt>Symbol</dt>
485
- <dd>Definition</dd>
486
- </dl>
487
- </definitions>
488
- </clause>
489
- <definitions id="L" displayorder="6"><title>4</title>
490
- <dl>
491
- <dt>Symbol</dt>
492
- <dd>Definition</dd>
493
- </dl>
494
- </definitions>
495
- <clause id="M" inline-header="false" obligation="normative" displayorder="7"><title depth="1">5<tab/>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
496
- <title depth="2">5.1<tab/>Introduction</title>
497
- </clause>
498
- <clause id="O" inline-header="false" obligation="normative">
499
- <title depth="2">5.2<tab/>Clause 4.2</title>
500
- </clause></clause>
501
- </sections><annex id="P" inline-header="false" obligation="normative" displayorder="8">
502
- <title><strong>Annexe A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
503
- <clause id="Q" inline-header="false" obligation="normative">
504
- <title depth="2">A.1<tab/>Annex A.1</title>
505
- <clause id="Q1" inline-header="false" obligation="normative">
506
- <title depth="3">A.1.1<tab/>Annex A.1a</title>
507
- </clause>
508
- </clause>
509
- <appendix id="Q2" inline-header="false" obligation="normative">
510
- <title depth="2">Appendice 1<tab/>An Appendix</title>
511
- </appendix>
512
- </annex><bibliography><references id="R" obligation="informative" normative="true" displayorder="4">
513
- <title depth="1">2<tab/>Normative References</title>
514
- </references><clause id="S" obligation="informative" displayorder="9">
515
- <title depth="1">Bibliography</title>
516
- <references id="T" obligation="informative" normative="false">
517
- <title depth="2">Bibliography Subsection</title>
518
- </references>
519
- </clause>
520
- </bibliography>
521
- </iso-standard>
522
- OUTPUT
523
-
524
- html = <<~OUTPUT
525
- #{HTML_HDR.sub(/INTERNATIONAL ELECTROTECHNICAL COMMISSION/, 'COMMISSION ELECTROTECHNIQUE INTERNATIONALE')
526
- .gsub(/"en"/, '"fr"')}
527
- <div>
528
- <h1 class="ForewordTitle">AVANT-PROPOS</h1>
529
- <div class="boilerplate_legal"/>
530
- <p id="A">This is a preamble</p>
531
- </div>
532
- <br/>
533
- <div class="Section3" id="B">
534
- <h1 class="IntroTitle">0&#160; Introduction</h1>
535
- <div id="C"><h2>0.1&#160; Introduction Subsection</h2>
536
-
537
- </div>
538
- <p>This is patent boilerplate</p>
539
- </div>
540
- #{IEC_TITLE1}
541
- <div id="D">
542
- <h1>1&#160; Scope</h1>
543
- <p id="E">Text</p>
544
- </div>
545
- <div>
546
- <h1>2&#160; Normative References</h1>
547
- </div>
548
- <div id="H"><h1>3&#160; Terms, definitions, symbols and abbreviated terms</h1>
549
- <div id="I"><h2>3.1&#160; Normal Terms</h2>
550
-
551
- <p class="TermNum" id="J">3.1.1</p>
552
- <p class="Terms" style="text-align:left;">Term2</p>
553
-
554
- </div><div id="K"><h2>3.2</h2>
555
- <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
556
- </div></div>
557
- <div id="L" class="Symbols">
558
- <h1>4</h1>
559
- <dl>
560
- <dt>
561
- <p>Symbol</p>
562
- </dt>
563
- <dd>Definition</dd>
564
- </dl>
565
- </div>
566
- <div id="M">
567
- <h1>5&#160; Clause 4</h1>
568
- <div id="N"><h2>5.1&#160; Introduction</h2>
569
-
570
- </div>
571
- <div id="O"><h2>5.2&#160; Clause 4.2</h2>
572
-
573
- </div>
574
- </div>
575
- <br/>
576
- <div id="P" class="Section3">
577
- <h1 class="Annex"><b>Annexe A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
578
- <div id="Q"><h2>A.1&#160; Annex A.1</h2>
579
-
580
- <div id="Q1"><h3>A.1.1&#160; Annex A.1a</h3>
581
-
582
- </div>
583
- </div>
584
- <div id="Q2"><h2>Appendice 1&#160; An Appendix</h2>
585
-
586
- </div>
587
- </div>
588
- <br/>
589
- <div>
590
- <h1 class="Section3">Bibliography</h1>
591
- <div>
592
- <h2 class="Section3">Bibliography Subsection</h2>
593
- </div>
594
- </div>
595
- </div>
596
- </body>
597
- </html>
598
- OUTPUT
599
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
600
- .convert("test", input, true)
601
- .sub(%r{<localized-strings>.*</localized-strings>}m, "")))
602
- .to be_equivalent_to xmlpp(presxml)
603
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
604
- .convert("test", presxml, true)))
605
- .to be_equivalent_to xmlpp(html)
606
- end
607
- end