metanorma-iso 2.0.8 → 2.1.1

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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +37 -0
  3. data/lib/isodoc/iso/base_convert.rb +1 -1
  4. data/lib/isodoc/iso/html/html_iso_titlepage.html +5 -0
  5. data/lib/isodoc/iso/html/isodoc-dis.css +304 -242
  6. data/lib/isodoc/iso/html/isodoc-dis.scss +379 -260
  7. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  8. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +4 -3
  9. data/lib/isodoc/iso/html/word_iso_titlepage.html +10 -4
  10. data/lib/isodoc/iso/html/wordstyle-dis.css +168 -48
  11. data/lib/isodoc/iso/html/wordstyle-dis.scss +158 -43
  12. data/lib/isodoc/iso/html_convert.rb +2 -2
  13. data/lib/isodoc/iso/i18n-en.yaml +1 -0
  14. data/lib/isodoc/iso/i18n-fr.yaml +1 -0
  15. data/lib/isodoc/iso/i18n-ru.yaml +1 -0
  16. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  17. data/lib/isodoc/iso/init.rb +17 -1
  18. data/lib/isodoc/iso/iso.amendment.xsl +1697 -426
  19. data/lib/isodoc/iso/iso.international-standard.xsl +1697 -426
  20. data/lib/isodoc/iso/metadata.rb +13 -19
  21. data/lib/isodoc/iso/presentation_inline.rb +90 -0
  22. data/lib/isodoc/iso/presentation_xml_convert.rb +41 -100
  23. data/lib/isodoc/iso/presentation_xref.rb +126 -0
  24. data/lib/isodoc/iso/sections.rb +2 -2
  25. data/lib/isodoc/iso/word_cleanup.rb +16 -2
  26. data/lib/isodoc/iso/word_convert.rb +29 -12
  27. data/lib/isodoc/iso/word_dis_convert.rb +183 -0
  28. data/lib/isodoc/iso/xref.rb +46 -25
  29. data/lib/metanorma/iso/biblio.rng +37 -8
  30. data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
  31. data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
  32. data/lib/metanorma/iso/boilerplate.xml +1 -3
  33. data/lib/metanorma/iso/cleanup.rb +2 -1
  34. data/lib/metanorma/iso/isodoc.rng +56 -0
  35. data/lib/metanorma/iso/version.rb +1 -1
  36. data/lib/metanorma-iso.rb +1 -0
  37. data/lib/relaton/render/config.yml +4 -0
  38. data/lib/relaton/render/general.rb +13 -0
  39. data/metanorma-iso.gemspec +1 -1
  40. data/spec/isodoc/amd_spec.rb +31 -30
  41. data/spec/isodoc/blocks_spec.rb +286 -179
  42. data/spec/isodoc/i18n_spec.rb +187 -21
  43. data/spec/isodoc/inline_spec.rb +35 -42
  44. data/spec/isodoc/iso_spec.rb +1 -1
  45. data/spec/isodoc/metadata_spec.rb +17 -17
  46. data/spec/isodoc/postproc_spec.rb +28 -3
  47. data/spec/isodoc/ref_spec.rb +66 -69
  48. data/spec/isodoc/section_spec.rb +78 -76
  49. data/spec/isodoc/table_spec.rb +2 -2
  50. data/spec/isodoc/terms_spec.rb +2 -2
  51. data/spec/isodoc/word_dis_spec.rb +760 -0
  52. data/spec/isodoc/xref_spec.rb +51 -51
  53. data/spec/metanorma/base_spec.rb +10 -10
  54. data/spec/spec_helper.rb +11 -1
  55. data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
  56. metadata +11 -5
  57. data/spec/vcr_cassettes/docrels.yml +0 -385
@@ -374,12 +374,14 @@ RSpec.describe IsoDoc do
374
374
  </clause>
375
375
  </clause>
376
376
  </sections>
377
+ <annex id="AA"><title>Annex A<tab/>Annex First</title></annex>
377
378
  </iso-standard>
378
379
  INPUT
379
380
 
380
381
  word = File.read("test.doc", encoding: "UTF-8")
381
382
  .sub(/^.*An empty word intro page\./m, "")
382
383
  .sub(%r{</div>.*$}m, "</div>")
384
+ .gsub(/<o:p>&#xA0;<\/o:p>/, "")
383
385
 
384
386
  expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
385
387
  .to be_equivalent_to xmlpp(<<~'OUTPUT')
@@ -456,12 +458,35 @@ RSpec.describe IsoDoc do
456
458
  </span>
457
459
  </span>
458
460
  </p>
461
+ <p class='MsoToc1'>
462
+ <span class='MsoHyperlink'>
463
+ <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
464
+ <a href='#_Toc'>
465
+ Annex A Annex First
466
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
467
+ <span style='mso-tab-count:1 dotted'>. </span>
468
+ </span>
469
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
470
+ <span style='mso-element:field-begin'/>
471
+ </span>
472
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
473
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
474
+ <span style='mso-element:field-separator'/>
475
+ </span>
476
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
477
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
478
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
479
+ <span style='mso-element:field-end'/>
480
+ </span>
481
+ </a>
482
+ </span>
483
+ </span>
484
+ </p>
459
485
  <p class="MsoToc1">
460
486
  <span lang="EN-GB" xml:lang="EN-GB">
461
487
  <span style="mso-element:field-end"/>
462
488
  </span>
463
489
  <span lang="EN-GB" xml:lang="EN-GB">
464
- <p class="MsoNormal"> </p>
465
490
  </span>
466
491
  </p>
467
492
  <p class="MsoNormal"> </p>
@@ -1005,7 +1030,8 @@ RSpec.describe IsoDoc do
1005
1030
  '<div class="WordSection2">')
1006
1031
  .sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
1007
1032
 
1008
- expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
1033
+ expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")
1034
+ .gsub(/<o:p>&#xA0;<\/o:p>/, "")))
1009
1035
  .to be_equivalent_to xmlpp(<<~'OUTPUT')
1010
1036
  <div class="WordSection2">An empty word intro page.
1011
1037
  <p class="MsoToc1">
@@ -1085,7 +1111,6 @@ RSpec.describe IsoDoc do
1085
1111
  <span style="mso-element:field-end"/>
1086
1112
  </span>
1087
1113
  <span lang="EN-GB" xml:lang="EN-GB">
1088
- <p class="MsoNormal"> </p>
1089
1114
  </span>
1090
1115
  </p>
1091
1116
  <p class="MsoNormal"> </p>
@@ -84,7 +84,7 @@ RSpec.describe IsoDoc do
84
84
  </references>
85
85
  <references id="_bibliography" normative="false" obligation="informative">
86
86
  <title>Bibliography</title>
87
- <bibitem id="ISBN" type="ISBN">
87
+ <bibitem id="ISBN" type="book">
88
88
  <title format="text/plain">Chemicals for analytical laboratory use</title>
89
89
  <docidentifier type="ISBN">ISBN</docidentifier>
90
90
  <docidentifier type="metanorma">[1]</docidentifier>
@@ -95,7 +95,7 @@ RSpec.describe IsoDoc do
95
95
  </organization>
96
96
  </contributor>
97
97
  </bibitem>
98
- <bibitem id="ISSN" type="ISSN">
98
+ <bibitem id="ISSN" type="journal">
99
99
  <title format="text/plain">Instruments for analytical laboratory use</title>
100
100
  <docidentifier type="ISSN">ISSN</docidentifier>
101
101
  <docidentifier type="metanorma">[2]</docidentifier>
@@ -177,49 +177,17 @@ RSpec.describe IsoDoc do
177
177
  amendments) applies.
178
178
  </p>
179
179
  <bibitem id="ISO712" type="standard">
180
- <title format="text/plain">Cereals or cereal products</title>
181
- <title format="text/plain" type="main">Cereals and cereal products</title>
180
+ <formattedref><em><span class="stddocTitle">Cereals and cereal products</span></em></formattedref>
182
181
  <docidentifier type="ISO">ISO 712</docidentifier>
183
- <contributor>
184
- <role type="publisher"/>
185
- <organization>
186
- <name>International Organization for Standardization</name>
187
- </organization>
188
- </contributor>
189
182
  </bibitem>
190
183
  <bibitem id="ISO16634" type="standard">
191
- <title format="text/plain" language="x">Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
192
- feeding stuffs
193
- </title>
194
- <title format="text/plain" language="en">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
184
+ <formattedref><em><span class="stddocTitle">Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</span></em></formattedref>
195
185
  <docidentifier type="ISO">ISO 16634:-- (all parts)</docidentifier>
196
- <date type="published">
197
- <on>--</on>
198
- </date>
199
- <contributor>
200
- <role type="publisher"/>
201
- <organization>
202
- <abbreviation>ISO</abbreviation>
203
- </organization>
204
- </contributor>
205
186
  <note format="text/plain" reference="1" type="Unpublished-Status">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
206
- <extent type="part">
207
- <referenceFrom>all</referenceFrom>
208
- </extent>
209
187
  </bibitem>
210
188
  <bibitem id="ISO20483" type="standard">
211
- <title format="text/plain">Cereals and pulses</title>
189
+ <formattedref><em><span class="stddocTitle">Cereals and pulses</span></em></formattedref>
212
190
  <docidentifier type="ISO">ISO 20483:2013-2014</docidentifier>
213
- <date type="published">
214
- <from>2013</from>
215
- <to>2014</to>
216
- </date>
217
- <contributor>
218
- <role type="publisher"/>
219
- <organization>
220
- <name>International Organization for Standardization</name>
221
- </organization>
222
- </contributor>
223
191
  </bibitem>
224
192
  <bibitem id="ref1">
225
193
  <formattedref format="application/x-isodoc+xml">
@@ -229,8 +197,8 @@ RSpec.describe IsoDoc do
229
197
  for food and animal feeding stuffs according to the Dumas combustion
230
198
  method</em> (see
231
199
 
232
- <link target="http://www.icc.or.at"/>
233
- )</formattedref>
200
+ <link target="http://www.icc.or.at"/> )
201
+ </formattedref>
234
202
  <docidentifier type="ICC">ICC 167</docidentifier>
235
203
  </bibitem>
236
204
  <note>
@@ -240,27 +208,15 @@ RSpec.describe IsoDoc do
240
208
  </references>
241
209
  <references id="_bibliography" normative="false" obligation="informative" displayorder="3">
242
210
  <title depth="1">Bibliography</title>
243
- <bibitem id="ISBN" type="ISBN">
244
- <title format="text/plain">Chemicals for analytical laboratory use</title>
211
+ <bibitem id="ISBN" type="book">
212
+ <formattedref><em>Chemicals for analytical laboratory use</em>. ISBN.</formattedref>
245
213
  <docidentifier type="ISBN">ISBN</docidentifier>
246
214
  <docidentifier type="metanorma">[1]</docidentifier>
247
- <contributor>
248
- <role type="publisher"/>
249
- <organization>
250
- <abbreviation>ISBN</abbreviation>
251
- </organization>
252
- </contributor>
253
215
  </bibitem>
254
- <bibitem id="ISSN" type="ISSN">
255
- <title format="text/plain">Instruments for analytical laboratory use</title>
216
+ <bibitem id="ISSN" type="journal">
217
+ <formattedref><em>Instruments for analytical laboratory use</em>. ISSN.</formattedref>
256
218
  <docidentifier type="ISSN">ISSN</docidentifier>
257
219
  <docidentifier type="metanorma">[2]</docidentifier>
258
- <contributor>
259
- <role type="publisher"/>
260
- <organization>
261
- <abbreviation>ISSN</abbreviation>
262
- </organization>
263
- </contributor>
264
220
  </bibitem>
265
221
  <note>
266
222
  <name>NOTE</name>
@@ -271,15 +227,9 @@ RSpec.describe IsoDoc do
271
227
  <p>This is another annotation of document ISSN.</p>
272
228
  </note>
273
229
  <bibitem id="ISO3696" type="standard">
274
- <title format="text/plain">Water for analytical laboratory use</title>
230
+ <formattedref><em><span class='stddocTitle'>Water for analytical laboratory use</span></em></formattedref>
275
231
  <docidentifier type='metanorma-ordinal'>[3]</docidentifier>
276
232
  <docidentifier type="ISO">ISO 3696</docidentifier>
277
- <contributor>
278
- <role type="publisher"/>
279
- <organization>
280
- <abbreviation>ISO</abbreviation>
281
- </organization>
282
- </contributor>
283
233
  </bibitem>
284
234
  <bibitem id="ref10">
285
235
  <formattedref format="application/x-isodoc+xml">
@@ -294,15 +244,13 @@ RSpec.describe IsoDoc do
294
244
  <docidentifier type="metanorma">[10]</docidentifier>
295
245
  </bibitem>
296
246
  <bibitem id="ref11">
297
- <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
247
+ <formattedref><em>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</em>.</formattedref>
298
248
  <docidentifier type='metanorma-ordinal'>[4]</docidentifier>
299
249
  <docidentifier type="IETF">IETF RFC 10</docidentifier>
300
250
  </bibitem>
301
251
  <bibitem id="ref12">
302
252
  <formattedref format="application/x-isodoc+xml">CitationWorks. 2019.
303
-
304
- <em>How to cite a reference</em>
305
- .</formattedref>
253
+ <em>How to cite a reference</em>.</formattedref>
306
254
  <docidentifier type="metanorma">[Citn]</docidentifier>
307
255
  <docidentifier type="IETF">IETF RFC 20</docidentifier>
308
256
  </bibitem>
@@ -353,8 +301,8 @@ RSpec.describe IsoDoc do
353
301
  <br/>
354
302
  <div>
355
303
  <h1 class="Section3">Bibliography</h1>
356
- <p class="Biblio" id="ISBN">[1]&#160; <i>Chemicals for analytical laboratory use</i></p>
357
- <p class="Biblio" id="ISSN">[2]&#160; <i>Instruments for analytical laboratory use</i></p>
304
+ <p class="Biblio" id="ISBN">[1]&#160; <i>Chemicals for analytical laboratory use</i>. ISBN.</p>
305
+ <p class="Biblio" id="ISSN">[2]&#160; <i>Instruments for analytical laboratory use</i>. ISSN.</p>
358
306
  <div class="Note">
359
307
  <p>
360
308
  <span class="note_label">NOTE</span>&#160; This is an annotation of document ISSN.</p>
@@ -372,7 +320,7 @@ RSpec.describe IsoDoc do
372
320
  <a href="http://www.icc.or.at">http://www.icc.or.at</a>
373
321
  )</p>
374
322
  <p class="Biblio" id="ref11">[4]&#160; IETF RFC 10,
375
- <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i></p>
323
+ <i>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</i>.</p>
376
324
  <p class="Biblio" id="ref12">Citn&#160; IETF RFC 20, CitationWorks. 2019.
377
325
  <i>How to cite a reference</i>
378
326
  .</p>
@@ -392,4 +340,53 @@ RSpec.describe IsoDoc do
392
340
  .convert("test", presxml, true)))
393
341
  .to be_equivalent_to xmlpp(html)
394
342
  end
343
+
344
+ it "processes websites" do
345
+ input = <<~INPUT
346
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
347
+ <bibdata>
348
+ <language>en</language>
349
+ </bibdata>
350
+ <references normative="false">
351
+ <title>Bibliography</title>
352
+ <bibitem id="ignf" type="website">
353
+ <fetched>2022-05-06</fetched>
354
+ <title type="title-main" format="text/plain">IGNF. (IGN France) Registry</title>
355
+ <title type="main" format="text/plain">IGNF. (IGN France) Registry</title>
356
+ <uri>https://registre.ign.fr/ign/IGNF/</uri>
357
+ <docidentifier type="metanorma">2</docidentifier>
358
+ </bibitem>
359
+ </references>
360
+ </iso-standard>
361
+ INPUT
362
+ output = <<~OUTPUT
363
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
364
+ <bibdata>
365
+ <language current='true'>en</language>
366
+ </bibdata>
367
+
368
+ <references normative='false'>
369
+ <title depth='1'>Bibliography</title>
370
+ <bibitem id='ignf' type='website'>
371
+ <formattedref>
372
+ <em>
373
+ <span class='stddocTitle'>IGNF. (IGN France) Registry</span>
374
+ </em>
375
+ [website]. Available from:
376
+ <span class='biburl'>
377
+ <link target='https://registre.ign.fr/ign/IGNF/'>https://registre.ign.fr/ign/IGNF/</link>
378
+ </span>
379
+ .
380
+ </formattedref>
381
+ <uri>https://registre.ign.fr/ign/IGNF/</uri>
382
+ <docidentifier type='metanorma'>2</docidentifier>
383
+ </bibitem>
384
+ </references>
385
+ </iso-standard>
386
+ OUTPUT
387
+ expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
388
+ .convert("test", input, true))
389
+ .sub(%r{<localized-strings>.*</localized-strings>}m, ""))
390
+ .to be_equivalent_to xmlpp(output)
391
+ end
395
392
  end
@@ -137,7 +137,7 @@ RSpec.describe IsoDoc do
137
137
  </clause>
138
138
  </sections>
139
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>
140
+ <title><strong>Annex A</strong><br/><span class='obligation'>(normative)</span><br/><br/><strong>Annex</strong></title>
141
141
  <clause id="Q" inline-header="false" obligation="normative">
142
142
  <title depth="2">A.1<tab/>Annex A.1</title>
143
143
  <clause id="Q1" inline-header="false" obligation="normative">
@@ -369,7 +369,7 @@ RSpec.describe IsoDoc do
369
369
  </p>
370
370
  <div class="Section3" id="P">
371
371
  <h1 class="Annex">
372
- <br/>(normative)
372
+ <br/><span style='font-weight:normal;'>(normative)</span>
373
373
  <br/>
374
374
  <br/>
375
375
  <b>Annex</b></h1>
@@ -563,81 +563,81 @@ RSpec.describe IsoDoc do
563
563
  <status>
564
564
  <stage abbreviation='IS' language=''>60</stage>
565
565
  <stage abbreviation='IS' language='en'>International standard</stage>
566
- <substage language=''>60</substage>
566
+ <substage>60</substage>
567
567
  </status>
568
- <copyright>
569
- <from>#{Time.new.year}</from>
570
- <owner>
571
- <organization>
572
- <name>International Organization for Standardization</name>
573
- <abbreviation>ISO</abbreviation>
574
- </organization>
575
- </owner>
576
- </copyright>
577
- <ext>
578
- <doctype language=''>article</doctype>
579
- <subdoctype>vocabulary</subdoctype>
580
- <editorialgroup>
581
- <technical-committee/>
582
- <subcommittee/>
583
- <workgroup/>
584
- </editorialgroup>
585
- <stagename>International standard</stagename>
586
- </ext>
587
- </bibdata>
588
- <sections>
589
- <terms id='A' obligation='normative' displayorder='1'>
590
- <title depth='1'>
591
- 1
592
- <tab/>
593
- Terms and definitions
594
- </title>
595
- <p id='A1'>No terms and definitions are listed in this document.</p>
596
- </terms>
597
- <clause id='B' inline-header='false' obligation='normative' displayorder='2'>
598
- <title depth='1'>
599
- 2
600
- <tab/>
601
- Clause
602
- </title>
603
- </clause>
604
- <terms id='C' obligation='normative' displayorder='3'>
605
- <title depth='1'>
606
- 3
607
- <tab/>
608
- More terms
609
- </title>
610
- </terms>
611
- </sections>
612
- </iso-standard>
568
+ <copyright>
569
+ <from>#{Time.new.year}</from>
570
+ <owner>
571
+ <organization>
572
+ <name>International Organization for Standardization</name>
573
+ <abbreviation>ISO</abbreviation>
574
+ </organization>
575
+ </owner>
576
+ </copyright>
577
+ <ext>
578
+ <doctype>article</doctype>
579
+ <subdoctype>vocabulary</subdoctype>
580
+ <editorialgroup>
581
+ <technical-committee/>
582
+ <subcommittee/>
583
+ <workgroup/>
584
+ </editorialgroup>
585
+ <stagename>International standard</stagename>
586
+ </ext>
587
+ </bibdata>
588
+ <sections>
589
+ <terms id='A' obligation='normative' displayorder='1'>
590
+ <title depth='1'>
591
+ 1
592
+ <tab/>
593
+ Terms and definitions
594
+ </title>
595
+ <p id='A1'>No terms and definitions are listed in this document.</p>
596
+ </terms>
597
+ <clause id='B' inline-header='false' obligation='normative' displayorder='2'>
598
+ <title depth='1'>
599
+ 2
600
+ <tab/>
601
+ Clause
602
+ </title>
603
+ </clause>
604
+ <terms id='C' obligation='normative' displayorder='3'>
605
+ <title depth='1'>
606
+ 3
607
+ <tab/>
608
+ More terms
609
+ </title>
610
+ </terms>
611
+ </sections>
612
+ </iso-standard>
613
613
  OUTPUT
614
614
  output = <<~OUTPUT
615
- <html lang='en'>
616
- <head/>
617
- <body lang='en'>
618
- <div class='title-section'>
619
- <p>&#160;</p>
620
- </div>
621
- <br/>
622
- <div class='prefatory-section'>
623
- <p>&#160;</p>
624
- </div>
625
- <br/>
626
- <div class='main-section'>
627
- <p class='zzSTDTitle1'/>
628
- <div id='A'>
629
- <h1> 1 &#160; Terms and definitions </h1>
630
- <p id='A1'>No terms and definitions are listed in this document.</p>
631
- </div>
632
- <div id='B'>
633
- <h1> 2 &#160; Clause </h1>
634
- </div>
635
- <div id='C'>
636
- <h1> 3 &#160; More terms </h1>
637
- </div>
638
- </div>
639
- </body>
640
- </html>
615
+ <html lang='en'>
616
+ <head/>
617
+ <body lang='en'>
618
+ <div class='title-section'>
619
+ <p>&#160;</p>
620
+ </div>
621
+ <br/>
622
+ <div class='prefatory-section'>
623
+ <p>&#160;</p>
624
+ </div>
625
+ <br/>
626
+ <div class='main-section'>
627
+ <p class='zzSTDTitle1'/>
628
+ <div id='A'>
629
+ <h1> 1 &#160; Terms and definitions </h1>
630
+ <p id='A1'>No terms and definitions are listed in this document.</p>
631
+ </div>
632
+ <div id='B'>
633
+ <h1> 2 &#160; Clause </h1>
634
+ </div>
635
+ <div id='C'>
636
+ <h1> 3 &#160; More terms </h1>
637
+ </div>
638
+ </div>
639
+ </body>
640
+ </html>
641
641
  OUTPUT
642
642
  expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
643
643
  .convert("test", input, true)
@@ -695,7 +695,8 @@ RSpec.describe IsoDoc do
695
695
  <sections/>
696
696
  </iso-standard>
697
697
  INPUT
698
- expect(xmlpp(output.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
698
+ expect(xmlpp(output.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m,
699
+ "</body>")))
699
700
  .to be_equivalent_to xmlpp(<<~"OUTPUT")
700
701
  <body lang="EN-US" link="blue" vlink="#954F72">
701
702
  <div class="WordSection1">
@@ -726,7 +727,8 @@ RSpec.describe IsoDoc do
726
727
  <sections/>
727
728
  </iso-standard>
728
729
  INPUT
729
- expect(xmlpp(output.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m, "</body>")))
730
+ expect(xmlpp(output.sub(/^.*<body /m, "<body ").sub(%r{</body>.*$}m,
731
+ "</body>")))
730
732
  .to be_equivalent_to xmlpp(<<~"OUTPUT")
731
733
  <body lang="EN-US" link="blue" vlink="#954F72">
732
734
  <div class="WordSection1">
@@ -154,7 +154,7 @@ RSpec.describe IsoDoc do
154
154
  <title>
155
155
  <strong>Annex A</strong>
156
156
  <br/>
157
- (informative)
157
+ <span class="obligation">(informative)</span>
158
158
  <br/>
159
159
  <br/>
160
160
  <strong>Annex</strong>
@@ -382,7 +382,7 @@ RSpec.describe IsoDoc do
382
382
  <a name='Annex' id='Annex'/>
383
383
  <p class='ANNEX'>
384
384
  <br/>
385
- (informative)
385
+ <span style='font-weight:normal;'>(informative)</span>
386
386
  <br/>
387
387
  <br/>
388
388
  <b>Annex</b>
@@ -90,7 +90,7 @@ RSpec.describe IsoDoc do
90
90
  </ul>
91
91
  </termexample>
92
92
  <termsource status='modified'>[SOURCE:
93
- <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>, modified &#x2013; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
93
+ <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>7301</span>:<span class='stdyear'>2011</span>, <span class='citesec'>3.1</span></origin>, modified &#x2013; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
94
94
  </termsource>
95
95
  </term>
96
96
  <term id='paddy'><name>1.2</name>
@@ -121,7 +121,7 @@ RSpec.describe IsoDoc do
121
121
  </ul>
122
122
  </termexample>
123
123
  <termsource status='identical'>[SOURCE:
124
- <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>]
124
+ <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>7301</span>:<span class='stdyear'>2011</span>, <span class='citesec'>3.1</span></origin>]
125
125
  </termsource>
126
126
  </term>
127
127
  <term id='A'>