metanorma-itu 2.1.11 → 2.1.13
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/html_itu_titlepage.html +1 -1
- data/lib/isodoc/itu/html/htmlstyle.css +6 -0
- data/lib/isodoc/itu/html_convert.rb +1 -1
- data/lib/isodoc/itu/i18n-ar.yaml +6 -0
- data/lib/isodoc/itu/i18n-de.yaml +6 -0
- data/lib/isodoc/itu/i18n-en.yaml +6 -0
- data/lib/isodoc/itu/i18n-es.yaml +13 -0
- data/lib/isodoc/itu/i18n-fr.yaml +6 -0
- data/lib/isodoc/itu/i18n-ru.yaml +6 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +2 -0
- data/lib/isodoc/itu/init.rb +1 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +312 -73
- data/lib/isodoc/itu/itu.in-force.xsl +312 -73
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +312 -73
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +312 -73
- data/lib/isodoc/itu/itu.recommendation.xsl +312 -73
- data/lib/isodoc/itu/itu.resolution.xsl +312 -73
- data/lib/isodoc/itu/itu.service-publication.xsl +312 -73
- data/lib/isodoc/itu/itu.technical-paper.xsl +312 -73
- data/lib/isodoc/itu/itu.technical-report.xsl +312 -73
- data/lib/isodoc/itu/pdf_convert.rb +1 -1
- data/lib/isodoc/itu/presentation_bibdata.rb +87 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +79 -106
- data/lib/isodoc/itu/word_convert.rb +1 -1
- data/lib/isodoc/itu/xref.rb +5 -5
- data/lib/metanorma/itu/biblio.rng +5 -0
- data/lib/metanorma/itu/converter.rb +2 -2
- data/lib/metanorma/itu/isodoc.rng +47 -13
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +3 -2
- metadata +5 -11
- data/.github/workflows/automerge.yml +0 -31
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/rspec +0 -17
- data/bin/setup +0 -8
@@ -0,0 +1,87 @@
|
|
1
|
+
module IsoDoc
|
2
|
+
module ITU
|
3
|
+
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
4
|
+
def bibdata_i18n(bib)
|
5
|
+
super
|
6
|
+
bibdata_dates(bib)
|
7
|
+
bibdata_title(bib)
|
8
|
+
amendment_id(bib)
|
9
|
+
end
|
10
|
+
|
11
|
+
def bibdata_dates(bib)
|
12
|
+
bib.xpath(ns("./date")).each do |d|
|
13
|
+
d.next = d.dup
|
14
|
+
d.next["format"] = "ddMMMyyyy"
|
15
|
+
d.next.children = ddMMMyyyy(d.text)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def bibdata_title(bib)
|
20
|
+
case bib.at(ns("./ext/doctype"))&.text
|
21
|
+
when "service-publication" then bibdata_title_service_population(bib)
|
22
|
+
when "resolution" then bibdata_title_resolution(bib)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def bibdata_title_resolution(bib)
|
27
|
+
place = bib.at(ns("./ext/meeting-place"))&.text
|
28
|
+
ed = bib.at(ns("./edition"))&.text
|
29
|
+
rev = ed && ed != "1" ? "#{@i18n.get['revision_abbreviation']} " : ""
|
30
|
+
year = bib.at(ns("./ext/meeting-date/from | ./ext/meeting-date/on"))
|
31
|
+
&.text&.gsub(/-.*$/, "")
|
32
|
+
num = bib.at(ns("./docnumber"))&.text
|
33
|
+
text = @i18n.l10n("#{@i18n.get['doctype_dict']['resolution'].upcase} " \
|
34
|
+
"#{num} (#{rev}#{place}, #{year})")
|
35
|
+
bib.at(ns("./title")).next = <<~INS
|
36
|
+
<title language="#{@lang}" format="text/plain" type="resolution">#{text}</title>
|
37
|
+
<title language="#{@lang}" format="text/plain" type="resolution-placedate">#{place}, #{year}</title>
|
38
|
+
INS
|
39
|
+
end
|
40
|
+
|
41
|
+
def bibdata_title_service_population(bib)
|
42
|
+
date = bib&.at(ns("./date[@type = 'published']"))&.text or return
|
43
|
+
text = l10n(@i18n.get["position_on"].sub(/%/, ddmmmmyyyy(date)))
|
44
|
+
ins = bib.at(ns("./title"))
|
45
|
+
ins.next = <<~INS
|
46
|
+
<title language="#{@lang}" format="text/plain" type="position-sp">#{text}</title>
|
47
|
+
INS
|
48
|
+
end
|
49
|
+
|
50
|
+
def ddMMMyyyy(date)
|
51
|
+
d = date.split("-").map { |x| x.sub(/^0/, "") }
|
52
|
+
case @lang
|
53
|
+
when "zh"
|
54
|
+
d[0] += "年" if d[0]
|
55
|
+
d[1] += "月" if d[1]
|
56
|
+
d[2] += "日" if d[2]
|
57
|
+
d.join
|
58
|
+
when "ar"
|
59
|
+
d[1] = ::RomanNumerals.to_roman(d[1].to_i).upcase if d[1]
|
60
|
+
d.join(".")
|
61
|
+
else
|
62
|
+
d[1] = ::RomanNumerals.to_roman(d[1].to_i).upcase if d[1]
|
63
|
+
d.reverse.join(".")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def ddmmmmyyyy(date)
|
68
|
+
@lang == "zh" and return ddMMMyyyy(date)
|
69
|
+
d = date.split("-")
|
70
|
+
d[1] &&= @meta.months[d[1].to_sym]
|
71
|
+
d[2] &&= d[2].sub(/^0/, "")
|
72
|
+
l10n(d.reverse.join(" "))
|
73
|
+
end
|
74
|
+
|
75
|
+
def amendment_id(bib)
|
76
|
+
%w(amendment corrigendum).each do |w|
|
77
|
+
if dn = bib.at(ns("./ext/structuredidentifier/#{w}"))
|
78
|
+
dn["language"] = ""
|
79
|
+
dn.next = dn.dup
|
80
|
+
dn.next["language"] = @lang
|
81
|
+
dn.next.children = @i18n.l10n("#{@i18n.get[w]} #{dn.text}")
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -2,35 +2,89 @@ require_relative "init"
|
|
2
2
|
require "roman-numerals"
|
3
3
|
require "isodoc"
|
4
4
|
require_relative "../../relaton/render/general"
|
5
|
+
require_relative "presentation_bibdata"
|
5
6
|
|
6
7
|
module IsoDoc
|
7
8
|
module ITU
|
8
9
|
class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
|
9
10
|
def initialize(options)
|
10
|
-
@hierarchical_assets = options[:
|
11
|
+
@hierarchical_assets = options[:hierarchicalassets]
|
11
12
|
super
|
12
13
|
end
|
13
14
|
|
15
|
+
def convert1(docxml, filename, dir)
|
16
|
+
insert_preface_sections(docxml)
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
def insert_preface_sections(docxml)
|
21
|
+
x = insert_editors_clause(docxml) and
|
22
|
+
editors_insert_pt(docxml).next = x
|
23
|
+
end
|
24
|
+
|
25
|
+
def editors_insert_pt(docxml)
|
26
|
+
docxml.at(ns("//preface")) || docxml.at(ns("//sections"))
|
27
|
+
.add_previous_sibling("<preface> </preface>").first
|
28
|
+
ins = docxml.at(ns("//preface/acknolwedgements")) and return ins
|
29
|
+
docxml.at(ns("//preface")).children[-1]
|
30
|
+
end
|
31
|
+
|
32
|
+
def insert_editors_clause(doc)
|
33
|
+
ret = extract_editors(doc) or return
|
34
|
+
eds = ret[:names].each_with_object([]).with_index do |(_x, acc), i|
|
35
|
+
acc << { name: ret[:names][i], affiliation: ret[:affiliations][i],
|
36
|
+
email: ret[:emails][i] }
|
37
|
+
end
|
38
|
+
editors_clause(eds)
|
39
|
+
end
|
40
|
+
|
41
|
+
def extract_editors(doc)
|
42
|
+
e = doc.xpath(ns("//bibdata/contributor[role/@type = 'editor']/person"))
|
43
|
+
e.empty? and return
|
44
|
+
{ names: @meta.extract_person_names(e),
|
45
|
+
affiliations: @meta.extract_person_affiliations(e),
|
46
|
+
emails: e.reduce([]) { |ret, p| ret << p.at(ns("./email"))&.text } }
|
47
|
+
end
|
48
|
+
|
49
|
+
def editors_clause(eds)
|
50
|
+
ed_lbl = @i18n.inflect(@i18n.get["editor_full"],
|
51
|
+
number: eds.size > 1 ? "pl" : "sg")
|
52
|
+
ed_lbl &&= l10n("#{ed_lbl.capitalize}:")
|
53
|
+
mail_lbl = l10n("#{@i18n.get['email']}: ")
|
54
|
+
ret = <<~SUBMITTING
|
55
|
+
<clause id="_#{UUIDTools::UUID.random_create}" type="editors">
|
56
|
+
<table id="_#{UUIDTools::UUID.random_create}" unnumbered="true"><tbody>
|
57
|
+
SUBMITTING
|
58
|
+
ret += editor_table_entries(eds, ed_lbl, mail_lbl)
|
59
|
+
"#{ret}</tbody></table></clause>"
|
60
|
+
end
|
61
|
+
|
62
|
+
def editor_table_entries(eds, ed_lbl, mail_lbl)
|
63
|
+
eds.each_with_index.with_object([]) do |(n, i), m|
|
64
|
+
mail = ""
|
65
|
+
n[:email] and
|
66
|
+
mail = "#{mail_lbl}<link target='mailto:#{n[:email]}'>" \
|
67
|
+
"#{n[:email]}</link>"
|
68
|
+
aff = n[:affiliation].empty? ? "" : "<br/>#{n[:affiliation]}"
|
69
|
+
th = "<th>#{i.zero? ? ed_lbl : ''}</th>"
|
70
|
+
m << "<tr>#{th}<td>#{n[:name]}#{aff}</td><td>#{mail}</td></tr>"
|
71
|
+
end.join("\n")
|
72
|
+
end
|
73
|
+
|
14
74
|
def prefix_container(container, linkend, node, _target)
|
15
75
|
l10n("#{linkend} #{@i18n.get['in']} #{anchor_xref(node, container)}")
|
16
76
|
end
|
17
77
|
|
18
78
|
def eref(docxml)
|
19
|
-
docxml.xpath(ns("//eref")).each
|
20
|
-
eref1(f)
|
21
|
-
end
|
79
|
+
docxml.xpath(ns("//eref")).each { |f| eref1(f) }
|
22
80
|
end
|
23
81
|
|
24
82
|
def origin(docxml)
|
25
|
-
docxml.xpath(ns("//origin[not(termref)]")).each
|
26
|
-
eref1(f)
|
27
|
-
end
|
83
|
+
docxml.xpath(ns("//origin[not(termref)]")).each { |f| eref1(f) }
|
28
84
|
end
|
29
85
|
|
30
86
|
def quotesource(docxml)
|
31
|
-
docxml.xpath(ns("//quote/source")).each
|
32
|
-
eref1(f)
|
33
|
-
end
|
87
|
+
docxml.xpath(ns("//quote/source")).each { |f| eref1(f) }
|
34
88
|
end
|
35
89
|
|
36
90
|
def eref1(elem)
|
@@ -38,8 +92,7 @@ module IsoDoc
|
|
38
92
|
end
|
39
93
|
|
40
94
|
def note1(elem)
|
41
|
-
|
42
|
-
|
95
|
+
elem["type"] == "title-footnote" and return
|
43
96
|
super
|
44
97
|
end
|
45
98
|
|
@@ -58,70 +111,6 @@ module IsoDoc
|
|
58
111
|
node.add_child(link)
|
59
112
|
end
|
60
113
|
|
61
|
-
def bibdata_i18n(bib)
|
62
|
-
super
|
63
|
-
bibdata_dates(bib)
|
64
|
-
bibdata_title(bib)
|
65
|
-
amendment_id(bib)
|
66
|
-
end
|
67
|
-
|
68
|
-
def bibdata_dates(bib)
|
69
|
-
bib.xpath(ns("./date")).each do |d|
|
70
|
-
d.next = d.dup
|
71
|
-
d.next["format"] = "ddMMMyyyy"
|
72
|
-
d.next.children = ddMMMyyyy(d.text)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
def bibdata_title(bib)
|
77
|
-
case bib&.at(ns("./ext/doctype"))&.text
|
78
|
-
when "service-publication" then bibdata_title_service_population(bib)
|
79
|
-
when "resolution" then bibdata_title_resolution(bib)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
def bibdata_title_resolution(bib)
|
84
|
-
place = bib&.at(ns("./ext/meeting-place"))&.text
|
85
|
-
ed = bib&.at(ns("./edition"))&.text
|
86
|
-
rev = ed && ed != "1" ? "#{@i18n.get['revision_abbreviation']} " : ""
|
87
|
-
year = bib&.at(ns("./ext/meeting-date/from | ./ext/meeting-date/on"))
|
88
|
-
&.text&.gsub(/-.*$/, "")
|
89
|
-
num = bib&.at(ns("./docnumber"))&.text
|
90
|
-
text = @i18n.l10n("#{@i18n.get['doctype_dict']['resolution'].upcase} "\
|
91
|
-
"#{num} (#{rev}#{place}, #{year})")
|
92
|
-
ins = bib.at(ns("./title"))
|
93
|
-
ins.next = <<~INS
|
94
|
-
<title language="#{@lang}" format="text/plain" type="resolution">#{text}</title>
|
95
|
-
<title language="#{@lang}" format="text/plain" type="resolution-placedate">#{place}, #{year}</title>
|
96
|
-
INS
|
97
|
-
end
|
98
|
-
|
99
|
-
def bibdata_title_service_population(bib)
|
100
|
-
date = bib&.at(ns("./date[@type = 'published']"))&.text or return
|
101
|
-
text = l10n(@i18n.get["position_on"].sub(/%/, ddmmmmyyyy(date)))
|
102
|
-
ins = bib.at(ns("./title"))
|
103
|
-
ins.next = <<~INS
|
104
|
-
<title language="#{@lang}" format="text/plain" type="position-sp">#{text}</title>
|
105
|
-
INS
|
106
|
-
end
|
107
|
-
|
108
|
-
def ddMMMyyyy(date)
|
109
|
-
d = date.split("-").map { |x| x.sub(/^0/, "") }
|
110
|
-
case @lang
|
111
|
-
when "zh"
|
112
|
-
d[0] += "年" if d[0]
|
113
|
-
d[1] += "月" if d[1]
|
114
|
-
d[2] += "日" if d[2]
|
115
|
-
d.join
|
116
|
-
when "ar"
|
117
|
-
d[1] = ::RomanNumerals.to_roman(d[1].to_i).upcase if d[1]
|
118
|
-
d.join(".")
|
119
|
-
else
|
120
|
-
d[1] = ::RomanNumerals.to_roman(d[1].to_i).upcase if d[1]
|
121
|
-
d.reverse.join(".")
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
114
|
def bibrenderer
|
126
115
|
::Relaton::Render::ITU::General.new(language: @lang)
|
127
116
|
end
|
@@ -138,53 +127,37 @@ module IsoDoc
|
|
138
127
|
"#{f}#{xml.xpath(ns('./docidentifier | ./uri | ./note | ./date')).to_xml}"
|
139
128
|
end
|
140
129
|
|
141
|
-
def ddmmmmyyyy(date)
|
142
|
-
@lang == "zh" and return ddMMMyyyy(date)
|
143
|
-
d = date.split("-")
|
144
|
-
d[1] &&= @meta.months[d[1].to_sym]
|
145
|
-
d[2] &&= d[2].sub(/^0/, "")
|
146
|
-
l10n(d.reverse.join(" "))
|
147
|
-
end
|
148
|
-
|
149
|
-
def amendment_id(bib)
|
150
|
-
%w(amendment corrigendum).each do |w|
|
151
|
-
if dn = bib.at(ns("./ext/structuredidentifier/#{w}"))
|
152
|
-
dn["language"] = ""
|
153
|
-
dn.next = dn.dup
|
154
|
-
dn.next["language"] = @lang
|
155
|
-
dn.next.children = @i18n.l10n("#{@i18n.get[w]} #{dn&.text}")
|
156
|
-
end
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
130
|
def twitter_cldr_localiser_symbols
|
161
131
|
{ group: "'" }
|
162
132
|
end
|
163
133
|
|
164
134
|
def clause1(elem)
|
165
|
-
|
166
|
-
"resolution"
|
167
|
-
|
168
|
-
|
135
|
+
elem.at(ns("//bibdata/ext/doctype"))&.text ==
|
136
|
+
"resolution" or return super
|
137
|
+
%w(sections bibliography).include? elem.parent.name or return super
|
138
|
+
@suppressheadingnumbers || elem["unnumbered"] and return
|
169
139
|
|
170
140
|
t = elem.at(ns("./title")) and t["depth"] = "1"
|
171
141
|
lbl = @xrefs.anchor(elem["id"], :label, false) or return
|
172
142
|
elem.elements.first.previous =
|
173
|
-
"<p keep-with-next='true' class='supertitle'>"\
|
143
|
+
"<p keep-with-next='true' class='supertitle'>" \
|
174
144
|
"#{@i18n.get['section'].upcase} #{lbl}</p>"
|
175
145
|
end
|
176
146
|
|
177
147
|
def annex1(elem)
|
178
|
-
|
179
|
-
|
148
|
+
elem.at(ns("//bibdata/ext/doctype"))&.text == "resolution" or
|
149
|
+
return super
|
180
150
|
|
151
|
+
elem.elements.first.previous = annex1_supertitle(elem)
|
152
|
+
t = elem.at(ns("./title")) and
|
153
|
+
t.children = "<strong>#{t.children.to_xml}</strong>"
|
154
|
+
end
|
155
|
+
|
156
|
+
def annex1_supertitle(elem)
|
181
157
|
lbl = @xrefs.anchor(elem["id"], :label)
|
182
158
|
res = elem.at(ns("//bibdata/title[@type = 'resolution']"))
|
183
159
|
subhead = @i18n.l10n("(#{@i18n.get['to']} #{res.children.to_xml})")
|
184
|
-
|
185
|
-
"<p class='supertitle'>#{lbl}<br/>#{subhead}</p>"
|
186
|
-
t = elem.at(ns("./title")) and
|
187
|
-
t.children = "<strong>#{t.children.to_xml}</strong>"
|
160
|
+
"<p class='supertitle'>#{lbl}<br/>#{subhead}</p>"
|
188
161
|
end
|
189
162
|
|
190
163
|
def ol_depth(node)
|
data/lib/isodoc/itu/xref.rb
CHANGED
@@ -17,7 +17,7 @@ module IsoDoc
|
|
17
17
|
class Xref < IsoDoc::Xref
|
18
18
|
def initialize(lang, script, klass, labels, options)
|
19
19
|
super
|
20
|
-
@hierarchical_assets = options[:
|
20
|
+
@hierarchical_assets = options[:hierarchicalassets]
|
21
21
|
end
|
22
22
|
|
23
23
|
def back_anchor_names(docxml)
|
@@ -70,10 +70,10 @@ module IsoDoc
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def middle_sections
|
73
|
-
"//clause[@type = 'scope'] | "\
|
74
|
-
"//foreword | //introduction | //acknowledgements | "\
|
75
|
-
" #{@klass.norm_ref_xpath} | "\
|
76
|
-
"//sections/terms | //preface/clause | "\
|
73
|
+
"//clause[@type = 'scope'] | " \
|
74
|
+
"//foreword | //introduction | //acknowledgements | " \
|
75
|
+
" #{@klass.norm_ref_xpath} | " \
|
76
|
+
"//sections/terms | //preface/clause | " \
|
77
77
|
"//sections/definitions | //clause[parent::sections]"
|
78
78
|
end
|
79
79
|
|
@@ -188,6 +188,11 @@
|
|
188
188
|
<value>adapter</value>
|
189
189
|
<value>translator</value>
|
190
190
|
<value>distributor</value>
|
191
|
+
<value>realizer</value>
|
192
|
+
<value>owner</value>
|
193
|
+
<value>authorizer</value>
|
194
|
+
<value>enabler</value>
|
195
|
+
<value>subject</value>
|
191
196
|
</choice>
|
192
197
|
</attribute>
|
193
198
|
<zeroOrMore>
|
@@ -124,12 +124,12 @@ module Metanorma
|
|
124
124
|
end
|
125
125
|
|
126
126
|
def html_extract_attributes(node)
|
127
|
-
super.merge(
|
127
|
+
super.merge(hierarchicalassets:
|
128
128
|
node.attr("hierarchical-object-numbering"))
|
129
129
|
end
|
130
130
|
|
131
131
|
def doc_extract_attributes(node)
|
132
|
-
super.merge(
|
132
|
+
super.merge(hierarchicalassets:
|
133
133
|
node.attr("hierarchical-object-numbering"))
|
134
134
|
end
|
135
135
|
|
@@ -177,11 +177,7 @@
|
|
177
177
|
</optional>
|
178
178
|
<optional>
|
179
179
|
<attribute name="style">
|
180
|
-
<
|
181
|
-
<value>basic</value>
|
182
|
-
<value>full</value>
|
183
|
-
<value>short</value>
|
184
|
-
</choice>
|
180
|
+
<ref name="XrefStyleType"/>
|
185
181
|
</attribute>
|
186
182
|
</optional>
|
187
183
|
<ref name="XrefBody"/>
|
@@ -1031,6 +1027,7 @@
|
|
1031
1027
|
<ref name="stem"/>
|
1032
1028
|
<ref name="index"/>
|
1033
1029
|
<ref name="eref"/>
|
1030
|
+
<ref name="erefstack"/>
|
1034
1031
|
<ref name="xref"/>
|
1035
1032
|
<ref name="hyperlink"/>
|
1036
1033
|
</choice>
|
@@ -1045,6 +1042,7 @@
|
|
1045
1042
|
<ref name="stem"/>
|
1046
1043
|
<ref name="index"/>
|
1047
1044
|
<ref name="eref"/>
|
1045
|
+
<ref name="erefstack"/>
|
1048
1046
|
<ref name="xref"/>
|
1049
1047
|
<ref name="hyperlink"/>
|
1050
1048
|
</choice>
|
@@ -1058,6 +1056,7 @@
|
|
1058
1056
|
<ref name="PureTextElement"/>
|
1059
1057
|
<ref name="index"/>
|
1060
1058
|
<ref name="eref"/>
|
1059
|
+
<ref name="erefstack"/>
|
1061
1060
|
<ref name="xref"/>
|
1062
1061
|
<ref name="hyperlink"/>
|
1063
1062
|
</choice>
|
@@ -1153,7 +1152,7 @@
|
|
1153
1152
|
<data type="boolean"/>
|
1154
1153
|
</attribute>
|
1155
1154
|
</optional>
|
1156
|
-
<ref name="
|
1155
|
+
<ref name="ReducedBibliographicItem"/>
|
1157
1156
|
</element>
|
1158
1157
|
</define>
|
1159
1158
|
<define name="image" combine="choice">
|
@@ -1195,6 +1194,7 @@
|
|
1195
1194
|
<ref name="add"/>
|
1196
1195
|
<ref name="del"/>
|
1197
1196
|
<ref name="span"/>
|
1197
|
+
<ref name="erefstack"/>
|
1198
1198
|
</choice>
|
1199
1199
|
</define>
|
1200
1200
|
<define name="add">
|
@@ -1202,6 +1202,7 @@
|
|
1202
1202
|
<choice>
|
1203
1203
|
<ref name="PureTextElement"/>
|
1204
1204
|
<ref name="eref"/>
|
1205
|
+
<ref name="erefstack"/>
|
1205
1206
|
<ref name="stem"/>
|
1206
1207
|
<ref name="keyword"/>
|
1207
1208
|
<ref name="xref"/>
|
@@ -1214,6 +1215,7 @@
|
|
1214
1215
|
<choice>
|
1215
1216
|
<ref name="PureTextElement"/>
|
1216
1217
|
<ref name="eref"/>
|
1218
|
+
<ref name="erefstack"/>
|
1217
1219
|
<ref name="stem"/>
|
1218
1220
|
<ref name="keyword"/>
|
1219
1221
|
<ref name="xref"/>
|
@@ -1278,6 +1280,7 @@
|
|
1278
1280
|
</optional>
|
1279
1281
|
<choice>
|
1280
1282
|
<ref name="eref"/>
|
1283
|
+
<ref name="erefstack"/>
|
1281
1284
|
<ref name="xref"/>
|
1282
1285
|
<ref name="termref"/>
|
1283
1286
|
</choice>
|
@@ -1970,6 +1973,7 @@
|
|
1970
1973
|
</element>
|
1971
1974
|
<choice>
|
1972
1975
|
<ref name="eref"/>
|
1976
|
+
<ref name="erefstack"/>
|
1973
1977
|
<ref name="xref"/>
|
1974
1978
|
<ref name="termref"/>
|
1975
1979
|
</choice>
|
@@ -2525,6 +2529,7 @@
|
|
2525
2529
|
<ref name="xref"/>
|
2526
2530
|
<ref name="hyperlink"/>
|
2527
2531
|
<ref name="eref"/>
|
2532
|
+
<ref name="erefstack"/>
|
2528
2533
|
</choice>
|
2529
2534
|
<oneOrMore>
|
2530
2535
|
<element name="coords">
|
@@ -2572,6 +2577,7 @@
|
|
2572
2577
|
<ref name="xref"/>
|
2573
2578
|
<ref name="hyperlink"/>
|
2574
2579
|
<ref name="eref"/>
|
2580
|
+
<ref name="erefstack"/>
|
2575
2581
|
</choice>
|
2576
2582
|
</element>
|
2577
2583
|
</zeroOrMore>
|
@@ -2620,6 +2626,15 @@
|
|
2620
2626
|
<ref name="PureTextElement"/>
|
2621
2627
|
</oneOrMore>
|
2622
2628
|
</define>
|
2629
|
+
<define name="XrefConnectiveType">
|
2630
|
+
<choice>
|
2631
|
+
<value>and</value>
|
2632
|
+
<value>or</value>
|
2633
|
+
<value>from</value>
|
2634
|
+
<value>to</value>
|
2635
|
+
<value/>
|
2636
|
+
</choice>
|
2637
|
+
</define>
|
2623
2638
|
<define name="XrefTarget">
|
2624
2639
|
<element name="location">
|
2625
2640
|
<attribute name="target">
|
@@ -2628,16 +2643,35 @@
|
|
2628
2643
|
</data>
|
2629
2644
|
</attribute>
|
2630
2645
|
<attribute name="connective">
|
2631
|
-
<
|
2632
|
-
<value>and</value>
|
2633
|
-
<value>or</value>
|
2634
|
-
<value>from</value>
|
2635
|
-
<value>to</value>
|
2636
|
-
<value/>
|
2637
|
-
</choice>
|
2646
|
+
<ref name="XrefConnectiveType"/>
|
2638
2647
|
</attribute>
|
2639
2648
|
</element>
|
2640
2649
|
</define>
|
2650
|
+
<define name="XrefStyleType">
|
2651
|
+
<choice>
|
2652
|
+
<value>basic</value>
|
2653
|
+
<value>full</value>
|
2654
|
+
<value>short</value>
|
2655
|
+
<value>id</value>
|
2656
|
+
</choice>
|
2657
|
+
</define>
|
2658
|
+
<define name="erefTypeWithConnective">
|
2659
|
+
<optional>
|
2660
|
+
<attribute name="connective">
|
2661
|
+
<ref name="XrefConnectiveType"/>
|
2662
|
+
</attribute>
|
2663
|
+
</optional>
|
2664
|
+
<ref name="erefType"/>
|
2665
|
+
</define>
|
2666
|
+
<define name="erefstack">
|
2667
|
+
<element name="erefstack">
|
2668
|
+
<oneOrMore>
|
2669
|
+
<element name="eref">
|
2670
|
+
<ref name="erefTypeWithConnective"/>
|
2671
|
+
</element>
|
2672
|
+
</oneOrMore>
|
2673
|
+
</element>
|
2674
|
+
</define>
|
2641
2675
|
<start>
|
2642
2676
|
<ref name="standard-document"/>
|
2643
2677
|
</start>
|
data/metanorma-itu.gemspec
CHANGED
@@ -17,12 +17,13 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.license = "BSD-2-Clause"
|
18
18
|
|
19
19
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
|
-
f.match(%r{^(test|spec|features)/})
|
20
|
+
f.match(%r{^(test|spec|features|bin|.github)/}) \
|
21
|
+
|| f.match(%r{Rakefile|bin/rspec})
|
21
22
|
end
|
22
23
|
spec.bindir = "exe"
|
23
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
25
|
spec.require_paths = ["lib"]
|
25
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
26
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
26
27
|
|
27
28
|
spec.add_dependency "htmlentities", "~> 4.3.4"
|
28
29
|
spec.add_dependency "metanorma-standoc", "~> 2.2.4"
|
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.1.
|
4
|
+
version: 2.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -257,9 +257,6 @@ executables: []
|
|
257
257
|
extensions: []
|
258
258
|
extra_rdoc_files: []
|
259
259
|
files:
|
260
|
-
- ".github/workflows/automerge.yml"
|
261
|
-
- ".github/workflows/rake.yml"
|
262
|
-
- ".github/workflows/release.yml"
|
263
260
|
- ".gitignore"
|
264
261
|
- ".hound.yml"
|
265
262
|
- ".rubocop.yml"
|
@@ -267,10 +264,6 @@ files:
|
|
267
264
|
- Gemfile
|
268
265
|
- LICENSE
|
269
266
|
- README.adoc
|
270
|
-
- Rakefile
|
271
|
-
- bin/console
|
272
|
-
- bin/rspec
|
273
|
-
- bin/setup
|
274
267
|
- lib/isodoc/itu.rb
|
275
268
|
- lib/isodoc/itu/base_convert.rb
|
276
269
|
- lib/isodoc/itu/cleanup.rb
|
@@ -315,6 +308,7 @@ files:
|
|
315
308
|
- lib/isodoc/itu/itu.technical-report.xsl
|
316
309
|
- lib/isodoc/itu/metadata.rb
|
317
310
|
- lib/isodoc/itu/pdf_convert.rb
|
311
|
+
- lib/isodoc/itu/presentation_bibdata.rb
|
318
312
|
- lib/isodoc/itu/presentation_xml_convert.rb
|
319
313
|
- lib/isodoc/itu/ref.rb
|
320
314
|
- lib/isodoc/itu/terms.rb
|
@@ -354,14 +348,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
354
348
|
requirements:
|
355
349
|
- - ">="
|
356
350
|
- !ruby/object:Gem::Version
|
357
|
-
version: 2.
|
351
|
+
version: 2.7.0
|
358
352
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
359
353
|
requirements:
|
360
354
|
- - ">="
|
361
355
|
- !ruby/object:Gem::Version
|
362
356
|
version: '0'
|
363
357
|
requirements: []
|
364
|
-
rubygems_version: 3.
|
358
|
+
rubygems_version: 3.3.7
|
365
359
|
signing_key:
|
366
360
|
specification_version: 4
|
367
361
|
summary: Metanorma for the ITU
|
@@ -1,31 +0,0 @@
|
|
1
|
-
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
-
# See https://github.com/metanorma/cimas
|
3
|
-
# source: https://github.com/marketplace/actions/merge-pull-requests#usage
|
4
|
-
name: automerge
|
5
|
-
on:
|
6
|
-
pull_request:
|
7
|
-
types:
|
8
|
-
- labeled
|
9
|
-
- unlabeled
|
10
|
-
- synchronize
|
11
|
-
- opened
|
12
|
-
- edited
|
13
|
-
- ready_for_review
|
14
|
-
- reopened
|
15
|
-
- unlocked
|
16
|
-
pull_request_review:
|
17
|
-
types:
|
18
|
-
- submitted
|
19
|
-
check_suite:
|
20
|
-
types:
|
21
|
-
- completed
|
22
|
-
status: {}
|
23
|
-
jobs:
|
24
|
-
automerge:
|
25
|
-
runs-on: ubuntu-latest
|
26
|
-
steps:
|
27
|
-
- id: automerge
|
28
|
-
name: automerge
|
29
|
-
uses: "pascalgn/automerge-action@v0.15.3"
|
30
|
-
env:
|
31
|
-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|