metanorma-iso 2.0.8.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/lists.rb +169 -0
- data/lib/isodoc/iso/base_convert.rb +11 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +7 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +407 -427
- data/lib/isodoc/iso/html/isodoc-dis.scss +482 -438
- data/lib/isodoc/iso/html/isodoc.css +38 -13
- data/lib/isodoc/iso/html/isodoc.scss +38 -12
- data/lib/isodoc/iso/html/style-human.css +14 -1
- data/lib/isodoc/iso/html/style-human.scss +10 -1
- data/lib/isodoc/iso/html/style-iso.css +35 -23
- data/lib/isodoc/iso/html/style-iso.scss +31 -23
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +3 -1
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +26 -13
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +16 -6
- data/lib/isodoc/iso/html/wordstyle-dis.css +168 -48
- data/lib/isodoc/iso/html/wordstyle-dis.scss +158 -43
- data/lib/isodoc/iso/html_convert.rb +7 -2
- data/lib/isodoc/iso/i18n-en.yaml +33 -4
- data/lib/isodoc/iso/i18n-fr.yaml +30 -3
- data/lib/isodoc/iso/i18n-ru.yaml +33 -4
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +33 -3
- data/lib/isodoc/iso/i18n.rb +1 -1
- data/lib/isodoc/iso/init.rb +17 -1
- data/lib/isodoc/iso/iso.amendment.xsl +1711 -367
- data/lib/isodoc/iso/iso.international-standard.xsl +1711 -367
- data/lib/isodoc/iso/metadata.rb +72 -78
- data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +52 -100
- data/lib/isodoc/iso/presentation_xref.rb +132 -0
- data/lib/isodoc/iso/sections.rb +3 -3
- data/lib/isodoc/iso/word_cleanup.rb +17 -0
- data/lib/isodoc/iso/word_convert.rb +32 -12
- data/lib/isodoc/iso/word_dis_cleanup.rb +235 -0
- data/lib/isodoc/iso/word_dis_convert.rb +122 -0
- data/lib/isodoc/iso/xref.rb +78 -29
- data/lib/metanorma/iso/base.rb +20 -1
- data/lib/metanorma/iso/biblio.rng +69 -42
- data/lib/metanorma/iso/boilerplate-fr.xml +4 -1
- data/lib/metanorma/iso/boilerplate-ru.xml +4 -3
- data/lib/metanorma/iso/boilerplate.xml +4 -3
- data/lib/metanorma/iso/cleanup.rb +29 -1
- data/lib/metanorma/iso/front.rb +31 -6
- data/lib/metanorma/iso/front_id.rb +2 -0
- data/lib/metanorma/iso/isodoc.rng +65 -0
- data/lib/metanorma/iso/isostandard.rng +30 -12
- data/lib/metanorma/iso/macros.rb +29 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma-iso.rb +1 -0
- data/lib/relaton/render/config.yml +4 -0
- data/lib/relaton/render/general.rb +13 -0
- data/metanorma-iso.gemspec +1 -1
- data/spec/isodoc/amd_spec.rb +35 -60
- data/spec/isodoc/blocks_spec.rb +783 -179
- data/spec/isodoc/i18n_spec.rb +331 -100
- data/spec/isodoc/inline_spec.rb +35 -42
- data/spec/isodoc/iso_spec.rb +51 -170
- data/spec/isodoc/metadata_spec.rb +240 -99
- data/spec/isodoc/postproc_spec.rb +68 -7
- data/spec/isodoc/ref_spec.rb +66 -69
- data/spec/isodoc/section_spec.rb +88 -80
- data/spec/isodoc/table_spec.rb +2 -2
- data/spec/isodoc/terms_spec.rb +2 -2
- data/spec/isodoc/word_dis_spec.rb +1886 -0
- data/spec/isodoc/xref_spec.rb +138 -64
- data/spec/metanorma/amd_spec.rb +53 -1
- data/spec/metanorma/base_spec.rb +195 -20
- data/spec/metanorma/blocks_spec.rb +54 -0
- data/spec/metanorma/lists_spec.rb +2 -2
- data/spec/metanorma/section_spec.rb +2 -2
- data/spec/spec_helper.rb +23 -4
- data/spec/vcr_cassettes/withdrawn_iso.yml +25 -25
- metadata +15 -10
- data/docs/asciiiso-syntax.adoc +0 -307
- data/docs/guidance.adoc +0 -487
- data/docs/navigation.adoc +0 -23
- data/docs/quickstart.adoc +0 -179
- data/spec/vcr_cassettes/docrels.yml +0 -385
data/spec/isodoc/amd_spec.rb
CHANGED
@@ -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
|
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
|
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"
|
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>
|
@@ -744,32 +745,28 @@ RSpec.describe IsoDoc do
|
|
744
745
|
</iso-standard>
|
745
746
|
INPUT
|
746
747
|
output = <<~OUTPUT
|
747
|
-
{:
|
748
|
-
:agency=>"ISO",
|
749
|
-
:circulateddate=>"XXX",
|
750
|
-
:confirmeddate=>"XXX",
|
751
|
-
:copieddate=>"XXX",
|
748
|
+
{:agency=>"ISO",
|
752
749
|
:createddate=>"2016-05-01",
|
753
750
|
:docnumber=>"ISO/PreNWIP3 17301-1:2016/Amd.1",
|
754
751
|
:docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
|
755
752
|
:docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
|
756
753
|
:docnumeric=>"17301",
|
757
|
-
:docsubtitle=>"Introduction Française
|
754
|
+
:docsubtitle=>"Introduction Française — Titre Principal — Partie 1: Part du Titre",
|
758
755
|
:docsubtitleamd=>"Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport",
|
759
|
-
:docsubtitleamdlabel=>"AMENDMENT
|
760
|
-
:docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE
|
756
|
+
:docsubtitleamdlabel=>"AMENDMENT 1",
|
757
|
+
:docsubtitlecorrlabel=>"RECTIFICATIF TECHNIQUE 2",
|
761
758
|
:docsubtitleintro=>"Introduction Française",
|
762
759
|
:docsubtitlemain=>"Titre Principal",
|
763
760
|
:docsubtitlepart=>"Part du Titre",
|
764
|
-
:docsubtitlepartlabel=>"Partie
|
765
|
-
:doctitle=>"Introduction
|
761
|
+
:docsubtitlepartlabel=>"Partie 1",
|
762
|
+
:doctitle=>"Introduction — Main Title — Title — Part 1: Title Part",
|
766
763
|
:doctitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
|
767
|
-
:doctitleamdlabel=>"AMENDMENT
|
768
|
-
:doctitlecorrlabel=>"TECHNICAL CORRIGENDUM
|
764
|
+
:doctitleamdlabel=>"AMENDMENT 1",
|
765
|
+
:doctitlecorrlabel=>"TECHNICAL CORRIGENDUM 2",
|
769
766
|
:doctitleintro=>"Introduction",
|
770
767
|
:doctitlemain=>"Main Title — Title",
|
771
768
|
:doctitlepart=>"Title Part",
|
772
|
-
:doctitlepartlabel=>"Part
|
769
|
+
:doctitlepartlabel=>"Part 1",
|
773
770
|
:doctype=>"Amendment",
|
774
771
|
:doctype_display=>"Amendment",
|
775
772
|
:docyear=>"2017",
|
@@ -778,13 +775,8 @@ RSpec.describe IsoDoc do
|
|
778
775
|
:edition=>"2",
|
779
776
|
:editorialgroup=>["A 1", "B 2", "C 3"],
|
780
777
|
:ics=>"1, 2, 3",
|
781
|
-
:implementeddate=>"XXX",
|
782
|
-
:issueddate=>"XXX",
|
783
778
|
:lang=>"en",
|
784
|
-
:obsoleteddate=>"XXX",
|
785
|
-
:publisheddate=>"XXX",
|
786
779
|
:publisher=>"International Organization for Standardization",
|
787
|
-
:receiveddate=>"XXX",
|
788
780
|
:revdate=>"2000-01-01",
|
789
781
|
:revdate_monthyear=>"January 2000",
|
790
782
|
:sc=>"B 2",
|
@@ -794,13 +786,9 @@ RSpec.describe IsoDoc do
|
|
794
786
|
:stage_int=>10,
|
795
787
|
:stageabbr=>"NWIP",
|
796
788
|
:statusabbr=>"PreNWIP3",
|
789
|
+
:substage_int=>"20",
|
797
790
|
:tc=>"A 1",
|
798
|
-
:transmitteddate=>"XXX",
|
799
|
-
:unchangeddate=>"XXX",
|
800
791
|
:unpublished=>true,
|
801
|
-
:updateddate=>"XXX",
|
802
|
-
:vote_endeddate=>"XXX",
|
803
|
-
:vote_starteddate=>"XXX",
|
804
792
|
:wg=>"C 3"}
|
805
793
|
OUTPUT
|
806
794
|
expect(metadata(c.info(Nokogiri::XML(input), nil)))
|
@@ -909,32 +897,28 @@ RSpec.describe IsoDoc do
|
|
909
897
|
</iso-standard>
|
910
898
|
INPUT
|
911
899
|
output = <<~OUTPUT
|
912
|
-
{:
|
913
|
-
:agency=>"ISO",
|
914
|
-
:circulateddate=>"XXX",
|
915
|
-
:confirmeddate=>"XXX",
|
916
|
-
:copieddate=>"XXX",
|
900
|
+
{:agency=>"ISO",
|
917
901
|
:createddate=>"2016-05-01",
|
918
902
|
:docnumber=>"ISO/PreNWIP3 17301-1:2016/Amd.1",
|
919
903
|
:docnumber_lang=>"ISO/PreNWIP3 17301-1:2016/Amd.1(E)",
|
920
904
|
:docnumber_reference=>"ISO/PreNWIP3 17301-1:2016/Amd.1:2017(E)",
|
921
905
|
:docnumeric=>"17301",
|
922
|
-
:docsubtitle=>"Introduction
|
906
|
+
:docsubtitle=>"Introduction — Main Title — Title — Part 1: Title Part",
|
923
907
|
:docsubtitleamd=>"Mass fraction of extraneous matter, milled rice (nonglutinous), sample dividers and recommendations relating to storage and transport conditions",
|
924
|
-
:docsubtitleamdlabel=>"AMENDMENT
|
925
|
-
:docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM
|
908
|
+
:docsubtitleamdlabel=>"AMENDMENT 1",
|
909
|
+
:docsubtitlecorrlabel=>"TECHNICAL CORRIGENDUM 2",
|
926
910
|
:docsubtitleintro=>"Introduction",
|
927
911
|
:docsubtitlemain=>"Main Title — Title",
|
928
912
|
:docsubtitlepart=>"Title Part",
|
929
|
-
:docsubtitlepartlabel=>"Part
|
930
|
-
:doctitle=>"Introduction Française
|
913
|
+
:docsubtitlepartlabel=>"Part 1",
|
914
|
+
:doctitle=>"Introduction Française — Titre Principal — Partie 1: Part du Titre",
|
931
915
|
:doctitleamd=>"Fraction massique de matière étrangère, riz usiné (non gluant), diviseurs d’échantillon et recommandations relatives aux conditions d’entreposage et de transport",
|
932
|
-
:doctitleamdlabel=>"AMENDMENT
|
933
|
-
:doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE
|
916
|
+
:doctitleamdlabel=>"AMENDMENT 1",
|
917
|
+
:doctitlecorrlabel=>"RECTIFICATIF TECHNIQUE 2",
|
934
918
|
:doctitleintro=>"Introduction Française",
|
935
919
|
:doctitlemain=>"Titre Principal",
|
936
920
|
:doctitlepart=>"Part du Titre",
|
937
|
-
:doctitlepartlabel=>"Partie
|
921
|
+
:doctitlepartlabel=>"Partie 1",
|
938
922
|
:doctype=>"Amendment",
|
939
923
|
:doctype_display=>"Amendment",
|
940
924
|
:docyear=>"2017",
|
@@ -943,13 +927,8 @@ RSpec.describe IsoDoc do
|
|
943
927
|
:edition=>"2",
|
944
928
|
:editorialgroup=>["A 1", "B 2", "C 3"],
|
945
929
|
:ics=>"1, 2, 3",
|
946
|
-
:implementeddate=>"XXX",
|
947
|
-
:issueddate=>"XXX",
|
948
930
|
:lang=>"fr",
|
949
|
-
:obsoleteddate=>"XXX",
|
950
|
-
:publisheddate=>"XXX",
|
951
931
|
:publisher=>"International Organization for Standardization",
|
952
|
-
:receiveddate=>"XXX",
|
953
932
|
:revdate=>"2000-01-01",
|
954
933
|
:revdate_monthyear=>"Janvier 2000",
|
955
934
|
:sc=>"B 2",
|
@@ -959,13 +938,9 @@ RSpec.describe IsoDoc do
|
|
959
938
|
:stage_int=>10,
|
960
939
|
:stageabbr=>"NWIP",
|
961
940
|
:statusabbr=>"PreNWIP3",
|
941
|
+
:substage_int=>"20",
|
962
942
|
:tc=>"A 1",
|
963
|
-
:transmitteddate=>"XXX",
|
964
|
-
:unchangeddate=>"XXX",
|
965
943
|
:unpublished=>true,
|
966
|
-
:updateddate=>"XXX",
|
967
|
-
:vote_endeddate=>"XXX",
|
968
|
-
:vote_starteddate=>"XXX",
|
969
944
|
:wg=>"C 3"}
|
970
945
|
OUTPUT
|
971
946
|
expect(metadata(c.info(Nokogiri::XML(input), nil)))
|