metanorma-iso 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -209,9 +209,6 @@
209
209
  <zeroOrMore>
210
210
  <ref name="contact"/>
211
211
  </zeroOrMore>
212
- <zeroOrMore>
213
- <ref name="uri"/>
214
- </zeroOrMore>
215
212
  </element>
216
213
  </define>
217
214
  <define name="fullname">
@@ -828,6 +825,11 @@
828
825
  <optional>
829
826
  <attribute name="scope"/>
830
827
  </optional>
828
+ <optional>
829
+ <attribute name="primary">
830
+ <data type="boolean"/>
831
+ </attribute>
832
+ </optional>
831
833
  <text/>
832
834
  </element>
833
835
  </define>
@@ -40,7 +40,8 @@ module Metanorma
40
40
  def symbols_validate(root)
41
41
  f = root.xpath("//definitions")
42
42
  f.empty? && return
43
- (f.size == 1) || @log.add("Style", f.first, ONE_SYMBOLS_WARNING)
43
+ (f.size == 1 || @vocab) or
44
+ @log.add("Style", f.first, ONE_SYMBOLS_WARNING)
44
45
  f.first.elements.each do |e|
45
46
  unless %w(title dl).include? e.name
46
47
  @log.add("Style", f.first, NON_DL_SYMBOLS_WARNING)
@@ -100,7 +101,7 @@ module Metanorma
100
101
 
101
102
  def sections_sequence_validate(root)
102
103
  names, n = sections_sequence_validate_start(root)
103
- if root&.at("//bibdata/ext/subdoctype")&.text == "vocabulary"
104
+ if @vocab
104
105
  names, n = sections_sequence_validate_body_vocab(names, n)
105
106
  else
106
107
  names, n = sections_sequence_validate_body(names, n)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.0.2".freeze
3
+ VERSION = "2.0.3".freeze
4
4
  end
5
5
  end
@@ -1373,7 +1373,7 @@ RSpec.describe IsoDoc do
1373
1373
  <title depth="1">1
1374
1374
  <tab/>
1375
1375
  Scope</title>
1376
- <ol id="N">
1376
+ <ol id="N" type="alphabet">
1377
1377
  <li>
1378
1378
  <p>A</p>
1379
1379
  </li>
@@ -1388,12 +1388,12 @@ RSpec.describe IsoDoc do
1388
1388
  Widgets</title>
1389
1389
  <clause id="widgets1" inline-header="true">
1390
1390
  <title>3.1</title>
1391
- <ol id="note1">
1391
+ <ol id="note1" type="alphabet">
1392
1392
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
1393
1393
  types of kernel.
1394
1394
  </p>
1395
1395
  </ol>
1396
- <ol id="note2">
1396
+ <ol id="note2" type="alphabet">
1397
1397
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
1398
1398
  types of kernel.
1399
1399
  </p>
@@ -1407,7 +1407,7 @@ RSpec.describe IsoDoc do
1407
1407
  <br/>(informative)</title>
1408
1408
  <clause id="annex1a" inline-header="true">
1409
1409
  <title>A.1</title>
1410
- <ol id="AN">
1410
+ <ol id="AN" type="alphabet">
1411
1411
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
1412
1412
  types of kernel.
1413
1413
  </p>
@@ -1415,12 +1415,12 @@ RSpec.describe IsoDoc do
1415
1415
  </clause>
1416
1416
  <clause id="annex1b" inline-header="true">
1417
1417
  <title>A.2</title>
1418
- <ol id="Anote1">
1418
+ <ol id="Anote1" type="alphabet">
1419
1419
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
1420
1420
  types of kernel.
1421
1421
  </p>
1422
1422
  </ol>
1423
- <ol id="Anote2">
1423
+ <ol id="Anote2" type="alphabet">
1424
1424
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
1425
1425
  types of kernel.
1426
1426
  </p>
@@ -1513,7 +1513,7 @@ RSpec.describe IsoDoc do
1513
1513
  <sections>
1514
1514
  <clause id='scope' type='scope' displayorder='2'>
1515
1515
  <title depth='1'>1<tab/>Scope</title>
1516
- <ol id='N1'>
1516
+ <ol id='N1' type="alphabet">
1517
1517
  <li id='N'>
1518
1518
  <p>A</p>
1519
1519
  </li>
@@ -1523,12 +1523,12 @@ RSpec.describe IsoDoc do
1523
1523
  <clause id='widgets' displayorder='4'>
1524
1524
  <title depth='1'>3<tab/>Widgets</title>
1525
1525
  <clause inline-header="true" id='widgets1'><title>3.1</title>
1526
- <ol id='note1l'>
1526
+ <ol id='note1l' type="alphabet">
1527
1527
  <li id='note1'>
1528
1528
  <p>A</p>
1529
1529
  </li>
1530
1530
  </ol>
1531
- <ol id='note2l'>
1531
+ <ol id='note2l' type="alphabet">
1532
1532
  <li id='note2'>
1533
1533
  <p>A</p>
1534
1534
  </li>
@@ -1538,19 +1538,19 @@ RSpec.describe IsoDoc do
1538
1538
  </sections>
1539
1539
  <annex id='annex1' displayorder='5'><title><strong>Annex A</strong><br/>(informative)</title>
1540
1540
  <clause inline-header="true" id='annex1a'><title>A.1</title>
1541
- <ol id='ANl'>
1541
+ <ol id='ANl' type="alphabet">
1542
1542
  <li id='AN'>
1543
1543
  <p>A</p>
1544
1544
  </li>
1545
1545
  </ol>
1546
1546
  </clause>
1547
1547
  <clause inline-header="true" id='annex1b'><title>A.2</title>
1548
- <ol id='Anote1l'>
1548
+ <ol id='Anote1l' type="alphabet">
1549
1549
  <li id='Anote1'>
1550
1550
  <p>A</p>
1551
1551
  </li>
1552
1552
  </ol>
1553
- <ol id='Anote2l'>
1553
+ <ol id='Anote2l' type="alphabet">
1554
1554
  <li id='Anote2'>
1555
1555
  <p>A</p>
1556
1556
  </li>
@@ -1633,22 +1633,22 @@ RSpec.describe IsoDoc do
1633
1633
  <sections>
1634
1634
  <clause id='scope' type='scope' displayorder='2'>
1635
1635
  <title depth='1'>1<tab/>Scope</title>
1636
- <ol id='N1'>
1636
+ <ol id='N1' type="alphabet">
1637
1637
  <li id='N'>
1638
1638
  <p>A</p>
1639
- <ol>
1639
+ <ol type="arabic">
1640
1640
  <li id='note1'>
1641
1641
  <p>A</p>
1642
- <ol>
1642
+ <ol type="roman">
1643
1643
  <li id='note2'>
1644
1644
  <p>A</p>
1645
- <ol>
1645
+ <ol type="alphabet_upper">
1646
1646
  <li id='AN'>
1647
1647
  <p>A</p>
1648
- <ol>
1648
+ <ol type="roman_upper">
1649
1649
  <li id='Anote1'>
1650
1650
  <p>A</p>
1651
- <ol>
1651
+ <ol type="alphabet">
1652
1652
  <li id='Anote2'>
1653
1653
  <p>A</p>
1654
1654
  </li>
@@ -675,7 +675,7 @@ RSpec.describe Metanorma::ISO do
675
675
  :docfile: test.adoc
676
676
  :nodoc:
677
677
  :novalid:
678
- :amends: ISO 123;ISO 125
678
+ :amends: ISO 123:2001;ISO 125
679
679
  :obsoletes: ABC 1
680
680
  :successor-of: ABC 2
681
681
  :manifestation-of: ABC 3
@@ -769,9 +769,10 @@ RSpec.describe Metanorma::ISO do
769
769
  <uri type='src'>https://www.iso.org/standard/23281.html</uri>
770
770
  <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
771
771
  <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
772
- <docidentifier type='ISO'>ISO 123</docidentifier>
772
+ <docidentifier type='ISO'>ISO 123:2001</docidentifier>
773
773
  <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en,fr</docidentifier>
774
774
  <docnumber>123</docnumber>
775
+ <date type='published'><on>2001-05</on></date>
775
776
  <contributor>
776
777
  <role type='publisher'/>
777
778
  <organization>
@@ -784,6 +785,23 @@ RSpec.describe Metanorma::ISO do
784
785
  <language>en</language>
785
786
  <language>fr</language>
786
787
  <script>Latn</script>
788
+ <abstract format='text/plain' language='en' script='Latn'>
789
+ This International Standard specifies procedures for sampling natural
790
+ rubber latex concentrate and for sampling synthetic rubber latices and
791
+ artificial latices. It is also suitable for sampling rubber latex
792
+ contained in drums, tank cars or tanks. The procedures may also be
793
+ used for sampling plastics dispersions.
794
+ </abstract>
795
+ <abstract format='text/plain' language='fr' script='Latn'>
796
+ La pr&#233;sente Norme internationale sp&#233;cifie des m&#233;thodes
797
+ d&#8217;&#233;chantillonnage pour des concentr&#233;s de latex de
798
+ caoutchouc naturel et pour &#233;chantillonner des latex de caoutchouc
799
+ synth&#233;tique et des latex artificiels. Elle s&#8217;applique
800
+ &#233;galement &#224; l&#8217;&#233;chantillonnage de latex de
801
+ caoutchouc contenus dans des f&#251;ts, citernes routi&#232;res ou de
802
+ stockage. Le mode op&#233;ratoire peut aussi &#234;tre utilis&#233;
803
+ pour l&#8217;&#233;chantillonnage de dispersions de plastiques.
804
+ </abstract>
787
805
  <status>
788
806
  <stage>90</stage>
789
807
  <substage>93</substage>
@@ -801,74 +819,6 @@ RSpec.describe Metanorma::ISO do
801
819
  <formattedref format='text/plain'>ISO 123:1985</formattedref>
802
820
  </bibitem>
803
821
  </relation>
804
- <relation type='instance'>
805
- <bibitem type='standard'>
806
- <fetched/>
807
- <title type='title-intro' format='text/plain' language='en' script='Latn'>Rubber latex</title>
808
- <title type='title-main' format='text/plain' language='en' script='Latn'>Sampling</title>
809
- <title type='main' format='text/plain' language='en' script='Latn'>Rubber latex&#8201;&#8212;&#8201;Sampling</title>
810
- <title type='title-intro' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc</title>
811
- <title type='title-main' format='text/plain' language='fr' script='Latn'>&#201;chantillonnage</title>
812
- <title type='main' format='text/plain' language='fr' script='Latn'>Latex de caoutchouc&#8201;&#8212;&#8201;&#201;chantillonnage</title>
813
- <uri type='src'>https://www.iso.org/standard/23281.html</uri>
814
- <uri type='obp'>https://www.iso.org/obp/ui/#!iso:std:23281:en</uri>
815
- <uri type='rss'>https://www.iso.org/contents/data/standard/02/32/23281.detail.rss</uri>
816
- <docidentifier type='ISO'>ISO 123:2001</docidentifier>
817
- <docidentifier type='URN'>urn:iso:std:iso:123:stage-90.93:ed-3:en,fr</docidentifier>
818
- <docnumber>123</docnumber>
819
- <date type='published'>
820
- <on>2001-05</on>
821
- </date>
822
- <contributor>
823
- <role type='publisher'/>
824
- <organization>
825
- <name>International Organization for Standardization</name>
826
- <abbreviation>ISO</abbreviation>
827
- <uri>www.iso.org</uri>
828
- </organization>
829
- </contributor>
830
- <edition>3</edition>
831
- <language>en</language>
832
- <language>fr</language>
833
- <script>Latn</script>
834
- <abstract format='text/plain' language='en' script='Latn'>
835
- This International Standard specifies procedures for sampling
836
- natural rubber latex concentrate and for sampling synthetic rubber
837
- latices and artificial latices. It is also suitable for sampling
838
- rubber latex contained in drums, tank cars or tanks. The
839
- procedures may also be used for sampling plastics dispersions.
840
- </abstract>
841
- <abstract format='text/plain' language='fr' script='Latn'>
842
- La pr&#233;sente Norme internationale sp&#233;cifie des
843
- m&#233;thodes d&#8217;&#233;chantillonnage pour des
844
- concentr&#233;s de latex de caoutchouc naturel et pour
845
- &#233;chantillonner des latex de caoutchouc synth&#233;tique et
846
- des latex artificiels. Elle s&#8217;applique &#233;galement &#224;
847
- l&#8217;&#233;chantillonnage de latex de caoutchouc contenus dans
848
- des f&#251;ts, citernes routi&#232;res ou de stockage. Le mode
849
- op&#233;ratoire peut aussi &#234;tre utilis&#233; pour
850
- l&#8217;&#233;chantillonnage de dispersions de plastiques.
851
- </abstract>
852
- <status>
853
- <stage>90</stage>
854
- <substage>93</substage>
855
- </status>
856
- <copyright>
857
- <from>2001</from>
858
- <owner>
859
- <organization>
860
- <name>ISO</name>
861
- </organization>
862
- </owner>
863
- </copyright>
864
- <relation type='obsoletes'>
865
- <bibitem type='standard'>
866
- <formattedref format='text/plain'>ISO 123:1985</formattedref>
867
- </bibitem>
868
- </relation>
869
- <place>Geneva</place>
870
- </bibitem>
871
- </relation>
872
822
  <place>Geneva</place>
873
823
  </bibitem>
874
824
  </relation>
@@ -364,10 +364,7 @@ RSpec.describe Metanorma::ISO do
364
364
 
365
365
  def mock_fdis
366
366
  expect(RelatonIso::IsoBibliography).to receive(:get)
367
- .with("ISO/FDIS 17664-1", nil, code: "ISO/FDIS 17664-1",
368
- lang: "en", match: anything, ord: anything,
369
- process: 1, year: nil,
370
- title: "Title", usrlbl: nil) do
367
+ .with("ISO/FDIS 17664-1", nil, anything) do
371
368
  RelatonIsoBib::XMLParser.from_xml(<<~"OUTPUT")
372
369
  <bibitem id="x" type="standard">
373
370
  <fetched>#{Date.today}</fetched>
@@ -812,8 +812,7 @@ RSpec.describe Metanorma::ISO do
812
812
  INPUT
813
813
  expect(File.read("test.err"))
814
814
  .not_to include "Symbols and Abbreviated Terms can only contain "\
815
- "a definition list"
816
-
815
+ "a definition list"
817
816
  end
818
817
 
819
818
  it "Warning if missing foreword" do
@@ -1204,6 +1203,32 @@ RSpec.describe Metanorma::ISO do
1204
1203
  .to include "Only annexes and references can follow terms and clauses"
1205
1204
  end
1206
1205
 
1206
+ it "No warning if there are two Symbols sections in a Vocabulary document" do
1207
+ Asciidoctor.convert(<<~"INPUT", *OPTIONS)
1208
+ = Document title
1209
+ Author
1210
+ :docfile: test.adoc
1211
+ :nodoc:
1212
+ :no-isobib:
1213
+ :docsubtype: vocabulary
1214
+
1215
+ == Scope
1216
+
1217
+ == Terms and definitions
1218
+
1219
+ == A Clause
1220
+
1221
+ [heading=symbols and abbreviated terms]
1222
+ == Terms related to clinical psychology
1223
+
1224
+ [heading=symbols and abbreviated terms]
1225
+ == Symbols related to clinical psychology
1226
+
1227
+ INPUT
1228
+ expect(File.read("test.err"))
1229
+ .not_to include "Only one Symbols and Abbreviated Terms section "\
1230
+ "in the standard"
1231
+ end
1207
1232
 
1208
1233
  it "Warning if final section is not named Bibliography" do
1209
1234
  Asciidoctor.convert(<<~"INPUT", *OPTIONS)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-22 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc
@@ -420,8 +420,6 @@ files:
420
420
  - spec/metanorma/table_spec.rb
421
421
  - spec/metanorma/validate_spec.rb
422
422
  - spec/spec_helper.rb
423
- - spec/vcr_cassettes/docrels.yml
424
- - spec/vcr_cassettes/sortrefs.yml
425
423
  homepage: https://github.com/metanorma/metanorma-iso
426
424
  licenses:
427
425
  - BSD-2-Clause