metanorma-m3d 1.1.5 → 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: 41e24693933de2a6ec176e4c61da0b2a89139544c8f3bb57fc6cf4be911cd812
4
- data.tar.gz: 5986a9c10b9b4c9c74d6eae91b6ee380013986a1be0204345b531ac28b3187f9
3
+ metadata.gz: ff9d28450d84a2c5acfd5b9c83778985de8e668f798033c980137e10db006e8c
4
+ data.tar.gz: 91af68190410568f07111bb7b167fba8851c8a72b1ca372dd07338ab11f44116
5
5
  SHA512:
6
- metadata.gz: db2b4363d8d6310c3c5924b782b69cbbc15ed4995863bb96627e59c5e347a885a9dfaaaff063121ce9e52639c05f5b04bd975517c2209bab36c3a602a03b2756
7
- data.tar.gz: c298f1510b6c7f1ad1620f57d5db05539499733572f5fb4cabde37e59a552115a6dde401fda5b944137a950849bf497dba887aa96538d324df202bf9dce1afc5
6
+ metadata.gz: 3921bcb9ed8b9a13b0455d4999b2ba56b895565d38e8e5c6438b77426c50acb2a489f04c34e1f2f94cdde427a230205f096f2df550775b4b246881dd56cb3281
7
+ data.tar.gz: 5d5093ef354e1ee7b62da08e443f19dcdd06939bfde24c35e6954e5875a5bd2e6db78a1f6b32714247db91017082a3c224e03338ec74bfa73823caa13eea782f
@@ -1,3 +1,5 @@
1
+ # Auto-generated !!! Do not edit it manually
2
+ # use ci-master https://github.com/metanorma/metanorma-build-scripts
1
3
  language: ruby
2
4
  cache: bundler
3
5
  os:
@@ -6,9 +8,11 @@ os:
6
8
  rvm:
7
9
  - 2.5
8
10
  - 2.4
9
- - 2.3
10
11
  - ruby-head
11
- before_install:
12
+ before_install:
13
+ - nvm install 8
14
+ - npm install -g puppeteer
15
+ - npm install
12
16
  - gem install bundler -v 2.0.1
13
17
  - bundle update
14
18
  matrix:
@@ -1,3 +1,5 @@
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
 
3
5
  cache:
@@ -7,7 +9,6 @@ environment:
7
9
  matrix:
8
10
  - RUBY_VERSION: 25
9
11
  - RUBY_VERSION: 24
10
- - RUBY_VERSION: 23
11
12
  - RUBY_VERSION: _trunk
12
13
 
13
14
  matrix:
@@ -20,6 +21,7 @@ install:
20
21
 
21
22
  build_script:
22
23
  - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
24
+ - set GIT_TERMINAL_PROMPT=0
23
25
  - bundle config --local path vendor/bundle
24
26
  - bundle update
25
27
  - bundle install
@@ -30,4 +32,4 @@ before_test:
30
32
  - bundle -v
31
33
 
32
34
  test_script:
33
- - bundle exec rake
35
+ - bundle exec rake
@@ -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>
@@ -810,6 +831,9 @@
810
831
  </define>
811
832
  <define name="biblionote">
812
833
  <element name="note">
834
+ <optional>
835
+ <attribute name="type"/>
836
+ </optional>
813
837
  <ref name="FormattedString"/>
814
838
  </element>
815
839
  </define>
@@ -5,6 +5,7 @@ require "isodoc/m3d/word_convert"
5
5
  require "isodoc/m3d/pdf_convert"
6
6
  require "asciidoctor/standoc/converter"
7
7
  require "fileutils"
8
+ require_relative "./validate.rb"
8
9
 
9
10
  module Asciidoctor
10
11
  module M3d
@@ -20,7 +21,8 @@ module Asciidoctor
20
21
  xml.contributor do |c|
21
22
  c.role **{ type: "author" }
22
23
  c.organization do |a|
23
- a.name "Ribose"
24
+ a.name "Messaging Malware and Mobile Anti-Abuse Working Group"
25
+ a.abbreviation "M3AAWG"
24
26
  end
25
27
  end
26
28
  end
@@ -29,12 +31,14 @@ module Asciidoctor
29
31
  xml.contributor do |c|
30
32
  c.role **{ type: "publisher" }
31
33
  c.organization do |a|
32
- a.name "Ribose"
34
+ a.name "Messaging Malware and Mobile Anti-Abuse Working Group"
35
+ a.abbreviation "M3AAWG"
33
36
  end
34
37
  end
35
38
  end
36
39
 
37
40
  def metadata_committee(node, xml)
41
+ return unless node.attr("technical-committee")
38
42
  xml.editorialgroup do |a|
39
43
  a.committee node.attr("technical-committee"),
40
44
  **attr_code(type: node.attr("technical-committee-type"))
@@ -47,10 +51,6 @@ module Asciidoctor
47
51
  end
48
52
  end
49
53
 
50
- def metadata_status(node, xml)
51
- xml.status(**{ format: "plain" }) { |s| s << node.attr("status") }
52
- end
53
-
54
54
  def metadata_id(node, xml)
55
55
  docstatus = node.attr("status")
56
56
  dn = node.attr("docnumber")
@@ -70,7 +70,8 @@ module Asciidoctor
70
70
  c.from from
71
71
  c.owner do |owner|
72
72
  owner.organization do |o|
73
- o.name "Ribose"
73
+ o.name "Messaging Malware and Mobile Anti-Abuse Working Group"
74
+ o.abbreviation "M3AAWG"
74
75
  end
75
76
  end
76
77
  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>
@@ -868,6 +921,9 @@
868
921
  <attribute name="type">
869
922
  <ref name="ReferenceFormat"/>
870
923
  </attribute>
924
+ <optional>
925
+ <attribute name="alt"/>
926
+ </optional>
871
927
  <text/>
872
928
  </element>
873
929
  </define>
@@ -1049,57 +1105,28 @@
1049
1105
  </zeroOrMore>
1050
1106
  </element>
1051
1107
  </define>
1052
- <define name="BibData">
1053
- <optional>
1054
- <attribute name="type">
1055
- <ref name="BibItemType"/>
1056
- </attribute>
1057
- </optional>
1058
- <oneOrMore>
1059
- <ref name="btitle"/>
1060
- </oneOrMore>
1061
- <optional>
1062
- <ref name="formattedref"/>
1063
- </optional>
1064
- <zeroOrMore>
1065
- <ref name="bsource"/>
1066
- </zeroOrMore>
1067
- <zeroOrMore>
1068
- <ref name="docidentifier"/>
1069
- </zeroOrMore>
1070
- <optional>
1071
- <ref name="docnumber"/>
1072
- </optional>
1073
- <zeroOrMore>
1074
- <ref name="bdate"/>
1075
- </zeroOrMore>
1076
- <zeroOrMore>
1077
- <ref name="contributor"/>
1078
- </zeroOrMore>
1079
- <optional>
1080
- <ref name="edition"/>
1081
- </optional>
1082
- <optional>
1083
- <ref name="version"/>
1084
- </optional>
1085
- <zeroOrMore>
1086
- <ref name="biblionote"/>
1087
- </zeroOrMore>
1088
- <zeroOrMore>
1089
- <ref name="language"/>
1090
- </zeroOrMore>
1091
- <zeroOrMore>
1092
- <ref name="script"/>
1093
- </zeroOrMore>
1108
+ <define name="ext">
1109
+ <element name="ext">
1110
+ <ref name="BibDataExtensionType"/>
1111
+ </element>
1112
+ </define>
1113
+ <define name="BibDataExtensionType">
1094
1114
  <optional>
1095
- <ref name="abstract"/>
1115
+ <ref name="doctype"/>
1096
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"/>
1097
1128
  <optional>
1098
- <ref name="status"/>
1129
+ <ref name="ext"/>
1099
1130
  </optional>
1100
- <ref name="copyright"/>
1101
- <zeroOrMore>
1102
- <ref name="docrelation"/>
1103
- </zeroOrMore>
1104
1131
  </define>
1105
1132
  </grammar>
@@ -4,28 +4,6 @@
4
4
  <start>
5
5
  <ref name="iso-standard"/>
6
6
  </start>
7
- <define name="script">
8
- <element name="script">
9
- <value>Latn</value>
10
- </element>
11
- </define>
12
- <!-- add type to docidentifier in isodoc? -->
13
- <define name="docidentifier">
14
- <element name="docidentifier">
15
- <optional>
16
- <attribute name="type"/>
17
- </optional>
18
- <choice>
19
- <text/>
20
- <group>
21
- <ref name="documentnumber"/>
22
- <optional>
23
- <ref name="tc-documentnumber"/>
24
- </optional>
25
- </group>
26
- </choice>
27
- </element>
28
- </define>
29
7
  <define name="organization">
30
8
  <element name="organization">
31
9
  <ref name="orgname"/>
@@ -55,190 +33,24 @@
55
33
  </optional>
56
34
  </element>
57
35
  </define>
58
- <define name="BibliographicItem">
59
- <optional>
60
- <attribute name="type">
61
- <ref name="BibItemType"/>
62
- </attribute>
63
- </optional>
64
- <optional>
65
- <ref name="fetched"/>
66
- </optional>
67
- <choice>
68
- <oneOrMore>
69
- <ref name="btitle"/>
70
- </oneOrMore>
71
- <ref name="formattedref"/>
72
- </choice>
73
- <zeroOrMore>
74
- <ref name="bsource"/>
75
- </zeroOrMore>
76
- <zeroOrMore>
77
- <ref name="docidentifier"/>
78
- </zeroOrMore>
79
- <optional>
80
- <ref name="docnumber"/>
81
- </optional>
82
- <zeroOrMore>
83
- <ref name="bdate"/>
84
- </zeroOrMore>
85
- <zeroOrMore>
86
- <ref name="contributor"/>
87
- </zeroOrMore>
88
- <optional>
89
- <ref name="edition"/>
90
- </optional>
91
- <optional>
92
- <ref name="version"/>
93
- </optional>
94
- <zeroOrMore>
95
- <ref name="biblionote"/>
96
- </zeroOrMore>
97
- <zeroOrMore>
98
- <ref name="language"/>
99
- </zeroOrMore>
100
- <zeroOrMore>
101
- <ref name="script"/>
102
- </zeroOrMore>
103
- <zeroOrMore>
104
- <ref name="abstract"/>
105
- </zeroOrMore>
106
- <optional>
107
- <ref name="status"/>
108
- </optional>
109
- <optional>
110
- <ref name="copyright"/>
111
- </optional>
112
- <zeroOrMore>
113
- <ref name="docrelation"/>
114
- </zeroOrMore>
115
- <zeroOrMore>
116
- <ref name="series"/>
117
- </zeroOrMore>
118
- <optional>
119
- <ref name="medium"/>
120
- </optional>
121
- <zeroOrMore>
122
- <ref name="bplace"/>
123
- </zeroOrMore>
124
- <zeroOrMore>
125
- <ref name="extent"/>
126
- </zeroOrMore>
127
- <zeroOrMore>
128
- <ref name="accesslocation"/>
129
- </zeroOrMore>
130
- <optional>
131
- <ref name="bclassification"/>
132
- </optional>
133
- <optional>
134
- <ref name="validity"/>
135
- </optional>
136
- <optional>
137
- <ref name="editorialgroup"/>
138
- </optional>
139
- <zeroOrMore>
140
- <ref name="ics"/>
141
- </zeroOrMore>
142
- <optional>
143
- <ref name="allParts"/>
144
- </optional>
145
- </define>
146
- <define name="BibData">
147
- <optional>
148
- <attribute name="type">
149
- <ref name="BibItemType"/>
150
- </attribute>
151
- </optional>
152
- <oneOrMore>
153
- <ref name="btitle"/>
154
- </oneOrMore>
155
- <optional>
156
- <ref name="formattedref"/>
157
- </optional>
158
- <zeroOrMore>
159
- <ref name="bsource"/>
160
- </zeroOrMore>
161
- <zeroOrMore>
162
- <ref name="docidentifier"/>
163
- </zeroOrMore>
164
- <optional>
165
- <ref name="docnumber"/>
166
- </optional>
167
- <zeroOrMore>
168
- <ref name="bdate"/>
169
- </zeroOrMore>
170
- <zeroOrMore>
171
- <ref name="contributor"/>
172
- </zeroOrMore>
173
- <optional>
174
- <ref name="edition"/>
175
- </optional>
176
- <optional>
177
- <ref name="version"/>
178
- </optional>
179
- <zeroOrMore>
180
- <ref name="biblionote"/>
181
- </zeroOrMore>
182
- <zeroOrMore>
183
- <ref name="language"/>
184
- </zeroOrMore>
185
- <zeroOrMore>
186
- <ref name="script"/>
187
- </zeroOrMore>
188
- <zeroOrMore>
189
- <ref name="abstract"/>
190
- </zeroOrMore>
191
- <optional>
192
- <ref name="status"/>
193
- </optional>
194
- <ref name="copyright"/>
195
- <zeroOrMore>
196
- <ref name="docrelation"/>
197
- </zeroOrMore>
198
- <zeroOrMore>
199
- <ref name="series"/>
200
- </zeroOrMore>
201
- <optional>
202
- <ref name="medium"/>
203
- </optional>
204
- <zeroOrMore>
205
- <ref name="bplace"/>
206
- </zeroOrMore>
207
- <zeroOrMore>
208
- <ref name="extent"/>
209
- </zeroOrMore>
210
- <zeroOrMore>
211
- <ref name="accesslocation"/>
212
- </zeroOrMore>
213
- <optional>
214
- <ref name="bclassification"/>
215
- </optional>
36
+ <define name="BibDataExtensionType">
216
37
  <optional>
217
- <ref name="validity"/>
38
+ <ref name="doctype"/>
218
39
  </optional>
219
40
  <ref name="editorialgroup"/>
220
41
  <zeroOrMore>
221
42
  <ref name="ics"/>
222
43
  </zeroOrMore>
223
- <optional>
224
- <ref name="allParts"/>
225
- </optional>
44
+ <ref name="structuredidentifier"/>
226
45
  </define>
227
46
  <define name="bdate">
228
47
  <element name="date">
229
48
  <attribute name="type">
230
49
  <choice>
231
- <value>published</value>
232
- <value>accessed</value>
233
- <value>created</value>
234
- <value>implemented</value>
235
- <value>obsoleted</value>
236
- <value>confirmed</value>
237
- <value>updated</value>
238
- <value>issued</value>
50
+ <ref name="BibliographicDateType"/>
51
+ <text/>
239
52
  </choice>
240
53
  </attribute>
241
- <!-- ( ( bfrom, bto? ) | date_on ) -->
242
54
  <choice>
243
55
  <group>
244
56
  <element name="from">
@@ -259,47 +71,6 @@
259
71
  </choice>
260
72
  </element>
261
73
  </define>
262
- <define name="biblionote">
263
- <element name="note">
264
- <optional>
265
- <!-- Biblio date notes can be footnoted -->
266
- <attribute name="reference"/>
267
- </optional>
268
- <ref name="FormattedString"/>
269
- </element>
270
- </define>
271
- <define name="status">
272
- <element name="status">
273
- <choice>
274
- <ref name="FormattedString"/>
275
- <group>
276
- <ref name="stage"/>
277
- <optional>
278
- <ref name="substage"/>
279
- </optional>
280
- <optional>
281
- <ref name="iteration"/>
282
- </optional>
283
- </group>
284
- </choice>
285
- </element>
286
- </define>
287
- <define name="btitle">
288
- <element name="title">
289
- <choice>
290
- <ref name="FormattedString"/>
291
- <group>
292
- <optional>
293
- <ref name="title-intro"/>
294
- </optional>
295
- <ref name="title-main"/>
296
- <optional>
297
- <ref name="title-part"/>
298
- </optional>
299
- </group>
300
- </choice>
301
- </element>
302
- </define>
303
74
  <define name="sections">
304
75
  <element name="sections">
305
76
  <ref name="clause"/>
@@ -744,6 +515,16 @@
744
515
  </optional>
745
516
  </element>
746
517
  </define>
518
+ <define name="DocumentType">
519
+ <choice>
520
+ <value>international-standard</value>
521
+ <value>technical-specification</value>
522
+ <value>technical-report</value>
523
+ <value>publicly-available-specification</value>
524
+ <value>international-workshop-agreement</value>
525
+ <value>guide</value>
526
+ </choice>
527
+ </define>
747
528
  </include>
748
529
  <!-- end overrides -->
749
530
  <!--
@@ -756,6 +537,9 @@
756
537
  <zeroOrMore>
757
538
  <ref name="termdocsource"/>
758
539
  </zeroOrMore>
540
+ <optional>
541
+ <ref name="boilerplate"/>
542
+ </optional>
759
543
  <ref name="preface"/>
760
544
  <oneOrMore>
761
545
  <ref name="sections"/>
@@ -776,16 +560,6 @@
776
560
  </oneOrMore>
777
561
  </element>
778
562
  </define>
779
- <define name="BibItemType" combine="choice">
780
- <choice>
781
- <value>international-standard</value>
782
- <value>technical-specification</value>
783
- <value>technical-report</value>
784
- <value>publicly-available-specification</value>
785
- <value>international-workshop-agreement</value>
786
- <value>guide</value>
787
- </choice>
788
- </define>
789
563
  <define name="editorialgroup">
790
564
  <element name="editorialgroup">
791
565
  <oneOrMore>
@@ -817,38 +591,17 @@
817
591
  <ref name="Content-Section"/>
818
592
  </element>
819
593
  </define>
820
- <define name="stage">
821
- <element name="stage">
822
- <choice>
823
- <value>00</value>
824
- <value>10</value>
825
- <value>20</value>
826
- <value>30</value>
827
- <value>40</value>
828
- <value>50</value>
829
- <value>60</value>
830
- <value>90</value>
831
- <value>95</value>
832
- </choice>
833
- </element>
834
- </define>
835
- <define name="substage">
836
- <element name="substage">
837
- <choice>
838
- <value>00</value>
839
- <value>20</value>
840
- <value>60</value>
841
- <value>90</value>
842
- <value>92</value>
843
- <value>93</value>
844
- <value>98</value>
845
- <value>99</value>
846
- </choice>
847
- </element>
848
- </define>
849
- <define name="iteration">
850
- <element name="iteration">
851
- <data type="int"/>
594
+ <define name="structuredidentifier">
595
+ <element name="structuredidentifier">
596
+ <optional>
597
+ <attribute name="type"/>
598
+ </optional>
599
+ <group>
600
+ <ref name="documentnumber"/>
601
+ <optional>
602
+ <ref name="tc-documentnumber"/>
603
+ </optional>
604
+ </group>
852
605
  </element>
853
606
  </define>
854
607
  <define name="documentnumber">
@@ -902,26 +655,6 @@
902
655
  <text/>
903
656
  </element>
904
657
  </define>
905
- <define name="title-intro">
906
- <element name="title-intro">
907
- <ref name="FormattedString"/>
908
- </element>
909
- </define>
910
- <define name="title-main">
911
- <element name="title-main">
912
- <ref name="FormattedString"/>
913
- </element>
914
- </define>
915
- <define name="title-part">
916
- <element name="title-part">
917
- <ref name="FormattedString"/>
918
- </element>
919
- </define>
920
- <define name="allParts">
921
- <element name="allparts">
922
- <data type="boolean"/>
923
- </element>
924
- </define>
925
658
  <define name="clause-hanging-paragraph-with-footnote">
926
659
  <element name="clause">
927
660
  <optional>
@@ -9,19 +9,6 @@
9
9
  <start>
10
10
  <ref name="m3d-standard"/>
11
11
  </start>
12
- <define name="docidentifier">
13
- <element name="docidentifier">
14
- <optional>
15
- <attribute name="type"/>
16
- </optional>
17
- <text/>
18
- </element>
19
- </define>
20
- <define name="btitle">
21
- <element name="title">
22
- <ref name="FormattedString"/>
23
- </element>
24
- </define>
25
12
  <define name="figure">
26
13
  <element name="figure">
27
14
  <attribute name="id">
@@ -54,21 +41,7 @@
54
41
  </choice>
55
42
  </element>
56
43
  </define>
57
- <define name="status">
58
- <element name="status">
59
- <choice>
60
- <value>proposal</value>
61
- <value>working-draft</value>
62
- <value>committee-draft</value>
63
- <value>draft-standard</value>
64
- <value>final-draft</value>
65
- <value>published</value>
66
- <value>withdrawn</value>
67
- <ref name="LocalizedString"/>
68
- </choice>
69
- </element>
70
- </define>
71
- <define name="BibItemType" combine="choice">
44
+ <define name="DocumentType">
72
45
  <choice>
73
46
  <value>guidance</value>
74
47
  <value>proposal</value>
@@ -106,6 +79,9 @@
106
79
  <zeroOrMore>
107
80
  <ref name="termdocsource"/>
108
81
  </zeroOrMore>
82
+ <optional>
83
+ <ref name="boilerplate"/>
84
+ </optional>
109
85
  <ref name="preface"/>
110
86
  <oneOrMore>
111
87
  <ref name="sections"/>
@@ -25,6 +25,11 @@
25
25
  <ref name="ObligationType"/>
26
26
  </attribute>
27
27
  </optional>
28
+ <optional>
29
+ <attribute name="unnumbered">
30
+ <data type="boolean"/>
31
+ </attribute>
32
+ </optional>
28
33
  <attribute name="id">
29
34
  <data type="ID"/>
30
35
  </attribute>
@@ -0,0 +1,22 @@
1
+ module Asciidoctor
2
+ module M3d
3
+ class Converter < Standoc::Converter
4
+ def content_validate(doc)
5
+ super
6
+ bibdata_validate(doc.root)
7
+ end
8
+
9
+ def bibdata_validate(doc)
10
+ stage_validate(doc)
11
+ end
12
+
13
+ def stage_validate(xmldoc)
14
+ stage = xmldoc&.at("//bibdata/status/stage")&.text
15
+ %w(proposal working-draft committee-draft draft-standard final-draft
16
+ published withdrawn).include? stage or
17
+ warn "Document Attributes: #{stage} is not a recognised status"
18
+ end
19
+ end
20
+ end
21
+ end
22
+
@@ -17,7 +17,7 @@ module IsoDoc
17
17
 
18
18
  def annex_name(annex, name, div)
19
19
  div.h1 **{ class: "Annex" } do |t|
20
- t << "#{get_anchors[annex['id']][:label]} "
20
+ t << "#{anchor(annex['id'], :label)} "
21
21
  t.br
22
22
  t.b do |b|
23
23
  name&.children&.each { |c2| parse(c2, b) }
@@ -1,5 +1,5 @@
1
1
  <div class="document-stage-band" id="working-draft-band">
2
- <p class="document-stage">{{ status }}</p>
2
+ <p class="document-stage">{{ stage }}</p>
3
3
  </div>
4
4
 
5
5
  <div class="document-type-band" id="standard-band">
@@ -51,7 +51,7 @@
51
51
  </div>
52
52
 
53
53
  <div class="coverpage-stage-block" >
54
- <span class="coverpage-maturity" id="{{ status | replace: ' ', '-' | downcase }}">{% if unpublished %}{{ status }}{% endif %}</span>
54
+ <span class="coverpage-maturity" id="{{ stage | replace: ' ', '-' | downcase }}">{% if unpublished %}{{ stage }}{% endif %}</span>
55
55
  </div>
56
56
 
57
57
  {% if unpublished %}
@@ -22,7 +22,7 @@ margin-left:4.25pt;margin-right:4.25pt'>
22
22
 
23
23
  <p class="MsoNormal" align="center" style='text-align:center;border:none;
24
24
  mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt'><span
25
- lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ status }}{% endif %}<o:p></o:p></span></p>
25
+ lang="EN-GB" style='font-size:40.0pt'>{% if unpublished %}{{ stage }}{% endif %}<o:p></o:p></span></p>
26
26
 
27
27
  </div>
28
28
 
@@ -7,7 +7,6 @@ module IsoDoc
7
7
  class Metadata < IsoDoc::Metadata
8
8
  def initialize(lang, script, labels)
9
9
  super
10
- set(:status, "XXX")
11
10
  end
12
11
 
13
12
  def title(isoxml, _out)
@@ -21,7 +20,7 @@ module IsoDoc
21
20
 
22
21
  def author(isoxml, _out)
23
22
  set(:tc, nil)
24
- tc = isoxml.at(ns("//bibdata/editorialgroup/committee"))
23
+ tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
25
24
  set(:tc, tc.text) if tc
26
25
  end
27
26
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3d
3
- VERSION = "1.1.5"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -26,6 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.bindir = "exe"
27
27
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
29
30
 
30
31
  spec.add_dependency "asciidoctor", "~> 1.5.7"
31
32
  spec.add_dependency "asciimath"
@@ -37,8 +38,8 @@ Gem::Specification.new do |spec|
37
38
  spec.add_dependency "thread_safe"
38
39
  spec.add_dependency "uuidtools"
39
40
 
40
- spec.add_dependency "metanorma-standoc", "~> 1.1.0"
41
- spec.add_dependency "isodoc", "~> 0.9.0"
41
+ spec.add_dependency "metanorma-standoc", "~> 1.2.0"
42
+ spec.add_dependency "isodoc", "~> 0.10.0"
42
43
 
43
44
  spec.add_development_dependency "bundler", "~> 2.0.1"
44
45
  spec.add_development_dependency "byebug", "~> 9.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-20 00:00:00.000000000 Z
11
+ date: 2019-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -142,28 +142,28 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.1.0
145
+ version: 1.2.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.1.0
152
+ version: 1.2.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: isodoc
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.9.0
159
+ version: 0.10.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.9.0
166
+ version: 0.10.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: bundler
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -350,6 +350,7 @@ files:
350
350
  - lib/asciidoctor/m3d/isostandard.rng
351
351
  - lib/asciidoctor/m3d/m3d.rng
352
352
  - lib/asciidoctor/m3d/reqt.rng
353
+ - lib/asciidoctor/m3d/validate.rb
353
354
  - lib/isodoc/m3d/base_convert.rb
354
355
  - lib/isodoc/m3d/html/dots-w@2x.png
355
356
  - lib/isodoc/m3d/html/dots@2x.png
@@ -386,7 +387,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
386
387
  requirements:
387
388
  - - ">="
388
389
  - !ruby/object:Gem::Version
389
- version: '0'
390
+ version: 2.4.0
390
391
  required_rubygems_version: !ruby/object:Gem::Requirement
391
392
  requirements:
392
393
  - - ">="
@@ -394,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
395
  version: '0'
395
396
  requirements: []
396
397
  rubyforge_project:
397
- rubygems_version: 2.7.6
398
+ rubygems_version: 2.7.7
398
399
  signing_key:
399
400
  specification_version: 4
400
401
  summary: metanorma-m3d lets you write M3AAWG Documents (M3D) in AsciiDoc.