metanorma-csd 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +17 -8
- data/lib/asciidoctor/csd/biblio.rng +12 -0
- data/lib/asciidoctor/csd/converter.rb +37 -4
- data/lib/asciidoctor/csd/csd.rng +178 -3
- data/lib/asciidoctor/csd/isostandard.rng +10 -5
- data/lib/isodoc/csd/html/csd.scss +1 -1
- data/lib/isodoc/csd/html/htmlstyle.scss +4 -4
- data/lib/isodoc/csd/html/wordstyle.scss +67 -0
- data/lib/metanorma/csd/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaad68981589cae6455b1b94677358069a961ffb6e62ab91a69b3860dbeccda4
|
4
|
+
data.tar.gz: 24185506cde18d7b892bdac238e7291eb39630db580519edef434829ff1f97e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f23d50bf746f07baa2d5f32e6062d6200aa1e78b192ee1344a821263131ff7c92d096518491ffa6a989840579e960237d3ccc3846860335730bfcb2c31ffdcb
|
7
|
+
data.tar.gz: 47014826ba3126644bb020068011749b522df699d6884c25bf93bb8ac4ef0cf55637ecdfe188c8504f0dc034462b4c9e98db1451082c81a1aa3c2e5d592125c3
|
data/README.adoc
CHANGED
@@ -132,15 +132,19 @@ the document was issued
|
|
132
132
|
(mandatory). (The first line of the AsciiDoc document, which contains the title
|
133
133
|
introduced with `=`, is ignored)
|
134
134
|
|
135
|
-
`:doctype:`:: The document type (see
|
136
|
-
CSD
|
135
|
+
`:doctype:`:: The document type (see _CSD deliverables: The different types of
|
136
|
+
CSD publications_) (mandatory). Note that the document types are reflected in the
|
137
|
+
document identifier. The permitted types are:
|
137
138
|
+
|
138
139
|
--
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
report::
|
140
|
+
standard:: Standard (no suffix on identifier; e.g. `CC 1`)
|
141
|
+
directive:: Directive (suffix `DIR`, e.g. `CC/DIR 1`)
|
142
|
+
guide:: Guide (suffix `Guide`)
|
143
|
+
specification:: Specification (suffix `S`)
|
144
|
+
report:: Report (suffix `R`)
|
145
|
+
administrative:: Administrative (suffix `A`)
|
146
|
+
amendment:: Amendment (suffix `Amd`)
|
147
|
+
technical corrigendum:: Technical Corrigendum (suffix `Cor`)
|
144
148
|
--
|
145
149
|
|
146
150
|
`:status:``:: The document status. The permitted types are: `proposal`,
|
@@ -148,7 +152,12 @@ report:: report
|
|
148
152
|
`published`, `withdrawn`.
|
149
153
|
|
150
154
|
`:technical-committee:`:: The name of the relevant CSD technical committee
|
151
|
-
|
155
|
+
`:technical-committee-type:`:: The type of the relevant CSD technical committee
|
156
|
+
(mandatory): `technical`, `provisional`
|
157
|
+
`:technical-committee_2:`:: The name of a second relevant CSD technical committee;
|
158
|
+
other committees are added as `_3`, `_4`...
|
159
|
+
`:technical-committee-type_2:`:: The type of a second relevant CSD technical committee;
|
160
|
+
other committees are added as `_3`, `_4`...
|
152
161
|
|
153
162
|
`:language:` :: The language of the document (only `en` for now) (mandatory)
|
154
163
|
|
@@ -259,6 +259,9 @@
|
|
259
259
|
</define>
|
260
260
|
<define name="uri">
|
261
261
|
<element name="uri">
|
262
|
+
<optional>
|
263
|
+
<attribute name="type"/>
|
264
|
+
</optional>
|
262
265
|
<data type="anyURI"/>
|
263
266
|
</element>
|
264
267
|
</define>
|
@@ -444,6 +447,9 @@
|
|
444
447
|
<ref name="BibItemType"/>
|
445
448
|
</attribute>
|
446
449
|
</optional>
|
450
|
+
<optional>
|
451
|
+
<ref name="fetched"/>
|
452
|
+
</optional>
|
447
453
|
<choice>
|
448
454
|
<oneOrMore>
|
449
455
|
<ref name="btitle"/>
|
@@ -523,6 +529,11 @@
|
|
523
529
|
<ref name="FormattedString"/>
|
524
530
|
</element>
|
525
531
|
</define>
|
532
|
+
<define name="fetched">
|
533
|
+
<element name="fetched">
|
534
|
+
<data type="dateTime"/>
|
535
|
+
</element>
|
536
|
+
</define>
|
526
537
|
<define name="validity">
|
527
538
|
<element name="validity">
|
528
539
|
<optional>
|
@@ -599,6 +610,7 @@
|
|
599
610
|
<value>issued</value>
|
600
611
|
<value>transmitted</value>
|
601
612
|
<value>copied</value>
|
613
|
+
<value>unchanged</value>
|
602
614
|
</choice>
|
603
615
|
</attribute>
|
604
616
|
<choice>
|
@@ -2,6 +2,7 @@ require "asciidoctor"
|
|
2
2
|
require "isodoc/csd/html_convert"
|
3
3
|
require "isodoc/csd/word_convert"
|
4
4
|
require "asciidoctor/standoc/converter"
|
5
|
+
require "fileutils"
|
5
6
|
|
6
7
|
module Asciidoctor
|
7
8
|
module Csd
|
@@ -39,6 +40,12 @@ module Asciidoctor
|
|
39
40
|
xml.editorialgroup do |a|
|
40
41
|
a.technical_committee node.attr("technical-committee"),
|
41
42
|
**attr_code(type: node.attr("technical-committee-type"))
|
43
|
+
i = 2
|
44
|
+
while node.attr("technical-committee_#{i}") do
|
45
|
+
a.technical_committee node.attr("technical-committee_#{i}"),
|
46
|
+
**attr_code(type: node.attr("technical-committee-type_#{i}"))
|
47
|
+
i += 1
|
48
|
+
end
|
42
49
|
end
|
43
50
|
end
|
44
51
|
|
@@ -50,12 +57,37 @@ module Asciidoctor
|
|
50
57
|
end
|
51
58
|
end
|
52
59
|
|
60
|
+
DOCSUFFIX = {
|
61
|
+
"standard": "",
|
62
|
+
"directive": "DIR",
|
63
|
+
"guide": "Guide",
|
64
|
+
"specification": "S",
|
65
|
+
"report": "R",
|
66
|
+
"amendment": "Amd",
|
67
|
+
"technical corrigendum": "Cor",
|
68
|
+
"administrative": "A",
|
69
|
+
}
|
70
|
+
|
53
71
|
def metadata_status(node, xml)
|
54
|
-
|
72
|
+
status = node.attr("status")
|
73
|
+
unless status && %w(FDS DS CD WD published).include?(status)
|
74
|
+
warn "#{status} is not a legal status"
|
75
|
+
end
|
76
|
+
xml.status(**{ format: "plain" }) { |s| s << status }
|
55
77
|
end
|
56
78
|
|
57
79
|
def metadata_id(node, xml)
|
58
|
-
|
80
|
+
id = node.attr("docnumber") || "???"
|
81
|
+
typesuffix = DOCSUFFIX[doctype(node)]
|
82
|
+
prefix = "CC"
|
83
|
+
prefix += "/#{typesuffix}" if typesuffix
|
84
|
+
status = node.attr("status")
|
85
|
+
status = nil if status == "published"
|
86
|
+
prefix += "/#{status}" if status
|
87
|
+
year = node.attr("copyright-year")
|
88
|
+
id = prefix + " " + id
|
89
|
+
id += ":#{year}" if year
|
90
|
+
xml.docidentifier { |i| i << id }
|
59
91
|
end
|
60
92
|
|
61
93
|
def metadata_copyright(node, xml)
|
@@ -89,7 +121,8 @@ module Asciidoctor
|
|
89
121
|
|
90
122
|
def doctype(node)
|
91
123
|
d = node.attr("doctype")
|
92
|
-
unless
|
124
|
+
unless ["standard", "directive", "guide", "specification", "report",
|
125
|
+
"amendment", "technical corrigendum" ].include?(d)
|
93
126
|
warn "#{d} is not a legal document type: reverting to 'standard'"
|
94
127
|
d = "standard"
|
95
128
|
end
|
@@ -108,7 +141,7 @@ module Asciidoctor
|
|
108
141
|
word_converter(node).convert filename
|
109
142
|
pdf_converter(node).convert filename
|
110
143
|
end
|
111
|
-
@files_to_delete.each { |f|
|
144
|
+
@files_to_delete.each { |f| FileUtils.rm f }
|
112
145
|
ret
|
113
146
|
end
|
114
147
|
|
data/lib/asciidoctor/csd/csd.rng
CHANGED
@@ -98,13 +98,188 @@
|
|
98
98
|
</define>
|
99
99
|
<define name="BibItemType">
|
100
100
|
<choice>
|
101
|
-
<value>
|
102
|
-
<value>
|
103
|
-
<value>
|
101
|
+
<value>directive</value>
|
102
|
+
<value>guide</value>
|
103
|
+
<value>specification</value>
|
104
104
|
<value>standard</value>
|
105
105
|
<value>report</value>
|
106
|
+
<value>administrative</value>
|
107
|
+
<value>amendment</value>
|
108
|
+
<value>technical corrigendum</value>
|
106
109
|
</choice>
|
107
110
|
</define>
|
111
|
+
<define name="BibliographicItem">
|
112
|
+
<optional>
|
113
|
+
<attribute name="type">
|
114
|
+
<ref name="BibItemType"/>
|
115
|
+
</attribute>
|
116
|
+
</optional>
|
117
|
+
<optional>
|
118
|
+
<ref name="fetched"/>
|
119
|
+
</optional>
|
120
|
+
<choice>
|
121
|
+
<oneOrMore>
|
122
|
+
<ref name="btitle"/>
|
123
|
+
</oneOrMore>
|
124
|
+
<ref name="formattedref"/>
|
125
|
+
</choice>
|
126
|
+
<zeroOrMore>
|
127
|
+
<ref name="bsource"/>
|
128
|
+
</zeroOrMore>
|
129
|
+
<zeroOrMore>
|
130
|
+
<ref name="docidentifier"/>
|
131
|
+
</zeroOrMore>
|
132
|
+
<zeroOrMore>
|
133
|
+
<ref name="bdate"/>
|
134
|
+
</zeroOrMore>
|
135
|
+
<zeroOrMore>
|
136
|
+
<ref name="contributor"/>
|
137
|
+
</zeroOrMore>
|
138
|
+
<optional>
|
139
|
+
<ref name="edition"/>
|
140
|
+
</optional>
|
141
|
+
<zeroOrMore>
|
142
|
+
<ref name="biblionote"/>
|
143
|
+
</zeroOrMore>
|
144
|
+
<zeroOrMore>
|
145
|
+
<ref name="language"/>
|
146
|
+
</zeroOrMore>
|
147
|
+
<zeroOrMore>
|
148
|
+
<ref name="script"/>
|
149
|
+
</zeroOrMore>
|
150
|
+
<zeroOrMore>
|
151
|
+
<ref name="abstract"/>
|
152
|
+
</zeroOrMore>
|
153
|
+
<optional>
|
154
|
+
<ref name="status"/>
|
155
|
+
</optional>
|
156
|
+
<optional>
|
157
|
+
<ref name="copyright"/>
|
158
|
+
</optional>
|
159
|
+
<zeroOrMore>
|
160
|
+
<ref name="docrelation"/>
|
161
|
+
</zeroOrMore>
|
162
|
+
<zeroOrMore>
|
163
|
+
<ref name="series"/>
|
164
|
+
</zeroOrMore>
|
165
|
+
<optional>
|
166
|
+
<ref name="medium"/>
|
167
|
+
</optional>
|
168
|
+
<zeroOrMore>
|
169
|
+
<ref name="bplace"/>
|
170
|
+
</zeroOrMore>
|
171
|
+
<zeroOrMore>
|
172
|
+
<ref name="extent"/>
|
173
|
+
</zeroOrMore>
|
174
|
+
<zeroOrMore>
|
175
|
+
<ref name="accesslocation"/>
|
176
|
+
</zeroOrMore>
|
177
|
+
<optional>
|
178
|
+
<ref name="bclassification"/>
|
179
|
+
</optional>
|
180
|
+
<optional>
|
181
|
+
<ref name="validity"/>
|
182
|
+
</optional>
|
183
|
+
<optional>
|
184
|
+
<ref name="editorialgroup"/>
|
185
|
+
</optional>
|
186
|
+
<zeroOrMore>
|
187
|
+
<ref name="ics"/>
|
188
|
+
</zeroOrMore>
|
189
|
+
<optional>
|
190
|
+
<ref name="allParts"/>
|
191
|
+
</optional>
|
192
|
+
</define>
|
193
|
+
<define name="BibData">
|
194
|
+
<optional>
|
195
|
+
<attribute name="type">
|
196
|
+
<ref name="BibItemType"/>
|
197
|
+
</attribute>
|
198
|
+
</optional>
|
199
|
+
<oneOrMore>
|
200
|
+
<ref name="btitle"/>
|
201
|
+
</oneOrMore>
|
202
|
+
<optional>
|
203
|
+
<ref name="formattedref"/>
|
204
|
+
</optional>
|
205
|
+
<zeroOrMore>
|
206
|
+
<ref name="bsource"/>
|
207
|
+
</zeroOrMore>
|
208
|
+
<zeroOrMore>
|
209
|
+
<ref name="docidentifier"/>
|
210
|
+
</zeroOrMore>
|
211
|
+
<zeroOrMore>
|
212
|
+
<ref name="bdate"/>
|
213
|
+
</zeroOrMore>
|
214
|
+
<zeroOrMore>
|
215
|
+
<ref name="contributor"/>
|
216
|
+
</zeroOrMore>
|
217
|
+
<optional>
|
218
|
+
<ref name="edition"/>
|
219
|
+
</optional>
|
220
|
+
<zeroOrMore>
|
221
|
+
<ref name="biblionote"/>
|
222
|
+
</zeroOrMore>
|
223
|
+
<zeroOrMore>
|
224
|
+
<ref name="language"/>
|
225
|
+
</zeroOrMore>
|
226
|
+
<zeroOrMore>
|
227
|
+
<ref name="script"/>
|
228
|
+
</zeroOrMore>
|
229
|
+
<zeroOrMore>
|
230
|
+
<ref name="abstract"/>
|
231
|
+
</zeroOrMore>
|
232
|
+
<optional>
|
233
|
+
<ref name="status"/>
|
234
|
+
</optional>
|
235
|
+
<ref name="copyright"/>
|
236
|
+
<zeroOrMore>
|
237
|
+
<ref name="docrelation"/>
|
238
|
+
</zeroOrMore>
|
239
|
+
<zeroOrMore>
|
240
|
+
<ref name="series"/>
|
241
|
+
</zeroOrMore>
|
242
|
+
<optional>
|
243
|
+
<ref name="medium"/>
|
244
|
+
</optional>
|
245
|
+
<zeroOrMore>
|
246
|
+
<ref name="bplace"/>
|
247
|
+
</zeroOrMore>
|
248
|
+
<zeroOrMore>
|
249
|
+
<ref name="extent"/>
|
250
|
+
</zeroOrMore>
|
251
|
+
<zeroOrMore>
|
252
|
+
<ref name="accesslocation"/>
|
253
|
+
</zeroOrMore>
|
254
|
+
<optional>
|
255
|
+
<ref name="bclassification"/>
|
256
|
+
</optional>
|
257
|
+
<optional>
|
258
|
+
<ref name="validity"/>
|
259
|
+
</optional>
|
260
|
+
<ref name="editorialgroup"/>
|
261
|
+
<zeroOrMore>
|
262
|
+
<ref name="ics"/>
|
263
|
+
</zeroOrMore>
|
264
|
+
<optional>
|
265
|
+
<ref name="allParts"/>
|
266
|
+
</optional>
|
267
|
+
</define>
|
268
|
+
<define name="editorialgroup">
|
269
|
+
<element name="editorialgroup">
|
270
|
+
<oneOrMore>
|
271
|
+
<ref name="technical-committee"/>
|
272
|
+
</oneOrMore>
|
273
|
+
</element>
|
274
|
+
</define>
|
275
|
+
<define name="technical-committee">
|
276
|
+
<element name="technical-committee">
|
277
|
+
<optional>
|
278
|
+
<attribute name="type"/>
|
279
|
+
</optional>
|
280
|
+
<text/>
|
281
|
+
</element>
|
282
|
+
</define>
|
108
283
|
</include>
|
109
284
|
<define name="pre">
|
110
285
|
<element name="pre">
|
@@ -69,6 +69,9 @@
|
|
69
69
|
<ref name="BibItemType"/>
|
70
70
|
</attribute>
|
71
71
|
</optional>
|
72
|
+
<optional>
|
73
|
+
<ref name="fetched"/>
|
74
|
+
</optional>
|
72
75
|
<choice>
|
73
76
|
<oneOrMore>
|
74
77
|
<ref name="btitle"/>
|
@@ -788,13 +791,15 @@
|
|
788
791
|
</define>
|
789
792
|
<define name="editorialgroup">
|
790
793
|
<element name="editorialgroup">
|
791
|
-
<
|
792
|
-
|
794
|
+
<oneOrMore>
|
795
|
+
<ref name="technical-committee"/>
|
796
|
+
</oneOrMore>
|
797
|
+
<zeroOrMore>
|
793
798
|
<ref name="subcommittee"/>
|
794
|
-
</
|
795
|
-
<
|
799
|
+
</zeroOrMore>
|
800
|
+
<zeroOrMore>
|
796
801
|
<ref name="workgroup"/>
|
797
|
-
</
|
802
|
+
</zeroOrMore>
|
798
803
|
<optional>
|
799
804
|
<ref name="secretariat"/>
|
800
805
|
</optional>
|
@@ -611,7 +611,7 @@ div.example {
|
|
611
611
|
margin-left:70.9pt;
|
612
612
|
text-indent:-70.9pt;
|
613
613
|
}
|
614
|
-
p.example, li.example, div.example, td.example
|
614
|
+
p.example, li.example, div.example, td.example
|
615
615
|
{ margin:0in;
|
616
616
|
margin-bottom:.0001pt;
|
617
617
|
mso-pagination:none;
|
@@ -76,6 +76,70 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal
|
|
76
76
|
mso-fareast-font-family:"Times New Roman";
|
77
77
|
mso-ansi-language:EN-US;
|
78
78
|
mso-fareast-language:EN-US;}
|
79
|
+
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
80
|
+
{mso-style-priority:34;
|
81
|
+
mso-style-unhide:no;
|
82
|
+
mso-style-qformat:yes;
|
83
|
+
margin-top:0cm;
|
84
|
+
margin-right:0cm;
|
85
|
+
margin-bottom:0cm;
|
86
|
+
/* do not put in margin-left, it is specific to list level */
|
87
|
+
margin-bottom:.0001pt;
|
88
|
+
mso-add-space:auto;
|
89
|
+
mso-pagination:widow-orphan;
|
90
|
+
font-size:10.5pt;
|
91
|
+
font-family:$bodyfont;
|
92
|
+
mso-ansi-language:EN-AU;
|
93
|
+
mso-fareast-language:EN-US;}
|
94
|
+
p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst
|
95
|
+
{mso-style-priority:34;
|
96
|
+
mso-style-unhide:no;
|
97
|
+
mso-style-qformat:yes;
|
98
|
+
mso-style-type:export-only;
|
99
|
+
margin-top:0cm;
|
100
|
+
margin-right:0cm;
|
101
|
+
margin-bottom:0cm;
|
102
|
+
/* do not put in margin-left, it is specific to list level */
|
103
|
+
margin-bottom:.0001pt;
|
104
|
+
mso-add-space:auto;
|
105
|
+
mso-pagination:widow-orphan;
|
106
|
+
font-size:10.5pt;
|
107
|
+
font-family:$bodyfont;
|
108
|
+
mso-ansi-language:EN-AU;
|
109
|
+
mso-fareast-language:EN-US;}
|
110
|
+
p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle
|
111
|
+
{mso-style-priority:34;
|
112
|
+
mso-style-unhide:no;
|
113
|
+
mso-style-qformat:yes;
|
114
|
+
mso-style-type:export-only;
|
115
|
+
margin-top:0cm;
|
116
|
+
margin-right:0cm;
|
117
|
+
margin-bottom:0cm;
|
118
|
+
/* do not put in margin-left, it is specific to list level */
|
119
|
+
margin-bottom:.0001pt;
|
120
|
+
mso-add-space:auto;
|
121
|
+
mso-pagination:widow-orphan;
|
122
|
+
font-size:10.5pt;
|
123
|
+
font-family:$bodyfont;
|
124
|
+
mso-ansi-language:EN-AU;
|
125
|
+
mso-fareast-language:EN-US;}
|
126
|
+
p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast
|
127
|
+
{mso-style-priority:34;
|
128
|
+
mso-style-unhide:no;
|
129
|
+
mso-style-qformat:yes;
|
130
|
+
mso-style-type:export-only;
|
131
|
+
margin-top:0cm;
|
132
|
+
margin-right:0cm;
|
133
|
+
margin-bottom:0cm;
|
134
|
+
/* do not put in margin-left, it is specific to list level */
|
135
|
+
margin-bottom:12.0pt;
|
136
|
+
mso-add-space:auto;
|
137
|
+
mso-pagination:widow-orphan;
|
138
|
+
font-size:10.5pt;
|
139
|
+
font-family:$bodyfont;
|
140
|
+
mso-ansi-language:EN-AU;
|
141
|
+
mso-fareast-language:EN-US;}
|
142
|
+
|
79
143
|
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
80
144
|
{mso-style-noshow:yes;
|
81
145
|
mso-style-unhide:no;
|
@@ -334,6 +398,8 @@ span.blackgraphtx
|
|
334
398
|
.MsoChpDefault
|
335
399
|
{mso-style-type:export-only;
|
336
400
|
mso-default-props:yes;}
|
401
|
+
div.figure
|
402
|
+
{text-align: center;}
|
337
403
|
|
338
404
|
|
339
405
|
|
@@ -412,6 +478,7 @@ h1.Annex
|
|
412
478
|
mso-hyphenate:none;
|
413
479
|
tab-stops:27.0pt 35.0pt;
|
414
480
|
font-size:12.0pt;
|
481
|
+
font-weight:bold;
|
415
482
|
mso-bidi-font-size:11.0pt;
|
416
483
|
font-family:$headerfont;
|
417
484
|
mso-fareast-font-family:$headerfont;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|