metanorma-itu 2.2.5 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -179,7 +179,7 @@ module IsoDoc
179
179
  super
180
180
  end
181
181
 
182
- def norm_ref_entry_code(_ordinal, idents, _ids, _standard, datefn)
182
+ def norm_ref_entry_code(_ordinal, idents, _ids, _standard, datefn, _bib)
183
183
  ret = (idents[:metanorma] || idents[:sdo] || idents[:ordinal]).to_s
184
184
  !idents[:metanorma] && idents[:sdo] and ret = "[#{ret}]"
185
185
  ret += datefn
@@ -187,7 +187,7 @@ module IsoDoc
187
187
  ret.gsub(/-/, "‑").gsub(/ /, " ")
188
188
  end
189
189
 
190
- def biblio_ref_entry_code(_ordinal, idents, _id, _standard, datefn)
190
+ def biblio_ref_entry_code(_ordinal, idents, _id, _standard, datefn, _bib)
191
191
  ret = (idents[:metanorma] || idents[:sdo] || idents[:ordinal]).to_s
192
192
  !idents[:metanorma] && idents[:sdo] and ret = "[#{ret}]"
193
193
  ret += datefn
@@ -97,10 +97,14 @@ module IsoDoc
97
97
  end
98
98
  end
99
99
 
100
+ def subfigure_label(subfignum)
101
+ subfignum.zero? and return ""
102
+ "-#{(subfignum + 96).chr}"
103
+ end
104
+
100
105
  def sequential_figure_body(subfignum, counter, block, klass)
101
106
  label = counter.print
102
- label &&= label +
103
- (subfignum.zero? ? "" : "#{hierfigsep}#{(subfignum + 96).chr}")
107
+ label &&= label + subfigure_label(subfignum)
104
108
  @anchors[block["id"]] = anchor_struct(
105
109
  label, nil, @labels[klass] || klass.capitalize, klass,
106
110
  block["unnumbered"]
@@ -108,9 +112,7 @@ module IsoDoc
108
112
  end
109
113
 
110
114
  def hierarchical_figure_body(num, subfignum, counter, block, klass)
111
- label = "#{num}#{hiersep}#{counter.print}" +
112
- (subfignum.zero? ? "" : "#{hierfigsep}#{(subfignum + 96).chr}")
113
-
115
+ label = "#{num}#{hiersep}#{counter.print}" + subfigure_label(subfignum)
114
116
  @anchors[block["id"]] = anchor_struct(
115
117
  label, nil, @labels[klass] || klass.capitalize,
116
118
  klass, block["unnumbered"]
@@ -216,6 +216,9 @@
216
216
  <optional>
217
217
  <ref name="fullname"/>
218
218
  </optional>
219
+ <zeroOrMore>
220
+ <ref name="credential"/>
221
+ </zeroOrMore>
219
222
  <zeroOrMore>
220
223
  <ref name="affiliation"/>
221
224
  </zeroOrMore>
@@ -232,6 +235,11 @@
232
235
  <ref name="FullNameType"/>
233
236
  </element>
234
237
  </define>
238
+ <define name="credential">
239
+ <element name="credential">
240
+ <text/>
241
+ </element>
242
+ </define>
235
243
  <define name="FullNameType">
236
244
  <choice>
237
245
  <group>
@@ -305,7 +313,9 @@
305
313
  <zeroOrMore>
306
314
  <ref name="affiliationdescription"/>
307
315
  </zeroOrMore>
308
- <ref name="organization"/>
316
+ <optional>
317
+ <ref name="organization"/>
318
+ </optional>
309
319
  </element>
310
320
  </define>
311
321
  <define name="affiliationname">
@@ -37,10 +37,10 @@ module Metanorma
37
37
  end
38
38
 
39
39
  def itu_id(node, xml)
40
- return unless node.attr("docnumber")
40
+ return unless node.attr("docnumber") || node.attr("docidentifier")
41
41
 
42
42
  xml.docidentifier type: "ITU" do |i|
43
- i << itu_id1(node, false)
43
+ i << (node.attr("docidentifier") || itu_id1(node, false))
44
44
  end
45
45
  xml.docidentifier type: "ITU-lang" do |i|
46
46
  i << itu_id1(node, true)
@@ -1578,6 +1578,9 @@
1578
1578
  <zeroOrMore>
1579
1579
  <ref name="indexsect"/>
1580
1580
  </zeroOrMore>
1581
+ <optional>
1582
+ <ref name="colophon"/>
1583
+ </optional>
1581
1584
  </element>
1582
1585
  </define>
1583
1586
  <define name="misccontainer">
@@ -1600,6 +1603,13 @@
1600
1603
  </oneOrMore>
1601
1604
  </element>
1602
1605
  </define>
1606
+ <define name="colophon">
1607
+ <element name="colophon">
1608
+ <oneOrMore>
1609
+ <ref name="content"/>
1610
+ </oneOrMore>
1611
+ </element>
1612
+ </define>
1603
1613
  <define name="foreword">
1604
1614
  <element name="foreword">
1605
1615
  <ref name="Content-Section"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.2.5".freeze
3
+ VERSION = "2.2.6".freeze
4
4
  end
5
5
  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.2.5
4
+ version: 2.2.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: 2023-02-07 00:00:00.000000000 Z
11
+ date: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities