metanorma-csd 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: f644ef9025cbf62814c65cb4e89c6e603fef9f170134101e83d6762aeece57e6
4
- data.tar.gz: 79c504b76dc635987ac16bcecea69a4ee36a104edbd8b29e7dd470314b1018b6
3
+ metadata.gz: fad49e9bf976a5fe7330afb9b5c2998def3b9e536805ba57e8aaf64a029a90e2
4
+ data.tar.gz: 2ec9392b6249c24b0ed6e2e49b86717aad62e7f30dbe933498e33f082b006481
5
5
  SHA512:
6
- metadata.gz: ff7b7250491bdc8436d661e4fab38e333cbda652351c9f6fc15448b8dd8cd5efe6b14bc2bddef30084f0e6122c420081372bc4b6dd95bcd440f8df5303bcde6f
7
- data.tar.gz: 86b3fa88c88deae6b66b00e779db2cb30e75129852348f383aac06c1d258b395b069c87f3c59cbe0970c6e41921220a85d4457afc5f8e717dcf8f29a4c8a03c8
6
+ metadata.gz: 7e7c06633b4ceb2050b4dbe24b10ca4f54d93bc9ec42d131955ee911d7711296f0999f12d26de9bb3ed2e92d5d82075f982891029970019352f175c3b3db5a4c
7
+ data.tar.gz: c18c3adfc2557af7aa642208eb1f1d8969445b72d7dcf1d681349faa9f58cd31b3ffbf6530ee25b55dfdb57a21fba2419f1e49ed753534bd777c98f9dce0a966
@@ -1,15 +1,20 @@
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
- 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"
9
+ - 2.5
10
+ - 2.4
11
+ - ruby-head
12
+ before_install:
13
+ - nvm install 8
14
+ - npm install -g puppeteer
15
+ - npm install
16
+ - gem install bundler -v 2.0.1
17
+ - bundle update
13
18
  matrix:
14
19
  allow_failures:
15
20
  - rvm: ruby-head
@@ -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 "isodoc/csd/word_convert"
4
4
  require "metanorma/csd"
5
5
  require "asciidoctor/standoc/converter"
6
6
  require "fileutils"
7
+ require_relative "validate"
7
8
  require_relative "validate_section"
8
9
  require_relative "front"
9
10
 
@@ -10,38 +10,6 @@
10
10
  <start>
11
11
  <ref name="csd-standard"/>
12
12
  </start>
13
- <define name="language">
14
- <element name="language">
15
- <value>en</value>
16
- </element>
17
- </define>
18
- <define name="docidentifier">
19
- <element name="docidentifier">
20
- <optional>
21
- <attribute name="type"/>
22
- </optional>
23
- <text/>
24
- </element>
25
- </define>
26
- <define name="btitle">
27
- <element name="title">
28
- <ref name="FormattedString"/>
29
- </element>
30
- </define>
31
- <define name="status">
32
- <element name="status">
33
- <choice>
34
- <value>proposal</value>
35
- <value>working-draft</value>
36
- <value>committee-draft</value>
37
- <value>draft-standard</value>
38
- <value>final-draft</value>
39
- <value>published</value>
40
- <value>withdrawn</value>
41
- <ref name="LocalizedString"/>
42
- </choice>
43
- </element>
44
- </define>
45
13
  <define name="figure">
46
14
  <element name="figure">
47
15
  <attribute name="id">
@@ -74,7 +42,7 @@
74
42
  </choice>
75
43
  </element>
76
44
  </define>
77
- <define name="BibItemType">
45
+ <define name="DocumentType">
78
46
  <choice>
79
47
  <value>directive</value>
80
48
  <value>guide</value>
@@ -87,174 +55,14 @@
87
55
  <value>advisory</value>
88
56
  </choice>
89
57
  </define>
90
- <define name="BibliographicItem">
91
- <optional>
92
- <attribute name="type">
93
- <ref name="BibItemType"/>
94
- </attribute>
95
- </optional>
96
- <optional>
97
- <ref name="fetched"/>
98
- </optional>
99
- <choice>
100
- <oneOrMore>
101
- <ref name="btitle"/>
102
- </oneOrMore>
103
- <ref name="formattedref"/>
104
- </choice>
105
- <zeroOrMore>
106
- <ref name="bsource"/>
107
- </zeroOrMore>
108
- <zeroOrMore>
109
- <ref name="docidentifier"/>
110
- </zeroOrMore>
111
- <optional>
112
- <ref name="docnumber"/>
113
- </optional>
114
- <zeroOrMore>
115
- <ref name="bdate"/>
116
- </zeroOrMore>
117
- <zeroOrMore>
118
- <ref name="contributor"/>
119
- </zeroOrMore>
120
- <optional>
121
- <ref name="edition"/>
122
- </optional>
123
- <optional>
124
- <ref name="version"/>
125
- </optional>
126
- <zeroOrMore>
127
- <ref name="biblionote"/>
128
- </zeroOrMore>
129
- <zeroOrMore>
130
- <ref name="language"/>
131
- </zeroOrMore>
132
- <zeroOrMore>
133
- <ref name="script"/>
134
- </zeroOrMore>
135
- <zeroOrMore>
136
- <ref name="abstract"/>
137
- </zeroOrMore>
138
- <optional>
139
- <ref name="status"/>
140
- </optional>
141
- <optional>
142
- <ref name="copyright"/>
143
- </optional>
144
- <zeroOrMore>
145
- <ref name="docrelation"/>
146
- </zeroOrMore>
147
- <zeroOrMore>
148
- <ref name="series"/>
149
- </zeroOrMore>
150
- <optional>
151
- <ref name="medium"/>
152
- </optional>
153
- <zeroOrMore>
154
- <ref name="bplace"/>
155
- </zeroOrMore>
156
- <zeroOrMore>
157
- <ref name="extent"/>
158
- </zeroOrMore>
159
- <zeroOrMore>
160
- <ref name="accesslocation"/>
161
- </zeroOrMore>
162
- <optional>
163
- <ref name="bclassification"/>
164
- </optional>
165
- <optional>
166
- <ref name="validity"/>
167
- </optional>
168
- <optional>
169
- <ref name="editorialgroup"/>
170
- </optional>
171
- <zeroOrMore>
172
- <ref name="ics"/>
173
- </zeroOrMore>
174
- <optional>
175
- <ref name="allParts"/>
176
- </optional>
177
- </define>
178
- <define name="BibData">
179
- <optional>
180
- <attribute name="type">
181
- <ref name="BibItemType"/>
182
- </attribute>
183
- </optional>
184
- <oneOrMore>
185
- <ref name="btitle"/>
186
- </oneOrMore>
187
- <optional>
188
- <ref name="formattedref"/>
189
- </optional>
190
- <zeroOrMore>
191
- <ref name="bsource"/>
192
- </zeroOrMore>
193
- <zeroOrMore>
194
- <ref name="docidentifier"/>
195
- </zeroOrMore>
196
- <optional>
197
- <ref name="docnumber"/>
198
- </optional>
199
- <zeroOrMore>
200
- <ref name="bdate"/>
201
- </zeroOrMore>
202
- <zeroOrMore>
203
- <ref name="contributor"/>
204
- </zeroOrMore>
205
- <optional>
206
- <ref name="edition"/>
207
- </optional>
58
+ <define name="BibDataExtensionType">
208
59
  <optional>
209
- <ref name="version"/>
210
- </optional>
211
- <zeroOrMore>
212
- <ref name="biblionote"/>
213
- </zeroOrMore>
214
- <zeroOrMore>
215
- <ref name="language"/>
216
- </zeroOrMore>
217
- <zeroOrMore>
218
- <ref name="script"/>
219
- </zeroOrMore>
220
- <zeroOrMore>
221
- <ref name="abstract"/>
222
- </zeroOrMore>
223
- <optional>
224
- <ref name="status"/>
225
- </optional>
226
- <ref name="copyright"/>
227
- <zeroOrMore>
228
- <ref name="docrelation"/>
229
- </zeroOrMore>
230
- <zeroOrMore>
231
- <ref name="series"/>
232
- </zeroOrMore>
233
- <optional>
234
- <ref name="medium"/>
235
- </optional>
236
- <zeroOrMore>
237
- <ref name="bplace"/>
238
- </zeroOrMore>
239
- <zeroOrMore>
240
- <ref name="extent"/>
241
- </zeroOrMore>
242
- <zeroOrMore>
243
- <ref name="accesslocation"/>
244
- </zeroOrMore>
245
- <optional>
246
- <ref name="bclassification"/>
247
- </optional>
248
- <optional>
249
- <ref name="validity"/>
60
+ <ref name="doctype"/>
250
61
  </optional>
251
62
  <ref name="editorialgroup"/>
252
63
  <zeroOrMore>
253
64
  <ref name="ics"/>
254
65
  </zeroOrMore>
255
- <optional>
256
- <ref name="allParts"/>
257
- </optional>
258
66
  </define>
259
67
  <define name="editorialgroup">
260
68
  <element name="editorialgroup">
@@ -278,6 +86,9 @@
278
86
  <zeroOrMore>
279
87
  <ref name="termdocsource"/>
280
88
  </zeroOrMore>
89
+ <optional>
90
+ <ref name="boilerplate"/>
91
+ </optional>
281
92
  <ref name="preface"/>
282
93
  <oneOrMore>
283
94
  <ref name="sections"/>
@@ -27,6 +27,7 @@ module Asciidoctor
27
27
  end
28
28
 
29
29
  def metadata_committee(node, xml)
30
+ return unless node.attr("technical-committee")
30
31
  xml.editorialgroup do |a|
31
32
  a.technical_committee node.attr("technical-committee"),
32
33
  **attr_code(type: node.attr("technical-committee-type"))
@@ -44,7 +45,7 @@ module Asciidoctor
44
45
  unless status && ::Metanorma::Csd::DOCSTATUS.keys.include?(status)
45
46
  warn "#{status} is not a legal status"
46
47
  end
47
- xml.status(**{ format: "plain" }) { |s| s << status }
48
+ super
48
49
  end
49
50
 
50
51
  def prefix_id(node)
@@ -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>