metanorma-rsd 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f99ecbd2cd27b562e4ade586991c26e4a5907c810602b624113498494eeece7
4
- data.tar.gz: 1257c81081eb213ac329897a525ccc83152289742a8938204060a4412b631814
3
+ metadata.gz: 0dfe28a1012c6369914bc65c2968c39ca8ac539a11a73ca8cedc8764b5bccacd
4
+ data.tar.gz: 4d50c18db73b2713d5d184a69e768feff21192c879f00ce256b8fbddec8ca813
5
5
  SHA512:
6
- metadata.gz: 7d632058bdc2ed24ecdc6a729535fd01f327f095af63e980cbd896c33b7e0c8f7651ed5ed3e758eae1b921431636300d9234149d5764f5f46c1644daca8d78e2
7
- data.tar.gz: 41c6853c5705209c936f0c49283eb0d394f96be67da4dbb3c829e5cd8a72e61d539bb8c523f73c5c765262b8ba7ddae583d37a9b7a871bc2fe3d35ee5f611159
6
+ metadata.gz: 7b6105cab1473e1bda6b231c8e9bdf912f8cb8210b3e6de74b3e3718ee92e373c88d603841a71b0e85d440d4d05f58bf327e9ed8f7f204c6b3e22aeb0ed48c35
7
+ data.tar.gz: fdf9f0075b0e2515cd536c5e4ed1c09eb08da22e9a8dc53ea6ec8faaf41781b9236ef48fba4fbfea3bf30298c6bd85f98db12ae786e80895cf88028a7245016e
data/.travis.yml CHANGED
@@ -1,16 +1,18 @@
1
- dist: trusty
2
- sudo: false
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
3
3
  language: ruby
4
+ cache: bundler
5
+ os:
6
+ - linux
7
+ - osx
4
8
  rvm:
5
- - 2.5
6
- - 2.4
7
- - 2.3
8
- - ruby-head
9
+ - 2.5
10
+ - 2.4
11
+ - ruby-head
9
12
  before_install:
10
- - gem install bundler -v 2.0.1
11
- - travis_retry sudo apt-get update
12
- - sudo bash -c "curl -L https://raw.githubusercontent.com/metanorma/metanorma-linux-setup/master/ubuntu-install-puppeteer.sh | bash"
13
+ - gem install bundler -v 2.0.1
14
+ - bundle update
15
+ - curl -L https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/travis.sh | bash
13
16
  matrix:
14
17
  allow_failures:
15
18
  - rvm: ruby-head
16
-
data/appveyor.yml CHANGED
@@ -1,10 +1,14 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
1
3
  version: '{build}'
2
4
 
5
+ cache:
6
+ - vendor/bundle
7
+
3
8
  environment:
4
9
  matrix:
5
10
  - RUBY_VERSION: 25
6
11
  - RUBY_VERSION: 24
7
- - RUBY_VERSION: 23
8
12
  - RUBY_VERSION: _trunk
9
13
 
10
14
  matrix:
@@ -17,6 +21,8 @@ install:
17
21
 
18
22
  build_script:
19
23
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
24
+ - set GIT_TERMINAL_PROMPT=0
25
+ - bundle config --local path vendor/bundle
20
26
  - bundle update
21
27
  - bundle install
22
28
 
@@ -27,4 +33,3 @@ before_test:
27
33
 
28
34
  test_script:
29
35
  - bundle exec rake
30
-
@@ -35,7 +35,28 @@
35
35
  </define>
36
36
  <define name="status">
37
37
  <element name="status">
38
- <ref name="LocalizedString"/>
38
+ <ref name="stage"/>
39
+ <optional>
40
+ <ref name="substage"/>
41
+ </optional>
42
+ <optional>
43
+ <ref name="iteration"/>
44
+ </optional>
45
+ </element>
46
+ </define>
47
+ <define name="stage">
48
+ <element name="stage">
49
+ <text/>
50
+ </element>
51
+ </define>
52
+ <define name="substage">
53
+ <element name="substage">
54
+ <text/>
55
+ </element>
56
+ </define>
57
+ <define name="iteration">
58
+ <element name="iteration">
59
+ <text/>
39
60
  </element>
40
61
  </define>
41
62
  <define name="language">
@@ -523,9 +544,9 @@
523
544
  <zeroOrMore>
524
545
  <ref name="script"/>
525
546
  </zeroOrMore>
526
- <optional>
547
+ <zeroOrMore>
527
548
  <ref name="abstract"/>
528
- </optional>
549
+ </zeroOrMore>
529
550
  <optional>
530
551
  <ref name="status"/>
531
552
  </optional>
@@ -636,22 +657,27 @@
636
657
  <ref name="ISO8601Date"/>
637
658
  </optional>
638
659
  </define>
660
+ <define name="BibliographicDateType">
661
+ <choice>
662
+ <value>published</value>
663
+ <value>accessed</value>
664
+ <value>created</value>
665
+ <value>implemented</value>
666
+ <value>obsoleted</value>
667
+ <value>confirmed</value>
668
+ <value>updated</value>
669
+ <value>issued</value>
670
+ <value>transmitted</value>
671
+ <value>copied</value>
672
+ <value>unchanged</value>
673
+ <value>circulated</value>
674
+ </choice>
675
+ </define>
639
676
  <define name="bdate">
640
677
  <element name="date">
641
678
  <attribute name="type">
642
679
  <choice>
643
- <value>published</value>
644
- <value>accessed</value>
645
- <value>created</value>
646
- <value>implemented</value>
647
- <value>obsoleted</value>
648
- <value>confirmed</value>
649
- <value>updated</value>
650
- <value>issued</value>
651
- <value>transmitted</value>
652
- <value>copied</value>
653
- <value>unchanged</value>
654
- <value>circulated</value>
680
+ <ref name="BibliographicDateType"/>
655
681
  <text/>
656
682
  </choice>
657
683
  </attribute>
@@ -805,6 +831,9 @@
805
831
  </define>
806
832
  <define name="biblionote">
807
833
  <element name="note">
834
+ <optional>
835
+ <attribute name="type"/>
836
+ </optional>
808
837
  <ref name="FormattedString"/>
809
838
  </element>
810
839
  </define>
@@ -4,6 +4,7 @@ require "asciidoctor/standoc/converter"
4
4
  require "isodoc/rsd/html_convert"
5
5
  require "isodoc/rsd/word_convert"
6
6
  require "fileutils"
7
+ require_relative "validate"
7
8
 
8
9
  module Asciidoctor
9
10
  module Rsd
@@ -39,6 +40,7 @@ module Asciidoctor
39
40
  end
40
41
 
41
42
  def metadata_committee(node, xml)
43
+ return unless node.attr("committee")
42
44
  xml.editorialgroup do |a|
43
45
  a.committee node.attr("committee"),
44
46
  **attr_code(type: node.attr("committee-type"))
@@ -51,10 +53,6 @@ module Asciidoctor
51
53
  end
52
54
  end
53
55
 
54
- def metadata_status(node, xml)
55
- xml.status(**{ format: "plain" }) { |s| s << node.attr("status") }
56
- end
57
-
58
56
  def metadata_id(node, xml)
59
57
  docstatus = node.attr("status")
60
58
  dn = node.attr("docnumber")
@@ -85,7 +83,7 @@ module Asciidoctor
85
83
  xml.security security
86
84
  end
87
85
 
88
- def metadata(node, xml)
86
+ def metadata_ext(node, xml)
89
87
  super
90
88
  metadata_security(node, xml)
91
89
  end
@@ -19,27 +19,16 @@
19
19
  -->
20
20
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
21
  <include href="reqt.rng"/>
22
- <include href="biblio.rng">
23
- <define name="status">
24
- <element name="status">
25
- <choice>
26
- <value>proposal</value>
27
- <value>working_draft</value>
28
- <value>committee_draft</value>
29
- <value>draft_standard</value>
30
- <value>final_draft</value>
31
- <value>published</value>
32
- <value>withdrawn</value>
33
- </choice>
34
- </element>
35
- </define>
36
- </include>
22
+ <include href="biblio.rng"/>
37
23
  <start>
38
24
  <ref name="standard-document"/>
39
25
  </start>
40
26
  <define name="standard-document">
41
27
  <element name="standard-document">
42
28
  <ref name="bibdata"/>
29
+ <optional>
30
+ <ref name="boilerplate"/>
31
+ </optional>
43
32
  <optional>
44
33
  <ref name="preface"/>
45
34
  </optional>
@@ -64,6 +53,42 @@
64
53
  </oneOrMore>
65
54
  </element>
66
55
  </define>
56
+ <define name="boilerplate">
57
+ <element name="boilerplate">
58
+ <optional>
59
+ <ref name="copyright-statement"/>
60
+ </optional>
61
+ <optional>
62
+ <ref name="license-statement"/>
63
+ </optional>
64
+ <optional>
65
+ <ref name="legal-statement"/>
66
+ </optional>
67
+ <optional>
68
+ <ref name="feedback-statement"/>
69
+ </optional>
70
+ </element>
71
+ </define>
72
+ <define name="copyright-statement">
73
+ <element name="copyright-statement">
74
+ <ref name="Content-Section"/>
75
+ </element>
76
+ </define>
77
+ <define name="license-statement">
78
+ <element name="license-statement">
79
+ <ref name="Content-Section"/>
80
+ </element>
81
+ </define>
82
+ <define name="legal-statement">
83
+ <element name="legal-statement">
84
+ <ref name="Content-Section"/>
85
+ </element>
86
+ </define>
87
+ <define name="feedback-statement">
88
+ <element name="feedback-statement">
89
+ <ref name="Content-Section"/>
90
+ </element>
91
+ </define>
67
92
  <define name="sections">
68
93
  <element name="sections">
69
94
  <oneOrMore>
@@ -446,6 +471,11 @@
446
471
  <attribute name="id">
447
472
  <data type="ID"/>
448
473
  </attribute>
474
+ <optional>
475
+ <attribute name="unnumbered">
476
+ <data type="boolean"/>
477
+ </attribute>
478
+ </optional>
449
479
  <ref name="stem"/>
450
480
  <optional>
451
481
  <ref name="dl"/>
@@ -494,6 +524,11 @@
494
524
  <attribute name="id">
495
525
  <data type="ID"/>
496
526
  </attribute>
527
+ <optional>
528
+ <attribute name="unnumbered">
529
+ <data type="boolean"/>
530
+ </attribute>
531
+ </optional>
497
532
  <optional>
498
533
  <attribute name="lang"/>
499
534
  </optional>
@@ -533,6 +568,14 @@
533
568
  <attribute name="id">
534
569
  <data type="ID"/>
535
570
  </attribute>
571
+ <optional>
572
+ <attribute name="unnumbered">
573
+ <data type="boolean"/>
574
+ </attribute>
575
+ </optional>
576
+ <optional>
577
+ <attribute name="alt"/>
578
+ </optional>
536
579
  <optional>
537
580
  <ref name="tname"/>
538
581
  </optional>
@@ -647,6 +690,11 @@
647
690
  <attribute name="id">
648
691
  <data type="ID"/>
649
692
  </attribute>
693
+ <optional>
694
+ <attribute name="unnumbered">
695
+ <data type="boolean"/>
696
+ </attribute>
697
+ </optional>
650
698
  <oneOrMore>
651
699
  <choice>
652
700
  <ref name="formula"/>
@@ -690,6 +738,11 @@
690
738
  <attribute name="id">
691
739
  <data type="ID"/>
692
740
  </attribute>
741
+ <optional>
742
+ <attribute name="unnumbered">
743
+ <data type="boolean"/>
744
+ </attribute>
745
+ </optional>
693
746
  <optional>
694
747
  <ref name="source"/>
695
748
  </optional>
@@ -735,6 +788,20 @@
735
788
  <ref name="bookmark"/>
736
789
  </choice>
737
790
  </define>
791
+ <define name="PureTextElement">
792
+ <choice>
793
+ <text/>
794
+ <ref name="em"/>
795
+ <ref name="strong"/>
796
+ <ref name="sub"/>
797
+ <ref name="sup"/>
798
+ <ref name="tt"/>
799
+ <ref name="keyword"/>
800
+ <ref name="strike"/>
801
+ <ref name="smallcap"/>
802
+ <ref name="br"/>
803
+ </choice>
804
+ </define>
738
805
  <define name="source">
739
806
  <element name="source">
740
807
  <ref name="TypedUri"/>
@@ -742,42 +809,58 @@
742
809
  </define>
743
810
  <define name="em">
744
811
  <element name="em">
745
- <text/>
812
+ <zeroOrMore>
813
+ <ref name="PureTextElement"/>
814
+ </zeroOrMore>
746
815
  </element>
747
816
  </define>
748
817
  <define name="strong">
749
818
  <element name="strong">
750
- <text/>
819
+ <zeroOrMore>
820
+ <ref name="PureTextElement"/>
821
+ </zeroOrMore>
751
822
  </element>
752
823
  </define>
753
824
  <define name="tt">
754
825
  <element name="tt">
755
- <text/>
826
+ <zeroOrMore>
827
+ <ref name="PureTextElement"/>
828
+ </zeroOrMore>
756
829
  </element>
757
830
  </define>
758
831
  <define name="keyword">
759
832
  <element name="keyword">
760
- <text/>
833
+ <zeroOrMore>
834
+ <ref name="PureTextElement"/>
835
+ </zeroOrMore>
761
836
  </element>
762
837
  </define>
763
838
  <define name="sub">
764
839
  <element name="sub">
765
- <text/>
840
+ <zeroOrMore>
841
+ <ref name="PureTextElement"/>
842
+ </zeroOrMore>
766
843
  </element>
767
844
  </define>
768
845
  <define name="sup">
769
846
  <element name="sup">
770
- <text/>
847
+ <zeroOrMore>
848
+ <ref name="PureTextElement"/>
849
+ </zeroOrMore>
771
850
  </element>
772
851
  </define>
773
852
  <define name="strike">
774
853
  <element name="strike">
775
- <text/>
854
+ <zeroOrMore>
855
+ <ref name="PureTextElement"/>
856
+ </zeroOrMore>
776
857
  </element>
777
858
  </define>
778
859
  <define name="smallcap">
779
860
  <element name="smallcap">
780
- <text/>
861
+ <zeroOrMore>
862
+ <ref name="PureTextElement"/>
863
+ </zeroOrMore>
781
864
  </element>
782
865
  </define>
783
866
  <define name="br">
@@ -838,6 +921,9 @@
838
921
  <attribute name="type">
839
922
  <ref name="ReferenceFormat"/>
840
923
  </attribute>
924
+ <optional>
925
+ <attribute name="alt"/>
926
+ </optional>
841
927
  <text/>
842
928
  </element>
843
929
  </define>
@@ -1019,57 +1105,28 @@
1019
1105
  </zeroOrMore>
1020
1106
  </element>
1021
1107
  </define>
1022
- <define name="BibData">
1023
- <optional>
1024
- <attribute name="type">
1025
- <ref name="BibItemType"/>
1026
- </attribute>
1027
- </optional>
1028
- <oneOrMore>
1029
- <ref name="btitle"/>
1030
- </oneOrMore>
1031
- <optional>
1032
- <ref name="formattedref"/>
1033
- </optional>
1034
- <zeroOrMore>
1035
- <ref name="bsource"/>
1036
- </zeroOrMore>
1037
- <zeroOrMore>
1038
- <ref name="docidentifier"/>
1039
- </zeroOrMore>
1040
- <optional>
1041
- <ref name="docnumber"/>
1042
- </optional>
1043
- <zeroOrMore>
1044
- <ref name="bdate"/>
1045
- </zeroOrMore>
1046
- <zeroOrMore>
1047
- <ref name="contributor"/>
1048
- </zeroOrMore>
1049
- <optional>
1050
- <ref name="edition"/>
1051
- </optional>
1052
- <optional>
1053
- <ref name="version"/>
1054
- </optional>
1055
- <zeroOrMore>
1056
- <ref name="biblionote"/>
1057
- </zeroOrMore>
1058
- <zeroOrMore>
1059
- <ref name="language"/>
1060
- </zeroOrMore>
1061
- <zeroOrMore>
1062
- <ref name="script"/>
1063
- </zeroOrMore>
1108
+ <define name="ext">
1109
+ <element name="ext">
1110
+ <ref name="BibDataExtensionType"/>
1111
+ </element>
1112
+ </define>
1113
+ <define name="BibDataExtensionType">
1064
1114
  <optional>
1065
- <ref name="abstract"/>
1115
+ <ref name="doctype"/>
1066
1116
  </optional>
1117
+ </define>
1118
+ <define name="doctype">
1119
+ <element name="doctype">
1120
+ <ref name="DocumentType"/>
1121
+ </element>
1122
+ </define>
1123
+ <define name="DocumentType">
1124
+ <value>document</value>
1125
+ </define>
1126
+ <define name="BibData">
1127
+ <ref name="BibliographicItem"/>
1067
1128
  <optional>
1068
- <ref name="status"/>
1129
+ <ref name="ext"/>
1069
1130
  </optional>
1070
- <ref name="copyright"/>
1071
- <zeroOrMore>
1072
- <ref name="docrelation"/>
1073
- </zeroOrMore>
1074
1131
  </define>
1075
1132
  </grammar>