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
@@ -128,7 +128,7 @@ RSpec.describe IsoDoc do
128
128
  <annex id="annex1" displayorder="5">
129
129
  <title>
130
130
  <strong>Annex A</strong>
131
- <br/>(informative)</title>
131
+ <br/><span class="obligation">(informative)</span></title>
132
132
  <clause id="annex1a" inline-header="true">
133
133
  <title>A.1</title>
134
134
  <note id="AN">
@@ -252,21 +252,21 @@ RSpec.describe IsoDoc do
252
252
  <title>Foreword</title>
253
253
  <p id='A'>
254
254
  This is a preamble
255
- <xref target='C'>0.1</xref>
256
- <xref target='C1'>0.2</xref>
257
- <xref target='D'>Scope</xref>
255
+ <xref target='C'><span class='citesec'>0.1</span></xref>
256
+ <xref target='C1'><span class='citesec'>0.2</span></xref>
257
+ <xref target='D'><span class='citesec'>Scope</span></xref>
258
258
  <xref target='H'>[H]</xref>
259
259
  <xref target='I'>[I]</xref>
260
260
  <xref target='J'>[J]</xref>
261
261
  <xref target='K'>[K]</xref>
262
262
  <xref target='L'>[L]</xref>
263
- <xref target='M'>Clause 4</xref>
264
- <xref target='N'>Introduction</xref>
265
- <xref target='O'>Clause 4.2</xref>
266
- <xref target='P'>Annex A</xref>
267
- <xref target='Q'>A.1</xref>
268
- <xref target='Q1'>A.1.1</xref>
269
- <xref target='Q2'>Annex A, Appendix 1</xref>
263
+ <xref target='M'><span class='citesec'>Clause 4</span></xref>
264
+ <xref target='N'><span class='citesec'>Introduction</span></xref>
265
+ <xref target='O'><span class='citesec'>Clause 4.2</span></xref>
266
+ <xref target='P'><span class='citeapp'>Annex A</span></xref>
267
+ <xref target='Q'><span class='citeapp'>A.1</span></xref>
268
+ <xref target='Q1'><span class='citeapp'>A.1.1</span></xref>
269
+ <xref target='Q2'><span class='citeapp'>Annex A, Appendix 1</span></xref>
270
270
  <xref target='R'>[R]</xref>
271
271
  </p>
272
272
  </foreword>
@@ -297,7 +297,7 @@ RSpec.describe IsoDoc do
297
297
  <title>
298
298
  <strong>Annex A</strong>
299
299
  <br/>
300
- (normative)
300
+ <span class="obligation">(normative)</span>
301
301
  <br/>
302
302
  <br/>
303
303
  <strong>Annex</strong>
@@ -503,7 +503,7 @@ RSpec.describe IsoDoc do
503
503
  </clause>
504
504
  </sections>
505
505
  <annex id="P" inline-header="false" obligation="normative" displayorder="10">
506
- <title><strong>Annex A</strong><br/>(normative)<br/><br/><strong>Annex</strong></title>
506
+ <title><strong>Annex A</strong><br/><span class="obligation">(normative)</span><br/><br/><strong>Annex</strong></title>
507
507
  <clause id="Q" inline-header="false" obligation="normative">
508
508
  <title depth="2">A.1<tab/>Annex A.1</title>
509
509
  <clause id="Q1" inline-header="false" obligation="normative">
@@ -511,7 +511,8 @@ RSpec.describe IsoDoc do
511
511
  </clause>
512
512
  </clause>
513
513
  </annex>
514
- <annex id="P1" inline-header="false" obligation="normative" displayorder="11"><title><strong>Annex B</strong><br/>(normative)</title></annex>
514
+ <annex id="P1" inline-header="false" obligation="normative" displayorder="11">
515
+ <title><strong>Annex B</strong><br/><span class="obligation">(normative)</span></title></annex>
515
516
  <bibliography>
516
517
  <references id="R" normative="true" obligation="informative" displayorder="7">
517
518
  <title depth="1">Normative References</title>
@@ -754,22 +755,22 @@ RSpec.describe IsoDoc do
754
755
  :docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
755
756
  :docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
756
757
  :docnumeric=>"17301",
757
- :docsubtitle=>"Introduction Fran&#xe7;aise&nbsp;&mdash; Titre Principal&nbsp;&mdash; Partie&nbsp;1: Part du Titre",
758
+ :docsubtitle=>"Introduction Fran&#xe7;aise&#xa0;&#x2014; Titre Principal&#xa0;&#x2014; Partie&#xa0;1: Part du Titre",
758
759
  :docsubtitleamd=>"Fraction massique de mati&#xe8;re &#xe9;trang&#xe8;re, riz usin&#xe9; (non gluant), diviseurs d&#x2019;&#xe9;chantillon et recommandations relatives aux conditions d&#x2019;entreposage et de transport",
759
- :docsubtitleamdlabel=>"AMENDMENT&nbsp;1",
760
- :docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE&nbsp;2",
760
+ :docsubtitleamdlabel=>"AMENDMENT&#xa0;1",
761
+ :docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE&#xa0;2",
761
762
  :docsubtitleintro=>"Introduction Fran&#xe7;aise",
762
763
  :docsubtitlemain=>"Titre Principal",
763
764
  :docsubtitlepart=>"Part du Titre",
764
- :docsubtitlepartlabel=>"Partie&nbsp;1",
765
- :doctitle=>"Introduction&nbsp;&mdash; Main Title&#x2009;&#x2014;&#x2009;Title&nbsp;&mdash; Part&nbsp;1: Title Part",
765
+ :docsubtitlepartlabel=>"Partie&#xa0;1",
766
+ :doctitle=>"Introduction&#xa0;&#x2014; Main Title&#x2009;&#x2014;&#x2009;Title&#xa0;&#x2014; Part&#xa0;1: Title Part",
766
767
  :doctitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
767
- :doctitleamdlabel=>"AMENDMENT&nbsp;1",
768
- :doctitlecorrlabel=>"TECHNICAL CORRIGENDUM&nbsp;2",
768
+ :doctitleamdlabel=>"AMENDMENT&#xa0;1",
769
+ :doctitlecorrlabel=>"TECHNICAL CORRIGENDUM&#xa0;2",
769
770
  :doctitleintro=>"Introduction",
770
771
  :doctitlemain=>"Main Title&#x2009;&#x2014;&#x2009;Title",
771
772
  :doctitlepart=>"Title Part",
772
- :doctitlepartlabel=>"Part&nbsp;1",
773
+ :doctitlepartlabel=>"Part&#xa0;1",
773
774
  :doctype=>"Amendment",
774
775
  :doctype_display=>"Amendment",
775
776
  :docyear=>"2017",
@@ -919,22 +920,22 @@ RSpec.describe IsoDoc do
919
920
  :docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
920
921
  :docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
921
922
  :docnumeric=>"17301",
922
- :docsubtitle=>"Introduction&nbsp;&mdash; Main Title&#x2009;&#x2014;&#x2009;Title&nbsp;&mdash; Part&nbsp;1: Title Part",
923
+ :docsubtitle=>"Introduction&#xa0;&#x2014; Main Title&#x2009;&#x2014;&#x2009;Title&#xa0;&#x2014; Part&#xa0;1: Title Part",
923
924
  :docsubtitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
924
- :docsubtitleamdlabel=>"AMENDMENT&nbsp;1",
925
- :docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM&nbsp;2",
925
+ :docsubtitleamdlabel=>"AMENDMENT&#xa0;1",
926
+ :docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM&#xa0;2",
926
927
  :docsubtitleintro=>"Introduction",
927
928
  :docsubtitlemain=>"Main Title&#x2009;&#x2014;&#x2009;Title",
928
929
  :docsubtitlepart=>"Title Part",
929
- :docsubtitlepartlabel=>"Part&nbsp;1",
930
- :doctitle=>"Introduction Fran&#xe7;aise&nbsp;&mdash; Titre Principal&nbsp;&mdash; Partie&nbsp;1: Part du Titre",
930
+ :docsubtitlepartlabel=>"Part&#xa0;1",
931
+ :doctitle=>"Introduction Fran&#xe7;aise&#xa0;&#x2014; Titre Principal&#xa0;&#x2014; Partie&#xa0;1: Part du Titre",
931
932
  :doctitleamd=>"Fraction massique de mati&#xe8;re &#xe9;trang&#xe8;re, riz usin&#xe9; (non gluant), diviseurs d&#x2019;&#xe9;chantillon et recommandations relatives aux conditions d&#x2019;entreposage et de transport",
932
- :doctitleamdlabel=>"AMENDMENT&nbsp;1",
933
- :doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE&nbsp;2",
933
+ :doctitleamdlabel=>"AMENDMENT&#xa0;1",
934
+ :doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE&#xa0;2",
934
935
  :doctitleintro=>"Introduction Fran&#xe7;aise",
935
936
  :doctitlemain=>"Titre Principal",
936
937
  :doctitlepart=>"Part du Titre",
937
- :doctitlepartlabel=>"Partie&nbsp;1",
938
+ :doctitlepartlabel=>"Partie&#xa0;1",
938
939
  :doctype=>"Amendment",
939
940
  :doctype_display=>"Amendment",
940
941
  :docyear=>"2017",