metanorma-iso 2.0.7 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/asciidoctor/iso/base.rb +0 -1
  3. data/lib/asciidoctor/iso/cleanup.rb +0 -1
  4. data/lib/asciidoctor/iso/converter.rb +0 -1
  5. data/lib/asciidoctor/iso/deprecated.rb +4 -2
  6. data/lib/asciidoctor/iso/front.rb +0 -1
  7. data/lib/asciidoctor/iso/front_id.rb +0 -1
  8. data/lib/asciidoctor/iso/section.rb +0 -1
  9. data/lib/asciidoctor/iso/validate.rb +0 -1
  10. data/lib/asciidoctor/iso/validate_image.rb +0 -1
  11. data/lib/asciidoctor/iso/validate_requirements.rb +0 -1
  12. data/lib/asciidoctor/iso/validate_section.rb +0 -1
  13. data/lib/asciidoctor/iso/validate_style.rb +0 -1
  14. data/lib/asciidoctor/iso/validate_title.rb +0 -1
  15. data/lib/html2doc/lists.rb +37 -0
  16. data/lib/isodoc/iso/html/html_iso_titlepage.html +7 -2
  17. data/lib/isodoc/iso/html/isodoc-dis.css +196 -156
  18. data/lib/isodoc/iso/html/isodoc-dis.scss +193 -156
  19. data/lib/isodoc/iso/html/word_iso_intro-dis.html +7 -0
  20. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +3 -2
  21. data/lib/isodoc/iso/html/word_iso_titlepage.html +8 -2
  22. data/lib/isodoc/iso/html/wordstyle-dis.css +204 -34
  23. data/lib/isodoc/iso/html/wordstyle-dis.scss +198 -34
  24. data/lib/isodoc/iso/i18n-en.yaml +2 -1
  25. data/lib/isodoc/iso/i18n-fr.yaml +1 -0
  26. data/lib/isodoc/iso/i18n-ru.yaml +1 -0
  27. data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -0
  28. data/lib/isodoc/iso/index.rb +1 -1
  29. data/lib/isodoc/iso/init.rb +17 -1
  30. data/lib/isodoc/iso/iso.amendment.xsl +726 -299
  31. data/lib/isodoc/iso/iso.international-standard.xsl +726 -299
  32. data/lib/isodoc/iso/metadata.rb +75 -63
  33. data/lib/isodoc/iso/presentation_inline.rb +90 -0
  34. data/lib/isodoc/iso/presentation_xml_convert.rb +39 -100
  35. data/lib/isodoc/iso/presentation_xref.rb +126 -0
  36. data/lib/isodoc/iso/word_cleanup.rb +16 -2
  37. data/lib/isodoc/iso/word_convert.rb +27 -10
  38. data/lib/isodoc/iso/word_dis_convert.rb +174 -0
  39. data/lib/isodoc/iso/xref.rb +50 -30
  40. data/lib/metanorma/iso/biblio.rng +62 -10
  41. data/lib/metanorma/iso/boilerplate-fr.xml +1 -1
  42. data/lib/metanorma/iso/boilerplate-ru.xml +1 -3
  43. data/lib/metanorma/iso/boilerplate.xml +1 -3
  44. data/lib/metanorma/iso/cleanup.rb +7 -6
  45. data/lib/metanorma/iso/front_id.rb +28 -11
  46. data/lib/metanorma/iso/isodoc.rng +56 -0
  47. data/lib/metanorma/iso/version.rb +1 -1
  48. data/lib/metanorma-iso.rb +1 -0
  49. data/lib/relaton/render/config.yml +4 -0
  50. data/lib/relaton/render/general.rb +13 -0
  51. data/metanorma-iso.gemspec +1 -1
  52. data/spec/isodoc/amd_spec.rb +15 -14
  53. data/spec/isodoc/blocks_spec.rb +286 -179
  54. data/spec/isodoc/i18n_spec.rb +296 -133
  55. data/spec/isodoc/inline_spec.rb +35 -42
  56. data/spec/isodoc/iso_spec.rb +43 -27
  57. data/spec/isodoc/postproc_spec.rb +25 -0
  58. data/spec/isodoc/ref_spec.rb +66 -69
  59. data/spec/isodoc/section_spec.rb +78 -76
  60. data/spec/isodoc/table_spec.rb +2 -2
  61. data/spec/isodoc/terms_spec.rb +2 -2
  62. data/spec/isodoc/word_dis_spec.rb +760 -0
  63. data/spec/isodoc/xref_spec.rb +51 -51
  64. data/spec/metanorma/amd_spec.rb +39 -16
  65. data/spec/metanorma/base_spec.rb +17 -9
  66. data/spec/metanorma/blocks_spec.rb +4 -4
  67. data/spec/metanorma/cleanup_spec.rb +11 -11
  68. data/spec/metanorma/section_spec.rb +3 -3
  69. data/spec/spec_helper.rb +5 -2
  70. data/spec/vcr_cassettes/withdrawn_iso.yml +26 -26
  71. metadata +11 -5
  72. data/spec/vcr_cassettes/docrels.yml +0 -385
@@ -199,7 +199,7 @@ RSpec.describe IsoDoc do
199
199
  <title>1<tab/>
200
200
  Normative references</title>
201
201
  <bibitem id="ISO712" type="standard">
202
- <title format="text/plain">Cereals and cereal products</title>
202
+ <formattedref format="text/plain"><em>Cereals and cereal products</em></formattedref>
203
203
  <docidentifier>ISO 712</docidentifier>
204
204
  <contributor>
205
205
  <role type="publisher"/>
@@ -297,6 +297,7 @@ RSpec.describe IsoDoc do
297
297
  </locality>
298
298
  </eref>
299
299
  <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
300
+ <eref bibitemid="ISO712" citeas="ISO/IEC DIR 1" type="inline"/>
300
301
  </p>
301
302
  </foreword>
302
303
  </preface>
@@ -328,40 +329,40 @@ RSpec.describe IsoDoc do
328
329
  <eref bibitemid="IEV" citeas="IEV" type="inline">
329
330
  <locality type="clause">
330
331
  <referenceFrom>1-2-3</referenceFrom>
331
- </locality>IEV, 1-2-3</eref>
332
- <eref bibitemid="ISO712" citeas="ISO 712" type="inline">ISO 712</eref>
332
+ </locality><span class='stdpublisher'>IEV</span>, <span class="citesec">1-2-3</span></eref>
333
+ <eref bibitemid="ISO712" citeas="ISO 712" type="inline"><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>712</span></eref>
333
334
  <eref bibitemid="ISO712" type="inline">ISO 712</eref>
334
335
  <eref bibitemid="ISO712" type="inline">
335
336
  <locality type="table">
336
337
  <referenceFrom>1</referenceFrom>
337
- </locality>ISO 712, Table 1</eref>
338
+ </locality>ISO 712, <span class="citetbl">Table 1</span></eref>
338
339
  <eref bibitemid="ISO712" type="inline">
339
340
  <locality type="table">
340
341
  <referenceFrom>1</referenceFrom>
341
342
  <referenceTo>1</referenceTo>
342
- </locality>ISO 712, Table 1–1</eref>
343
+ </locality>ISO 712, <span class="citetbl">Table 1–1</span></eref>
343
344
  <eref bibitemid="ISO712" type="inline">
344
345
  <locality type="clause">
345
346
  <referenceFrom>1</referenceFrom>
346
347
  </locality>
347
348
  <locality type="table">
348
349
  <referenceFrom>1</referenceFrom>
349
- </locality>ISO 712, Clause 1, Table 1</eref>
350
+ </locality>ISO 712, <span class="citesec">Clause 1</span>, <span class="citetbl">Table 1</span></eref>
350
351
  <eref bibitemid="ISO712" type="inline">
351
352
  <locality type="clause">
352
353
  <referenceFrom>1</referenceFrom>
353
354
  </locality>
354
355
  <locality type="list">
355
356
  <referenceFrom>a</referenceFrom>
356
- </locality>ISO 712, Clause 1 a)</eref>
357
+ </locality>ISO 712, <span class="citesec">Clause 1</span> a)</eref>
357
358
  <eref bibitemid="ISO712" type="inline">
358
359
  <locality type="clause">
359
360
  <referenceFrom>1</referenceFrom>
360
- </locality>ISO 712, Clause 1</eref>
361
+ </locality>ISO 712, <span class="citesec">Clause 1</span></eref>
361
362
  <eref bibitemid="ISO712" type="inline">
362
363
  <locality type="clause">
363
364
  <referenceFrom>1.5</referenceFrom>
364
- </locality>ISO 712, 1.5</eref>
365
+ </locality>ISO 712, <span class="citesec">1.5</span></eref>
365
366
  <eref bibitemid="ISO712" type="inline">
366
367
  <locality type="table">
367
368
  <referenceFrom>1</referenceFrom>
@@ -373,6 +374,11 @@ RSpec.describe IsoDoc do
373
374
  <referenceFrom>7</referenceFrom>
374
375
  </locality>ISO 712, Prelude 7</eref>
375
376
  <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
377
+ <eref bibitemid='ISO712' citeas='ISO/IEC DIR 1' type='inline'>
378
+ <span class='stdpublisher'>ISO/IEC</span>
379
+ <span class='stddocNumber'>DIR</span>
380
+ <span class='stddocNumber'>1</span>
381
+ </eref>
376
382
  </p>
377
383
  </foreword>
378
384
  </preface>
@@ -381,14 +387,8 @@ RSpec.describe IsoDoc do
381
387
  <title depth="1">1<tab/>
382
388
  Normative References</title>
383
389
  <bibitem id="ISO712" type="standard">
384
- <title format="text/plain">Cereals and cereal products</title>
390
+ <formattedref><em><span class='stddocTitle'>Cereals and cereal products</span></em></formattedref>
385
391
  <docidentifier>ISO 712</docidentifier>
386
- <contributor>
387
- <role type="publisher"/>
388
- <organization>
389
- <abbreviation>ISO</abbreviation>
390
- </organization>
391
- </contributor>
392
392
  </bibitem>
393
393
  </references>
394
394
  </bibliography>
@@ -509,11 +509,11 @@ RSpec.describe IsoDoc do
509
509
  <p>
510
510
  <ul>
511
511
  <li>
512
- (<xref target="clause1">Clause 3</xref>)
512
+ (<xref target="clause1"><span class='citesec'>Clause 3</span></xref>)
513
513
  </li>
514
514
  <li>
515
515
  <em>term</em>
516
- (<xref target="clause1">Clause 3</xref>)
516
+ (<xref target="clause1"><span class='citesec'>Clause 3</span></xref>)
517
517
  </li>
518
518
  <li>
519
519
  <em>w[o]rd</em>
@@ -521,7 +521,7 @@ RSpec.describe IsoDoc do
521
521
  </li>
522
522
  <li>
523
523
  <em>term</em>
524
- (<eref bibitemid="ISO712" type="inline" citeas="ISO 712">ISO 712</eref>)
524
+ (<eref bibitemid="ISO712" type="inline" citeas="ISO 712"><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>712</span></eref>)
525
525
  </li>
526
526
  <li>
527
527
  <em>word</em>
@@ -533,7 +533,7 @@ RSpec.describe IsoDoc do
533
533
  <referenceFrom>3.1</referenceFrom>
534
534
  </locality><locality type="figure">
535
535
  <referenceFrom>a</referenceFrom>
536
- </locality>ISO 712, 3.1, Figure a</eref>)
536
+ </locality><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>712</span>, <span class="citesec">3.1</span>, <span class="citefig">Figure a</span></eref>)
537
537
  </li>
538
538
  <li>
539
539
  <em>word</em>
@@ -545,7 +545,7 @@ RSpec.describe IsoDoc do
545
545
  <locality type="figure">
546
546
  <referenceFrom>b</referenceFrom>
547
547
  </locality>
548
- </localityStack>ISO 712, 3.1 and Figure b</eref>)
548
+ </localityStack><span class='stdpublisher'>ISO</span> <span class='stddocNumber'>712</span>, <span class="citesec">3.1</span> and <span class="citefig">Figure b</span></eref>)
549
549
  </li>
550
550
  <li>
551
551
  <em>word</em>
@@ -584,15 +584,8 @@ RSpec.describe IsoDoc do
584
584
  <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="1"><title depth="1">1<tab/>Normative References</title>
585
585
  <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
586
586
  <bibitem id="ISO712" type="standard">
587
- <title format="text/plain">Cereals or cereal products</title>
588
- <title type="main" format="text/plain">Cereals and cereal products</title>
587
+ <formattedref><em><span class='stddocTitle'>Cereals and cereal products</span></em></formattedref>
589
588
  <docidentifier type="ISO">ISO 712</docidentifier>
590
- <contributor>
591
- <role type="publisher"/>
592
- <organization>
593
- <name>International Organization for Standardization</name>
594
- </organization>
595
- </contributor>
596
589
  </bibitem>
597
590
  </references></bibliography>
598
591
  </iso-standard>
@@ -768,7 +761,7 @@ RSpec.describe IsoDoc do
768
761
  <li>
769
762
  <em>term</em>
770
763
  (
771
- <xref target='clause1'>1.2</xref>
764
+ <xref target='clause1'><span class='citesec'>1.2</span></xref>
772
765
  )
773
766
  </li>
774
767
  <li> term </li>
@@ -780,7 +773,7 @@ RSpec.describe IsoDoc do
780
773
  <li>
781
774
  <em>term</em>
782
775
  (
783
- <xref target='clause1'>1.2</xref>
776
+ <xref target='clause1'><span class='citesec'>1.2</span></xref>
784
777
  )
785
778
  </li>
786
779
  <li> term </li>
@@ -850,15 +843,15 @@ RSpec.describe IsoDoc do
850
843
  <ul>
851
844
  <li>
852
845
  <em>term</em>
853
- (<xref target="clause1">Clause 1</xref>)
846
+ (<xref target="clause1"><span class='citesec'>Clause 1</span></xref>)
854
847
  </li>
855
848
  <li>
856
849
  term
857
- (<xref target="clause1">Clause 1</xref>)
850
+ (<xref target="clause1"><span class='citesec'>Clause 1</span></xref>)
858
851
  </li>
859
852
  <li>
860
853
  <em>term</em>
861
- (<xref target="clause1">Clause 1</xref>)
854
+ (<xref target="clause1"><span class='citesec'>Clause 1</span></xref>)
862
855
  </li>
863
856
  <li>
864
857
  term
@@ -869,10 +862,10 @@ RSpec.describe IsoDoc do
869
862
  <li>
870
863
  term
871
864
  </li>
872
- <li><xref target="clause1"><em>term</em></xref> (<xref target="clause1">Clause 1</xref>)</li>
873
- <li><xref target="clause1"><em>term</em></xref> (Clause 1)</li>
874
- <li><em>term</em> (<xref target="clause1">Clause 1</xref>)</li>
875
- <li><em>term</em> (Clause 1)</li>
865
+ <li><xref target="clause1"><em>term</em></xref> (<xref target="clause1"><span class='citesec'>Clause 1</span></xref>)</li>
866
+ <li><xref target="clause1"><em>term</em></xref> (<span class='citesec'>Clause 1</span>)</li>
867
+ <li><em>term</em> (<xref target="clause1"><span class='citesec'>Clause 1</span></xref>)</li>
868
+ <li><em>term</em> (<span class='citesec'>Clause 1</span>)</li>
876
869
  </ul></p>
877
870
  </term>
878
871
  </terms>
@@ -1017,7 +1010,7 @@ RSpec.describe IsoDoc do
1017
1010
  <referenceFrom>5</referenceFrom>
1018
1011
  </locality>
1019
1012
  </localityStack>
1020
- XYZ, Clause 3 to 5
1013
+ <span class='stdpublisher'>XYZ</span>, <span class="citesec">Clause <span class="citesec">3</span> to <span class="citesec">5</span></span>
1021
1014
  </eref>
1022
1015
  <eref type='inline' bibitemid='ref1' citeas='XYZ' droploc=''>
1023
1016
  <localityStack connective='from'>
@@ -1030,7 +1023,7 @@ RSpec.describe IsoDoc do
1030
1023
  <referenceFrom>5.1</referenceFrom>
1031
1024
  </locality>
1032
1025
  </localityStack>
1033
- XYZ, 3.1 to 5.1
1026
+ <span class='stdpublisher'>XYZ</span>, <span class="citesec">3.1</span> to <span class="citesec">5.1</span>
1034
1027
  </eref>
1035
1028
  <eref type='inline' bibitemid='ref1' citeas='XYZ'>
1036
1029
  <localityStack connective='from'>
@@ -1043,7 +1036,7 @@ RSpec.describe IsoDoc do
1043
1036
  <referenceFrom>5</referenceFrom>
1044
1037
  </locality>
1045
1038
  </localityStack>
1046
- XYZ, 3.1 to Clause 5
1039
+ <span class='stdpublisher'>XYZ</span>, <span class="citesec">3.1</span> to <span class="citesec">Clause 5</span>
1047
1040
  </eref>
1048
1041
  <eref type='inline' bibitemid='ref1' citeas='XYZ'>
1049
1042
  <localityStack connective='from'>
@@ -1056,7 +1049,7 @@ RSpec.describe IsoDoc do
1056
1049
  <referenceFrom>5</referenceFrom>
1057
1050
  </locality>
1058
1051
  </localityStack>
1059
- XYZ, 3.1 to Table 5
1052
+ <span class='stdpublisher'>XYZ</span>, <span class="citesec">3.1</span> to <span class="citetbl">Table 5</span>
1060
1053
  </eref>
1061
1054
  </p>
1062
1055
  </itu-standard>
@@ -15,9 +15,12 @@ RSpec.describe IsoDoc::Iso do
15
15
  </iso-standard>
16
16
  INPUT
17
17
  html = File.read("test.html", encoding: "utf-8")
18
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
19
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
20
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
18
+ expect(html)
19
+ .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
20
+ expect(html)
21
+ .to match(%r[blockquote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
22
+ expect(html)
23
+ .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
21
24
  end
22
25
 
23
26
  it "processes isodoc as ISO: alt HTML output" do
@@ -33,27 +36,34 @@ RSpec.describe IsoDoc::Iso do
33
36
  </iso-standard>
34
37
  INPUT
35
38
  html = File.read("test.html", encoding: "utf-8")
36
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
37
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
38
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
39
+ expect(html)
40
+ .to match(%r[\bpre[^{]+\{[^{]+font-family: "Space Mono", monospace;]m)
41
+ expect(html)
42
+ .to match(%r[blockquote[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
43
+ expect(html)
44
+ .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Lato", sans-serif;]m)
39
45
  end
40
46
 
41
47
  it "processes isodoc as ISO: Chinese HTML output" do
42
- IsoDoc::Iso::HtmlConvert.new(script: "Hans").convert("test", <<~"INPUT", false)
43
- <iso-standard xmlns="http://riboseinc.com/isoxml">
44
- <preface>
45
- <foreword>
46
- <note>
47
- <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
48
- </note>
49
- </foreword>
50
- </preface>
51
- </iso-standard>
52
- INPUT
48
+ IsoDoc::Iso::HtmlConvert.new(script: "Hans")
49
+ .convert("test", <<~"INPUT", false)
50
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
51
+ <preface>
52
+ <foreword>
53
+ <note>
54
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
55
+ </note>
56
+ </foreword>
57
+ </preface>
58
+ </iso-standard>
59
+ INPUT
53
60
  html = File.read("test.html", encoding: "utf-8")
54
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
55
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: "Source Han Sans", serif;]m)
56
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Source Han Sans", sans-serif;]m)
61
+ expect(html)
62
+ .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
63
+ expect(html)
64
+ .to match(%r[blockquote[^{]+\{[^{]+font-family: "Source Han Sans", serif;]m)
65
+ expect(html)
66
+ .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Source Han Sans", sans-serif;]m)
57
67
  end
58
68
 
59
69
  it "processes isodoc as ISO: user nominated fonts" do
@@ -72,9 +82,12 @@ RSpec.describe IsoDoc::Iso do
72
82
  </iso-standard>
73
83
  INPUT
74
84
  html = File.read("test.html", encoding: "utf-8")
75
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
76
- expect(html).to match(%r[blockquote[^{]+\{[^{]+font-family: Zapf Chancery;]m)
77
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: Comic Sans;]m)
85
+ expect(html)
86
+ .to match(%r[\bpre[^{]+\{[^{]+font-family: Andale Mono;]m)
87
+ expect(html)
88
+ .to match(%r[blockquote[^{]+\{[^{]+font-family: Zapf Chancery;]m)
89
+ expect(html)
90
+ .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: Comic Sans;]m)
78
91
  end
79
92
 
80
93
  it "processes isodoc as ISO: Word output" do
@@ -90,9 +103,12 @@ RSpec.describe IsoDoc::Iso do
90
103
  </iso-standard>
91
104
  INPUT
92
105
  html = File.read("test.doc", encoding: "utf-8")
93
- expect(html).to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
94
- expect(html).to match(%r[Quote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
95
- expect(html).to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
106
+ expect(html)
107
+ .to match(%r[\bpre[^{]+\{[^{]+font-family: "Courier New", monospace;]m)
108
+ expect(html)
109
+ .to match(%r[Quote[^{]+\{[^{]+font-family: "Cambria", serif;]m)
110
+ expect(html)
111
+ .to match(%r[\.h2Annex[^{]+\{[^{]+font-family: "Cambria", serif;]m)
96
112
  end
97
113
 
98
114
  it "does not include IEV in references" do
@@ -141,7 +157,7 @@ RSpec.describe IsoDoc::Iso do
141
157
  </relation>
142
158
  </bibitem>
143
159
  <bibitem id="ISO20483" type="standard">
144
- <title format="text/plain">Cereals and pulses</title>
160
+ <formattedref format="text/plain"><em>Cereals and pulses</em></formattedref>
145
161
  <docidentifier>ISO 20483</docidentifier>
146
162
  <date type="published">
147
163
  <from>2013</from>
@@ -374,6 +374,7 @@ 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
 
@@ -456,6 +457,30 @@ RSpec.describe IsoDoc do
456
457
  </span>
457
458
  </span>
458
459
  </p>
460
+ <p class='MsoToc1'>
461
+ <span class='MsoHyperlink'>
462
+ <span lang='EN-GB' xml:lang='EN-GB' style='mso-no-proof:yes'>
463
+ <a href='#_Toc'>
464
+ Annex A Annex First
465
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
466
+ <span style='mso-tab-count:1 dotted'>. </span>
467
+ </span>
468
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
469
+ <span style='mso-element:field-begin'/>
470
+ </span>
471
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'> PAGEREF _Toc \h </span>
472
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
473
+ <span style='mso-element:field-separator'/>
474
+ </span>
475
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>1</span>
476
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'/>
477
+ <span lang='EN-GB' xml:lang='EN-GB' class='MsoTocTextSpan'>
478
+ <span style='mso-element:field-end'/>
479
+ </span>
480
+ </a>
481
+ </span>
482
+ </span>
483
+ </p>
459
484
  <p class="MsoToc1">
460
485
  <span lang="EN-GB" xml:lang="EN-GB">
461
486
  <span style="mso-element:field-end"/>
@@ -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