metanorma-iec 1.4.4 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +4 -0
  5. data/lib/isodoc/iec/base_convert.rb +25 -14
  6. data/lib/isodoc/iec/html/htmlstyle.css +36 -21
  7. data/lib/isodoc/iec/html/htmlstyle.scss +13 -7
  8. data/lib/isodoc/iec/html/wordstyle.css +13 -11
  9. data/lib/isodoc/iec/html/wordstyle.scss +13 -11
  10. data/lib/isodoc/iec/html_convert.rb +2 -1
  11. data/lib/isodoc/iec/i18n-fr.yaml +1 -1
  12. data/lib/isodoc/iec/iec.international-standard.xsl +1637 -1280
  13. data/lib/isodoc/iec/presentation_xml_convert.rb +37 -7
  14. data/lib/isodoc/iec/word_convert.rb +2 -0
  15. data/lib/isodoc/iec/xref.rb +9 -8
  16. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
  17. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +2 -2
  18. data/lib/{asciidoctor → metanorma}/iec/converter.rb +22 -8
  19. data/lib/{asciidoctor → metanorma}/iec/front.rb +1 -1
  20. data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
  21. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  22. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  23. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +104 -3
  24. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +0 -0
  25. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  26. data/lib/metanorma/iec/version.rb +1 -1
  27. data/lib/metanorma-iec.rb +1 -1
  28. data/metanorma-iec.gemspec +1 -1
  29. data/spec/isodoc/i18n_spec.rb +2 -2
  30. data/spec/isodoc/iev_spec.rb +67 -57
  31. data/spec/isodoc/ref_spec.rb +359 -353
  32. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -1
  33. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  34. data/spec/{asciidoctor → metanorma}/cleanup_spec.rb +1 -1
  35. data/spec/{asciidoctor → metanorma}/iev_spec.rb +10 -2
  36. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  37. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  38. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  39. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  40. data/spec/spec_helper.rb +2 -2
  41. metadata +22 -22
@@ -211,6 +211,7 @@ RSpec.describe IsoDoc do
211
211
  <formattedref format='application/x-isodoc+xml'>
212
212
  <em>TITLE</em>
213
213
  </formattedref>
214
+ <docidentifier type='metanorma-ordinal'>[1]</docidentifier>
214
215
  <docidentifier>B</docidentifier>
215
216
  </bibitem>
216
217
  </references>
@@ -369,9 +370,9 @@ RSpec.describe IsoDoc do
369
370
  <h1>1&#160; Terms and definitions</h1>
370
371
  <br/>
371
372
  <div id='_general'>
372
- <p class='zzSTDTitle2'>
373
+ <h2 class='zzSTDTitle2'>
373
374
  <b>192-01 General</b>
374
- </p>
375
+ </h2>
375
376
  <p class='TermNum' id='paddy1'>192-01-01</p>
376
377
  <p class='Terms' style='text-align:left;'>
377
378
  <b>paddy</b>
@@ -537,9 +538,9 @@ RSpec.describe IsoDoc do
537
538
  </p>
538
539
  <div>
539
540
  <a name='_general' id='_general'/>
540
- <p class='zzSTDTitle2'>
541
+ <h2 class='zzSTDTitle2'>
541
542
  <b>192-01 General</b>
542
- </p>
543
+ </h2>
543
544
  <p class='TermNum'>
544
545
  <a name='paddy1' id='paddy1'/>
545
546
  192-01-01
@@ -600,7 +601,7 @@ RSpec.describe IsoDoc do
600
601
  <docnumber>60050</docnumber>
601
602
  <ext>
602
603
  <doctype language=''>international-standard</doctype>
603
- <doctype language='fr'>Norme international</doctype>
604
+ <doctype language='fr'>Norme internationale</doctype>
604
605
  <doctype language='en'>International Standard</doctype>
605
606
  <horizontal language=''>false</horizontal>
606
607
  <structuredidentifier>
@@ -661,10 +662,11 @@ RSpec.describe IsoDoc do
661
662
  <terms id="_general" obligation="normative"><title>General</title>
662
663
  <term id="item" language="en" tag="item">
663
664
  <preferred><expression language="en"><name>system</name></expression><field-of-application>in dependability</field-of-application></preferred>
664
- <preferred><expression language="ar"><name>نظام،</name></expression><field-of-application>في الاعتمادیة</field-of-application></preferred>
665
665
  <preferred><expression language="de"><name>Betrachtungseinheit</name<grammar><gender>feminine</gender></grammar></expression></preferred>
666
- <preferred><expression language="de"><name>Einheit</name><grammar><gender>feminine</gender></grammar></expression></preferred>
667
666
  <preferred><expression language="ja"><name>アイテム</name></expression></preferred>
667
+ <preferred><expression language="de"><name>Einheit</name><grammar><gender>feminine</gender></grammar></expression></preferred>
668
+ <preferred><expression language="zh"><name>&#20135;&#21697;</name></expression><field-of-application>在可靠性方面</field-of-application></preferred>
669
+ <preferred><expression language="ar"><name>نظام،</name></expression><field-of-application>في الاعتمادیة</field-of-application></preferred>
668
670
  <admitted><expression><name>paddy rice</name></expression></admitted>
669
671
  <admitted><expression><name>rough rice</name></expression></admitted>
670
672
  <deprecates><expression><name>cargo rice</name></expression></deprecates>
@@ -688,6 +690,7 @@ RSpec.describe IsoDoc do
688
690
  <field-of-application>en sûreté de fonctionnement</field-of-application>
689
691
  </preferred>
690
692
  <related type='contrast'><preferred><expression><name>Designation cinquième</name></expression></preferred><xref target="paddy1"/></related>
693
+ <related type='see'><preferred><expression><name>Designation sixième</name></expression></preferred><xref target="paddy1"/></related>
691
694
  <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747d">ensemble d’entités reliées entre elles qui satisfont collectivement à une exigence</p></verbal-definition></definition>
692
695
  <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74c">
693
696
  <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">Un système est considéré comme ayant une frontière définie, réelle ou abstraite.</p>
@@ -712,7 +715,7 @@ RSpec.describe IsoDoc do
712
715
  INPUT
713
716
 
714
717
  presxml = <<~PRESXML
715
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
718
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
716
719
  <bibdata type='standard'>
717
720
  <docidentifier type='ISO'>IEC 60050-192 ED 1</docidentifier>
718
721
  <docnumber>60050</docnumber>
@@ -735,20 +738,23 @@ RSpec.describe IsoDoc do
735
738
  <admitted>paddy rice</admitted>
736
739
  <admitted>rough rice</admitted>
737
740
  <deprecates>cargo rice</deprecates>
741
+ <definition>
742
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>set of interrelated items that collectively fulfil a requirement</p>
743
+ </definition>
738
744
  <p>
739
- <strong>CONTRAST:</strong>
740
- <em>
741
- <preferred>
742
- <strong>Fifth Designation</strong>
743
- </preferred>
744
- </em>
745
+ CONTRAST:
746
+ <strong>Fifth Designation</strong>
745
747
  (
746
748
  <xref target='paddy1'>192-01-02</xref>
747
749
  )
748
750
  </p>
749
- <definition>
750
- <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>set of interrelated items that collectively fulfil a requirement</p>
751
- </definition>
751
+ <termexample id='_671a1994-4783-40d0-bc81-987d06ffb740'>
752
+ <name>EXAMPLE</name>
753
+ <p id='_19830f33-e46c-42cc-94ca-a5ef101132d0'>
754
+ External resources (from outside the system boundary) may be
755
+ required for the system to operate.
756
+ </p>
757
+ </termexample>
752
758
  <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e'>
753
759
  <name>Note 1 to entry</name>
754
760
  <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>A system is considered to have a defined real or abstract boundary.</p>
@@ -760,43 +766,48 @@ RSpec.describe IsoDoc do
760
766
  required for the system to operate.
761
767
  </p>
762
768
  </termnote>
763
- <termexample id='_671a1994-4783-40d0-bc81-987d06ffb740'>
764
- <name>EXAMPLE</name>
765
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d0'>
766
- External resources (from outside the system boundary) may be
767
- required for the system to operate.
768
- </p>
769
- </termexample>
770
- <termsource status='modified'>SOURCE:
769
+ <termsource status='modified'>
770
+ SOURCE:
771
771
  <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'>
772
772
  <locality type='clause'>
773
773
  <referenceFrom>3.1</referenceFrom>
774
774
  </locality>
775
775
  ISO 7301:2011, 3.1
776
- </origin>, modified &#x2013;
777
- modified by extension to suit the dependability context
776
+ </origin>
777
+ , modified &#x2013; modified by extension to suit the dependability
778
+ context
778
779
  </termsource>
779
780
  <preferred>
780
781
  <strong>entit&#xE9;</strong>
781
782
  , &#x3c;en s&#xFB;ret&#xE9; de fonctionnement&#x3e;, m
782
783
  </preferred>
783
- <p>
784
- <strong>CONTRASTEZ:</strong>
785
- <em>
786
- <preferred>
787
- <strong>Designation cinqui&#xE8;me</strong>
788
- </preferred>
789
- </em>
790
- (
791
- <xref target='paddy1'>192-01-02</xref>
792
- )
793
- </p>
794
784
  <definition>
795
785
  <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747d'>
796
786
  ensemble d&#x2019;entit&#xE9;s reli&#xE9;es entre elles qui
797
787
  satisfont collectivement &#xE0; une exigence
798
788
  </p>
799
789
  </definition>
790
+ <p>
791
+ CONTRASTEZ:
792
+ <strong>Designation cinqui&#xE8;me</strong>
793
+ (
794
+ <xref target='paddy1'>192-01-02</xref>
795
+ )
796
+ </p>
797
+ <p>
798
+ VOIR:
799
+ <strong>Designation sixi&#xE8;me</strong>
800
+ (
801
+ <xref target='paddy1'>192-01-02</xref>
802
+ )
803
+ </p>
804
+ <termexample id='_671a1994-4783-40d0-bc81-987d06ffb741'>
805
+ <name>EXEMPLE</name>
806
+ <p id='_19830f33-e46c-42cc-94ca-a5ef101132d1'>
807
+ External resources (from outside the system boundary) may be
808
+ required for the system to operate.
809
+ </p>
810
+ </termexample>
800
811
  <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74c'>
801
812
  <name>Note 1 &#xE0; l&#x2019;article</name>
802
813
  <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
@@ -812,51 +823,50 @@ RSpec.describe IsoDoc do
812
823
  fonctionnement du syst&#xE8;me.
813
824
  </p>
814
825
  </termnote>
815
- <termexample id='_671a1994-4783-40d0-bc81-987d06ffb741'>
816
- <name>EXEMPLE</name>
817
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d1'>
818
- External resources (from outside the system boundary) may be
819
- required for the system to operate.
820
- </p>
821
- </termexample>
822
- <termsource status='modified'>SOURCE:
826
+ <termsource status='modified'>
827
+ SOURCE:
823
828
  <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'>
824
829
  <locality type='clause'>
825
830
  <referenceFrom>3.1</referenceFrom>
826
831
  </locality>
827
832
  ISO 7301:2011, 3.1
828
- </origin>, modifi&#xE9; &#x2013;
829
- modifi&#xE9; pour adapter au contexte de la s&#xFB;ret&#xE9; de fonctionnement
833
+ </origin>
834
+ , modifi&#xE9; &#x2013; modifi&#xE9; pour adapter au contexte de la
835
+ s&#xFB;ret&#xE9; de fonctionnement
830
836
  </termsource>
831
837
  <dl type='other-lang'>
832
838
  <dt>ar</dt>
833
- <dd language="ar" script="Arab">
839
+ <dd language='ar' script='Arab'>
834
840
  <preferred>
835
- <strong>&#x61C;&#x646;&#x638;&#x627;&#x645;&#x60C;&#x61C;</strong>
836
- &#x61C;, &#x3c;&#x641;&#x64A;
837
- &#x627;&#x644;&#x627;&#x639;&#x62A;&#x645;&#x627;&#x62F;&#x6CC;&#x629;&#x3e;&#x61C;
841
+ <strong>&#x61C;&#x646;&#x638;&#x627;&#x645;&#x60C;&#x61C;</strong>
842
+ &#x61C;, &#x3c;&#x641;&#x64A;
843
+ &#x627;&#x644;&#x627;&#x639;&#x62A;&#x645;&#x627;&#x62F;&#x6CC;&#x629;&#x3e;&#x61C;
838
844
  </preferred>
839
845
  </dd>
840
846
  <dt>de</dt>
841
- <dd language="de" script="Latn">
847
+ <dd language='de' script='Latn'>
842
848
  <preferred>
843
849
  <strong>Betrachtungseinheit</strong>
844
850
  , f
845
851
  </preferred>
846
- </dd>
847
- <dt>de</dt>
848
- <dd language="de" script="Latn">
849
852
  <preferred>
850
853
  <strong>Einheit</strong>
851
854
  , f
852
855
  </preferred>
853
856
  </dd>
854
857
  <dt>ja</dt>
855
- <dd language="ja" script="Jpan">
858
+ <dd language='ja' script='Jpan'>
856
859
  <preferred>
857
860
  <strong>&#x30A2;&#x30A4;&#x30C6;&#x30E0;</strong>
858
861
  </preferred>
859
862
  </dd>
863
+ <dt>zh</dt>
864
+ <dd language='zh' script='Hans'>
865
+ <preferred>
866
+ <strong>&#x4EA7;&#x54C1;</strong>
867
+ &#x3001;&#x3c;&#x5728;&#x53EF;&#x9760;&#x6027;&#x65B9;&#x9762;&#x3e;
868
+ </preferred>
869
+ </dd>
860
870
  </dl>
861
871
  </term>
862
872
  <term id='paddy1'>