metanorma-itu 2.7.1 → 2.7.3
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 +1 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +141 -45
- data/lib/isodoc/itu/itu.in-force.xsl +141 -45
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +141 -45
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +141 -45
- data/lib/isodoc/itu/itu.recommendation.xsl +141 -45
- data/lib/isodoc/itu/itu.resolution.xsl +141 -45
- data/lib/isodoc/itu/itu.service-publication.xsl +141 -45
- data/lib/isodoc/itu/itu.technical-paper.xsl +141 -45
- data/lib/isodoc/itu/itu.technical-report.xsl +141 -45
- data/lib/isodoc/itu/metadata.rb +11 -14
- data/lib/metanorma/itu/basicdoc.rng +1 -1
- data/lib/metanorma/itu/biblio-standoc.rng +0 -49
- data/lib/metanorma/itu/biblio.rng +11 -1
- data/lib/metanorma/itu/cleanup.rb +4 -0
- data/lib/metanorma/itu/front.rb +10 -61
- data/lib/metanorma/itu/front_contrib.rb +62 -0
- data/lib/metanorma/itu/front_id.rb +2 -4
- data/lib/metanorma/itu/isodoc.rng +7 -60
- data/lib/metanorma/itu/relaton-itu.rng +7 -58
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +4 -3
@@ -0,0 +1,62 @@
|
|
1
|
+
module Metanorma
|
2
|
+
module Itu
|
3
|
+
class Converter < Standoc::Converter
|
4
|
+
def default_publisher
|
5
|
+
@i18n.get["ITU"] || @i18n.international_telecommunication_union
|
6
|
+
end
|
7
|
+
|
8
|
+
def org_abbrev
|
9
|
+
if @i18n.get["ITU"]
|
10
|
+
{ @i18n.international_telecommunication_union => @i18n.get["ITU"] }
|
11
|
+
else {} end
|
12
|
+
end
|
13
|
+
|
14
|
+
def committee_contributors(node, xml, agency, opt)
|
15
|
+
metadata_committee_prep(node) or return
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def metadata_committee_types(_node)
|
20
|
+
%w(bureau sector group subgroup workgroup)
|
21
|
+
end
|
22
|
+
|
23
|
+
def extract_org_attrs_complex(node, opts, source, suffix)
|
24
|
+
super.merge(ident: node.attr("#{source}-acronym#{suffix}")).compact
|
25
|
+
end
|
26
|
+
|
27
|
+
def full_committee_id(contrib); end
|
28
|
+
|
29
|
+
def metadata_committee_prep(node)
|
30
|
+
a = node.attributes.dup
|
31
|
+
a.each do |k, v|
|
32
|
+
/group(type|acronym)/.match?(k) and
|
33
|
+
node.set_attr(k.sub(/group(type|acronym)/, "group-\\1"), v)
|
34
|
+
/group(yearstart|yearend)/.match?(k) and
|
35
|
+
node.set_attr(k.sub(/groupyear(start|end)/, "group-year-\\1"), v)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def org_attrs_add_committees(node, ret, opts, opts_orig)
|
40
|
+
opts_orig[:groups]&.each_with_index do |g, i|
|
41
|
+
i.zero? and next
|
42
|
+
contributors_committees_pad_multiples(ret.first, node, g)
|
43
|
+
opts = committee_contrib_org_prep(node, g, nil, opts_orig)
|
44
|
+
ret << org_attrs_parse_core(node, opts).map do |x|
|
45
|
+
x.merge(subdivtype: opts[:subdivtype])
|
46
|
+
end
|
47
|
+
end
|
48
|
+
contributors_committees_nest1(ret)
|
49
|
+
end
|
50
|
+
|
51
|
+
def metadata_ext(node, xml)
|
52
|
+
super
|
53
|
+
metadata_question(node, xml)
|
54
|
+
metadata_recommendationstatus(node, xml)
|
55
|
+
metadata_ip_notice(node, xml)
|
56
|
+
metadata_studyperiod(node, xml)
|
57
|
+
metadata_techreport(node, xml)
|
58
|
+
metadata_contribution(node, xml)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -65,8 +65,7 @@ module Metanorma
|
|
65
65
|
end
|
66
66
|
|
67
67
|
def recommendation_id(node, xml)
|
68
|
-
|
69
|
-
|
68
|
+
node.attr("recommendationnumber") or return
|
70
69
|
node.attr("recommendationnumber").split("/").each do |s|
|
71
70
|
xml.docidentifier type: "ITU-Recommendation" do |i|
|
72
71
|
i << s
|
@@ -75,8 +74,7 @@ module Metanorma
|
|
75
74
|
end
|
76
75
|
|
77
76
|
def structured_id(node, xml)
|
78
|
-
|
79
|
-
|
77
|
+
node.attr("docnumber") or return
|
80
78
|
xml.structuredidentifier do |i|
|
81
79
|
i.bureau node.attr("bureau") || "T"
|
82
80
|
i.docnumber node.attr("docnumber")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<!-- VERSION v2.1.
|
3
|
+
<!-- VERSION v2.1.1 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -42,36 +42,6 @@ All IdRefType instances point not to `@id` in Semantic XML, which is the Content
|
|
42
42
|
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
43
|
<text/>
|
44
44
|
</define>
|
45
|
-
<define name="index-primary">
|
46
|
-
<element name="primary">
|
47
|
-
<oneOrMore>
|
48
|
-
<choice>
|
49
|
-
<ref name="PureTextElement"/>
|
50
|
-
<ref name="stem"/>
|
51
|
-
</choice>
|
52
|
-
</oneOrMore>
|
53
|
-
</element>
|
54
|
-
</define>
|
55
|
-
<define name="index-secondary">
|
56
|
-
<element name="secondary">
|
57
|
-
<oneOrMore>
|
58
|
-
<choice>
|
59
|
-
<ref name="PureTextElement"/>
|
60
|
-
<ref name="stem"/>
|
61
|
-
</choice>
|
62
|
-
</oneOrMore>
|
63
|
-
</element>
|
64
|
-
</define>
|
65
|
-
<define name="index-tertiary">
|
66
|
-
<element name="tertiary">
|
67
|
-
<oneOrMore>
|
68
|
-
<choice>
|
69
|
-
<ref name="PureTextElement"/>
|
70
|
-
<ref name="stem"/>
|
71
|
-
</choice>
|
72
|
-
</oneOrMore>
|
73
|
-
</element>
|
74
|
-
</define>
|
75
45
|
<define name="review">
|
76
46
|
<a:documentation>Generalise BasicDoc element from just review comments, to general annotations;
|
77
47
|
the type attribute defaults to `review` for reviews</a:documentation>
|
@@ -592,28 +562,6 @@ normative or informative references, some split references into sections organiz
|
|
592
562
|
</oneOrMore>
|
593
563
|
</element>
|
594
564
|
</define>
|
595
|
-
<define name="sub">
|
596
|
-
<a:documentation>Subscript text. Corresponds to HTML `sub</a:documentation>
|
597
|
-
<element name="sub">
|
598
|
-
<zeroOrMore>
|
599
|
-
<choice>
|
600
|
-
<ref name="PureTextElement"/>
|
601
|
-
<ref name="stem"/>
|
602
|
-
</choice>
|
603
|
-
</zeroOrMore>
|
604
|
-
</element>
|
605
|
-
</define>
|
606
|
-
<define name="sup">
|
607
|
-
<a:documentation>Superscript text. Corresponds to HTML `sup`</a:documentation>
|
608
|
-
<element name="sup">
|
609
|
-
<zeroOrMore>
|
610
|
-
<choice>
|
611
|
-
<ref name="PureTextElement"/>
|
612
|
-
<ref name="stem"/>
|
613
|
-
</choice>
|
614
|
-
</zeroOrMore>
|
615
|
-
</element>
|
616
|
-
</define>
|
617
565
|
<define name="pagebreak">
|
618
566
|
<a:documentation>Page break. Only applicable in paged layouts (e.g. PDF, Word), and not flow layouts (e.g. HTML)</a:documentation>
|
619
567
|
<element name="pagebreak">
|
@@ -1094,7 +1042,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1094
1042
|
<zeroOrMore>
|
1095
1043
|
<choice>
|
1096
1044
|
<ref name="PureTextElement"/>
|
1097
|
-
<ref name="stem"/>
|
1098
1045
|
<ref name="index"/>
|
1099
1046
|
<ref name="index-xref"/>
|
1100
1047
|
</choice>
|
@@ -1107,7 +1054,6 @@ That concept may be defined as a term within the current document, or it may be
|
|
1107
1054
|
<zeroOrMore>
|
1108
1055
|
<choice>
|
1109
1056
|
<ref name="PureTextElement"/>
|
1110
|
-
<ref name="stem"/>
|
1111
1057
|
<ref name="index"/>
|
1112
1058
|
<ref name="index-xref"/>
|
1113
1059
|
</choice>
|
@@ -2025,10 +1971,7 @@ used in document amendments</a:documentation>
|
|
2025
1971
|
<element name="name">
|
2026
1972
|
<a:documentation>The symbolic form of the designation</a:documentation>
|
2027
1973
|
<oneOrMore>
|
2028
|
-
<
|
2029
|
-
<ref name="PureTextElement"/>
|
2030
|
-
<ref name="stem"/>
|
2031
|
-
</choice>
|
1974
|
+
<ref name="PureTextElement"/>
|
2032
1975
|
</oneOrMore>
|
2033
1976
|
</element>
|
2034
1977
|
</element>
|
@@ -2081,7 +2024,6 @@ used in document amendments</a:documentation>
|
|
2081
2024
|
<zeroOrMore>
|
2082
2025
|
<choice>
|
2083
2026
|
<ref name="PureTextElement"/>
|
2084
|
-
<ref name="stem"/>
|
2085
2027
|
<ref name="index"/>
|
2086
2028
|
<ref name="index-xref"/>
|
2087
2029
|
</choice>
|
@@ -2291,6 +2233,11 @@ used in document amendments</a:documentation>
|
|
2291
2233
|
<ref name="RequiredId"/>
|
2292
2234
|
<ref name="NumberingAttributes"/>
|
2293
2235
|
<ref name="BlockAttributes"/>
|
2236
|
+
<optional>
|
2237
|
+
<attribute name="type">
|
2238
|
+
<a:documentation>Semantic classification of note</a:documentation>
|
2239
|
+
</attribute>
|
2240
|
+
</optional>
|
2294
2241
|
<oneOrMore>
|
2295
2242
|
<choice>
|
2296
2243
|
<a:documentation>Content of the term note</a:documentation>
|
@@ -21,23 +21,6 @@
|
|
21
21
|
<value>contribution</value>
|
22
22
|
</choice>
|
23
23
|
</define>
|
24
|
-
<define name="editorialgroup">
|
25
|
-
<element name="editorialgroup">
|
26
|
-
<choice>
|
27
|
-
<ref name="bureau"/>
|
28
|
-
<ref name="sector"/>
|
29
|
-
</choice>
|
30
|
-
<optional>
|
31
|
-
<ref name="group"/>
|
32
|
-
</optional>
|
33
|
-
<optional>
|
34
|
-
<ref name="subgroup"/>
|
35
|
-
</optional>
|
36
|
-
<optional>
|
37
|
-
<ref name="workgroup"/>
|
38
|
-
</optional>
|
39
|
-
</element>
|
40
|
-
</define>
|
41
24
|
<define name="structuredidentifier">
|
42
25
|
<element name="structuredidentifier">
|
43
26
|
<ref name="bureau"/>
|
@@ -78,6 +61,11 @@
|
|
78
61
|
<a:documentation>ITU has received a notice of intellectual property, protected by patents, which may be required to implement this Recommendation</a:documentation>
|
79
62
|
</ref>
|
80
63
|
</optional>
|
64
|
+
<optional>
|
65
|
+
<ref name="studyperiod">
|
66
|
+
<a:documentation>Study period that the editorial groups working on this document fall under</a:documentation>
|
67
|
+
</ref>
|
68
|
+
</optional>
|
81
69
|
<optional>
|
82
70
|
<ref name="meeting">
|
83
71
|
<a:documentation>Name of meeting that generated this document (for resolutions, technical reports, technical papers, implementers guides) </a:documentation>
|
@@ -203,35 +191,6 @@
|
|
203
191
|
</choice>
|
204
192
|
</element>
|
205
193
|
</define>
|
206
|
-
<define name="sector">
|
207
|
-
<element name="sector">
|
208
|
-
<text/>
|
209
|
-
</element>
|
210
|
-
</define>
|
211
|
-
<define name="group">
|
212
|
-
<element name="group">
|
213
|
-
<ref name="ItuGroup"/>
|
214
|
-
</element>
|
215
|
-
</define>
|
216
|
-
<define name="subgroup">
|
217
|
-
<element name="subgroup">
|
218
|
-
<ref name="ItuGroup"/>
|
219
|
-
</element>
|
220
|
-
</define>
|
221
|
-
<define name="ItuGroup">
|
222
|
-
<optional>
|
223
|
-
<attribute name="type">
|
224
|
-
<ref name="ItuGroupType"/>
|
225
|
-
</attribute>
|
226
|
-
</optional>
|
227
|
-
<ref name="tname"/>
|
228
|
-
<optional>
|
229
|
-
<ref name="groupacronym"/>
|
230
|
-
</optional>
|
231
|
-
<optional>
|
232
|
-
<ref name="groupperiod"/>
|
233
|
-
</optional>
|
234
|
-
</define>
|
235
194
|
<define name="ItuGroupType">
|
236
195
|
<choice>
|
237
196
|
<value>tsag</value>
|
@@ -247,13 +206,8 @@
|
|
247
206
|
<value>regional-group</value>
|
248
207
|
</choice>
|
249
208
|
</define>
|
250
|
-
<define name="
|
251
|
-
<element name="
|
252
|
-
<text/>
|
253
|
-
</element>
|
254
|
-
</define>
|
255
|
-
<define name="groupperiod">
|
256
|
-
<element name="period">
|
209
|
+
<define name="studyperiod">
|
210
|
+
<element name="studyperiod">
|
257
211
|
<ref name="groupperiodstart"/>
|
258
212
|
<optional>
|
259
213
|
<ref name="groupperiodend"/>
|
@@ -270,11 +224,6 @@
|
|
270
224
|
<data type="gYear"/>
|
271
225
|
</element>
|
272
226
|
</define>
|
273
|
-
<define name="workgroup">
|
274
|
-
<element name="workgroup">
|
275
|
-
<ref name="ItuGroup"/>
|
276
|
-
</element>
|
277
|
-
</define>
|
278
227
|
<define name="question">
|
279
228
|
<element name="question">
|
280
229
|
<element name="identifier">
|
data/metanorma-itu.gemspec
CHANGED
@@ -42,5 +42,5 @@ spec.add_development_dependency "rubocop-performance"
|
|
42
42
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
43
43
|
spec.add_development_dependency "timecop", "~> 0.9"
|
44
44
|
spec.add_development_dependency "webmock"
|
45
|
-
spec.add_development_dependency "
|
45
|
+
spec.add_development_dependency "canon"
|
46
46
|
end
|
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.7.
|
4
|
+
version: 2.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -235,7 +235,7 @@ dependencies:
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
- !ruby/object:Gem::Dependency
|
238
|
-
name:
|
238
|
+
name: canon
|
239
239
|
requirement: !ruby/object:Gem::Requirement
|
240
240
|
requirements:
|
241
241
|
- - ">="
|
@@ -332,6 +332,7 @@ files:
|
|
332
332
|
- lib/metanorma/itu/cleanup_section.rb
|
333
333
|
- lib/metanorma/itu/converter.rb
|
334
334
|
- lib/metanorma/itu/front.rb
|
335
|
+
- lib/metanorma/itu/front_contrib.rb
|
335
336
|
- lib/metanorma/itu/front_id.rb
|
336
337
|
- lib/metanorma/itu/isodoc.rng
|
337
338
|
- lib/metanorma/itu/itu.rng
|