metanorma-itu 2.4.4 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/itu/html/header.html +68 -0
- data/lib/isodoc/itu/html/itu.css +4 -1
- data/lib/isodoc/itu/html/itu.scss +4 -1
- data/lib/isodoc/itu/html/logo-small.png +0 -0
- data/lib/isodoc/itu/html/word_itu_intro.html +2 -0
- data/lib/isodoc/itu/html/wordstyle.css +2 -0
- data/lib/isodoc/itu/html/wordstyle.scss +2 -0
- data/lib/isodoc/itu/html_convert.rb +10 -0
- data/lib/isodoc/itu/i18n-ar.yaml +10 -0
- data/lib/isodoc/itu/i18n-de.yaml +10 -0
- data/lib/isodoc/itu/i18n-en.yaml +10 -0
- data/lib/isodoc/itu/i18n-es.yaml +10 -0
- data/lib/isodoc/itu/i18n-fr.yaml +10 -0
- data/lib/isodoc/itu/i18n-ru.yaml +10 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +10 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +198 -131
- data/lib/isodoc/itu/itu.in-force.xsl +198 -131
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +198 -131
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +198 -131
- data/lib/isodoc/itu/itu.recommendation.xsl +198 -131
- data/lib/isodoc/itu/itu.resolution.xsl +198 -131
- data/lib/isodoc/itu/itu.service-publication.xsl +198 -131
- data/lib/isodoc/itu/itu.technical-paper.xsl +198 -131
- data/lib/isodoc/itu/itu.technical-report.xsl +198 -131
- data/lib/isodoc/itu/metadata.rb +50 -18
- data/lib/isodoc/itu/presentation_preface.rb +110 -9
- data/lib/isodoc/itu/presentation_xml_convert.rb +13 -15
- data/lib/isodoc/itu/word_cleanup.rb +25 -16
- data/lib/isodoc/itu/word_convert.rb +21 -2
- data/lib/metanorma/itu/biblio.rng +24 -8
- data/lib/metanorma/itu/cleanup_section.rb +1 -1
- data/lib/metanorma/itu/front.rb +39 -13
- data/lib/metanorma/itu/front_id.rb +17 -6
- data/lib/metanorma/itu/isodoc.rng +67 -55
- data/lib/metanorma/itu/relaton-itu.rng +43 -7
- data/lib/metanorma/itu/validate.rb +4 -4
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +4 -3
@@ -27,19 +27,30 @@ module Metanorma
|
|
27
27
|
|
28
28
|
def itu_id1(node, lang)
|
29
29
|
bureau = node.attr("bureau") || "T"
|
30
|
-
id =
|
31
|
-
|
32
|
-
|
30
|
+
id = case doctype(node)
|
31
|
+
when "service-publication"
|
32
|
+
itu_service_pub_id(node)
|
33
|
+
when "contribution"
|
34
|
+
itu_contrib_id(node)
|
33
35
|
else
|
34
36
|
"ITU-#{bureau} #{node.attr('docnumber')}"
|
35
37
|
end
|
36
38
|
id + (lang ? "-#{ITULANG[@lang]}" : "")
|
37
39
|
end
|
38
40
|
|
39
|
-
def
|
40
|
-
|
41
|
+
def itu_service_pub_id(node)
|
42
|
+
@i18n.annex_to_itu_ob_abbrev.sub(/%/, node.attr("docnumber"))
|
43
|
+
end
|
41
44
|
|
42
|
-
|
45
|
+
def itu_contrib_id(node)
|
46
|
+
group = node.attr("group-acronym") ||
|
47
|
+
node.attr("group").sub("Study Group ", "SG")
|
48
|
+
"#{group}-C#{node.attr('docnumber')}"
|
49
|
+
end
|
50
|
+
|
51
|
+
def itu_id(node, xml)
|
52
|
+
node.attr("docnumber") || node.attr("docidentifier") or return
|
53
|
+
xml.docidentifier type: "ITU", primary: "true" do |i|
|
43
54
|
i << (node.attr("docidentifier") || itu_id1(node, false))
|
44
55
|
end
|
45
56
|
xml.docidentifier type: "ITU-lang" do |i|
|
@@ -156,44 +156,7 @@
|
|
156
156
|
</define>
|
157
157
|
<define name="xref">
|
158
158
|
<element name="xref">
|
159
|
-
<
|
160
|
-
<data type="string">
|
161
|
-
<param name="pattern">\i\c*|\c+#\c+</param>
|
162
|
-
</data>
|
163
|
-
</attribute>
|
164
|
-
<optional>
|
165
|
-
<attribute name="to">
|
166
|
-
<data type="string">
|
167
|
-
<param name="pattern">\i\c*|\c+#\c+</param>
|
168
|
-
</data>
|
169
|
-
</attribute>
|
170
|
-
</optional>
|
171
|
-
<optional>
|
172
|
-
<attribute name="type">
|
173
|
-
<ref name="ReferenceFormat"/>
|
174
|
-
</attribute>
|
175
|
-
</optional>
|
176
|
-
<optional>
|
177
|
-
<attribute name="alt"/>
|
178
|
-
</optional>
|
179
|
-
<optional>
|
180
|
-
<attribute name="case">
|
181
|
-
<choice>
|
182
|
-
<value>capital</value>
|
183
|
-
<value>lowercase</value>
|
184
|
-
</choice>
|
185
|
-
</attribute>
|
186
|
-
</optional>
|
187
|
-
<optional>
|
188
|
-
<attribute name="droploc">
|
189
|
-
<data type="boolean"/>
|
190
|
-
</attribute>
|
191
|
-
</optional>
|
192
|
-
<optional>
|
193
|
-
<attribute name="style">
|
194
|
-
<ref name="XrefStyleType"/>
|
195
|
-
</attribute>
|
196
|
-
</optional>
|
159
|
+
<ref name="XrefAttributes"/>
|
197
160
|
<ref name="XrefBody"/>
|
198
161
|
</element>
|
199
162
|
</define>
|
@@ -407,23 +370,7 @@
|
|
407
370
|
</define>
|
408
371
|
<define name="figure">
|
409
372
|
<element name="figure">
|
410
|
-
<
|
411
|
-
<data type="ID"/>
|
412
|
-
</attribute>
|
413
|
-
<optional>
|
414
|
-
<attribute name="unnumbered">
|
415
|
-
<data type="boolean"/>
|
416
|
-
</attribute>
|
417
|
-
</optional>
|
418
|
-
<optional>
|
419
|
-
<attribute name="number"/>
|
420
|
-
</optional>
|
421
|
-
<optional>
|
422
|
-
<attribute name="subsequence"/>
|
423
|
-
</optional>
|
424
|
-
<optional>
|
425
|
-
<attribute name="class"/>
|
426
|
-
</optional>
|
373
|
+
<ref name="FigureAttributes"/>
|
427
374
|
<ref name="BlockAttributes"/>
|
428
375
|
<optional>
|
429
376
|
<ref name="tname"/>
|
@@ -2450,6 +2397,49 @@
|
|
2450
2397
|
</zeroOrMore>
|
2451
2398
|
</element>
|
2452
2399
|
</define>
|
2400
|
+
<define name="XrefAttributes">
|
2401
|
+
<attribute name="target">
|
2402
|
+
<data type="string">
|
2403
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
2404
|
+
</data>
|
2405
|
+
</attribute>
|
2406
|
+
<optional>
|
2407
|
+
<attribute name="to">
|
2408
|
+
<data type="string">
|
2409
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
2410
|
+
</data>
|
2411
|
+
</attribute>
|
2412
|
+
</optional>
|
2413
|
+
<optional>
|
2414
|
+
<attribute name="type">
|
2415
|
+
<ref name="ReferenceFormat"/>
|
2416
|
+
</attribute>
|
2417
|
+
</optional>
|
2418
|
+
<optional>
|
2419
|
+
<attribute name="alt"/>
|
2420
|
+
</optional>
|
2421
|
+
<optional>
|
2422
|
+
<attribute name="case">
|
2423
|
+
<choice>
|
2424
|
+
<value>capital</value>
|
2425
|
+
<value>lowercase</value>
|
2426
|
+
</choice>
|
2427
|
+
</attribute>
|
2428
|
+
</optional>
|
2429
|
+
<optional>
|
2430
|
+
<attribute name="droploc">
|
2431
|
+
<data type="boolean"/>
|
2432
|
+
</attribute>
|
2433
|
+
</optional>
|
2434
|
+
<optional>
|
2435
|
+
<attribute name="style">
|
2436
|
+
<ref name="XrefStyleType"/>
|
2437
|
+
</attribute>
|
2438
|
+
</optional>
|
2439
|
+
<optional>
|
2440
|
+
<attribute name="label"/>
|
2441
|
+
</optional>
|
2442
|
+
</define>
|
2453
2443
|
<define name="XrefBody">
|
2454
2444
|
<zeroOrMore>
|
2455
2445
|
<ref name="XrefTarget"/>
|
@@ -2528,6 +2518,28 @@
|
|
2528
2518
|
<attribute name="columns"/>
|
2529
2519
|
</optional>
|
2530
2520
|
</define>
|
2521
|
+
<define name="FigureAttributes">
|
2522
|
+
<attribute name="id">
|
2523
|
+
<data type="ID"/>
|
2524
|
+
</attribute>
|
2525
|
+
<optional>
|
2526
|
+
<attribute name="unnumbered">
|
2527
|
+
<data type="boolean"/>
|
2528
|
+
</attribute>
|
2529
|
+
</optional>
|
2530
|
+
<optional>
|
2531
|
+
<attribute name="number"/>
|
2532
|
+
</optional>
|
2533
|
+
<optional>
|
2534
|
+
<attribute name="subsequence"/>
|
2535
|
+
</optional>
|
2536
|
+
<optional>
|
2537
|
+
<attribute name="class"/>
|
2538
|
+
</optional>
|
2539
|
+
<optional>
|
2540
|
+
<attribute name="width"/>
|
2541
|
+
</optional>
|
2542
|
+
</define>
|
2531
2543
|
<start>
|
2532
2544
|
<ref name="standard-document"/>
|
2533
2545
|
</start>
|
@@ -22,7 +22,10 @@
|
|
22
22
|
</define>
|
23
23
|
<define name="editorialgroup">
|
24
24
|
<element name="editorialgroup">
|
25
|
-
<
|
25
|
+
<choice>
|
26
|
+
<ref name="bureau"/>
|
27
|
+
<ref name="sector"/>
|
28
|
+
</choice>
|
26
29
|
<optional>
|
27
30
|
<ref name="group"/>
|
28
31
|
</optional>
|
@@ -67,7 +70,12 @@
|
|
67
70
|
<optional>
|
68
71
|
<ref name="docsubtype"/>
|
69
72
|
</optional>
|
70
|
-
<
|
73
|
+
<oneOrMore>
|
74
|
+
<ref name="editorialgroup"/>
|
75
|
+
</oneOrMore>
|
76
|
+
<zeroOrMore>
|
77
|
+
<ref name="question"/>
|
78
|
+
</zeroOrMore>
|
71
79
|
<zeroOrMore>
|
72
80
|
<ref name="ics"/>
|
73
81
|
</zeroOrMore>
|
@@ -196,6 +204,11 @@
|
|
196
204
|
</choice>
|
197
205
|
</element>
|
198
206
|
</define>
|
207
|
+
<define name="sector">
|
208
|
+
<element name="sector">
|
209
|
+
<text/>
|
210
|
+
</element>
|
211
|
+
</define>
|
199
212
|
<define name="group">
|
200
213
|
<element name="group">
|
201
214
|
<ref name="ItuGroup"/>
|
@@ -209,11 +222,7 @@
|
|
209
222
|
<define name="ItuGroup">
|
210
223
|
<optional>
|
211
224
|
<attribute name="type">
|
212
|
-
<
|
213
|
-
<value>tsag</value>
|
214
|
-
<value>study-group</value>
|
215
|
-
<value>work-group</value>
|
216
|
-
</choice>
|
225
|
+
<ref name="ItuGroupType"/>
|
217
226
|
</attribute>
|
218
227
|
</optional>
|
219
228
|
<ref name="tname"/>
|
@@ -224,6 +233,21 @@
|
|
224
233
|
<ref name="groupperiod"/>
|
225
234
|
</optional>
|
226
235
|
</define>
|
236
|
+
<define name="ItuGroupType">
|
237
|
+
<choice>
|
238
|
+
<value>tsag</value>
|
239
|
+
<value>study-group</value>
|
240
|
+
<value>focus-group</value>
|
241
|
+
<value>adhoc-group</value>
|
242
|
+
<value>correspondence-group</value>
|
243
|
+
<value>joint-coordination-activity</value>
|
244
|
+
<value>working-party</value>
|
245
|
+
<value>working-group</value>
|
246
|
+
<value>rapporteur-group</value>
|
247
|
+
<value>intersector-rapporteur-group</value>
|
248
|
+
<value>regional-group</value>
|
249
|
+
</choice>
|
250
|
+
</define>
|
227
251
|
<define name="groupacronym">
|
228
252
|
<element name="acronym">
|
229
253
|
<text/>
|
@@ -252,4 +276,16 @@
|
|
252
276
|
<ref name="ItuGroup"/>
|
253
277
|
</element>
|
254
278
|
</define>
|
279
|
+
<define name="question">
|
280
|
+
<element name="question">
|
281
|
+
<element name="identifier">
|
282
|
+
<text/>
|
283
|
+
</element>
|
284
|
+
<optional>
|
285
|
+
<element name="name">
|
286
|
+
<text/>
|
287
|
+
</element>
|
288
|
+
</optional>
|
289
|
+
</element>
|
290
|
+
</define>
|
255
291
|
</grammar>
|
@@ -6,11 +6,12 @@ module Metanorma
|
|
6
6
|
stage_validate(doc)
|
7
7
|
end
|
8
8
|
|
9
|
-
def doctype_validate(
|
9
|
+
def doctype_validate(_xmldoc)
|
10
10
|
%w(recommendation recommendation-supplement recommendation-amendment
|
11
11
|
recommendation-corrigendum recommendation-errata recommendation-annex
|
12
12
|
focus-group implementers-guide technical-paper technical-report
|
13
|
-
joint-itu-iso-iec service-publication
|
13
|
+
joint-itu-iso-iec service-publication
|
14
|
+
contribution).include? @doctype or
|
14
15
|
@log.add("Document Attributes", nil,
|
15
16
|
"#{@doctype} is not a recognised document type")
|
16
17
|
end
|
@@ -71,8 +72,7 @@ module Metanorma
|
|
71
72
|
def numbers_validate(xmldoc); end
|
72
73
|
|
73
74
|
def style_two_regex_not_prev(node, text, regex, regex_prev, warning)
|
74
|
-
|
75
|
-
|
75
|
+
text.nil? and return
|
76
76
|
arr = text.split(/\W+/)
|
77
77
|
arr.each_index do |i|
|
78
78
|
m = regex.match arr[i]
|
data/metanorma-itu.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
27
27
|
|
28
28
|
spec.add_dependency "metanorma-standoc", "~> 2.8.4"
|
29
|
-
spec.add_dependency "pubid
|
29
|
+
spec.add_dependency "pubid"
|
30
30
|
spec.add_dependency "twitter_cldr", ">= 3.0.0"
|
31
31
|
spec.add_dependency "tzinfo-data" # we need this for windows only
|
32
32
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.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: 2024-
|
11
|
+
date: 2024-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.8.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: pubid
|
28
|
+
name: pubid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -265,6 +265,7 @@ files:
|
|
265
265
|
- lib/isodoc/itu/html/itu-document-comb.png
|
266
266
|
- lib/isodoc/itu/html/itu.css
|
267
267
|
- lib/isodoc/itu/html/itu.scss
|
268
|
+
- lib/isodoc/itu/html/logo-small.png
|
268
269
|
- lib/isodoc/itu/html/logo-sp.png
|
269
270
|
- lib/isodoc/itu/html/logo.png
|
270
271
|
- lib/isodoc/itu/html/scripts.html
|