metanorma-itu 2.1.6 → 2.1.8.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,7 @@ module IsoDoc
9
9
  list.tr **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
10
10
  id = render_identifier(bibitem_ref_code(bibitem))
11
11
  ref.td **{ style: "vertical-align:top" } do |td|
12
- td << (id[:metanorma] || "[#{id[:sdo]}]")
12
+ td << pick_ident(id)
13
13
  &.gsub(/-/, "&#x2011;")&.gsub(/ /, "&#xa0;")
14
14
  date_note_process(bibitem, td)
15
15
  end
@@ -17,6 +17,14 @@ module IsoDoc
17
17
  end
18
18
  end
19
19
 
20
+ def pick_ident(id)
21
+ return id[:metanorma] if id[:metanorma]
22
+ return "[#{id[:sdo]}]" if id[:sdo]
23
+ return id[:ordinal] if id[:ordinal]
24
+
25
+ ""
26
+ end
27
+
20
28
  def std_bibitem_entry(list, bibitem, ordinal, biblio)
21
29
  nonstd_bibitem(list, bibitem, ordinal, biblio)
22
30
  end
@@ -73,7 +81,8 @@ module IsoDoc
73
81
  id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
74
82
  "#{IGNORE_IDS})]"))
75
83
  id.empty? and
76
- id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma')]"))
84
+ id = bibitem.xpath(ns("./docidentifier[not(@type = 'metanorma' or "\
85
+ "@type = 'metanorma-ordinal')]"))
77
86
  return [] if id.empty?
78
87
 
79
88
  id.sort_by { |i| i["type"] == "ITU" ? 0 : 1 }
@@ -225,9 +225,9 @@
225
225
  <zeroOrMore>
226
226
  <ref name="forename"/>
227
227
  </zeroOrMore>
228
- <zeroOrMore>
229
- <ref name="initial"/>
230
- </zeroOrMore>
228
+ <optional>
229
+ <ref name="formatted-initials"/>
230
+ </optional>
231
231
  <ref name="surname"/>
232
232
  <zeroOrMore>
233
233
  <ref name="addition"/>
@@ -247,8 +247,8 @@
247
247
  <ref name="LocalizedString"/>
248
248
  </element>
249
249
  </define>
250
- <define name="initial">
251
- <element name="initial">
250
+ <define name="formatted-initials">
251
+ <element name="formatted-initials">
252
252
  <ref name="LocalizedString"/>
253
253
  </element>
254
254
  </define>
@@ -264,6 +264,9 @@
264
264
  </define>
265
265
  <define name="forename">
266
266
  <element name="forename">
267
+ <optional>
268
+ <attribute name="initial"/>
269
+ </optional>
267
270
  <ref name="LocalizedString"/>
268
271
  </element>
269
272
  </define>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.1.6".freeze
3
+ VERSION = "2.1.8.1".freeze
4
4
  end
5
5
  end
data/lib/metanorma-itu.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  require "metanorma/itu"
2
2
  require "asciidoctor"
3
3
  require "isodoc/itu"
4
+ require "metanorma"
4
5
 
5
- if defined? Metanorma
6
+ if defined? Metanorma::Registry
6
7
  Metanorma::Registry.instance.register(Metanorma::ITU::Processor)
7
8
  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.1.6
4
+ version: 2.1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-08 00:00:00.000000000 Z
11
+ date: 2022-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -258,6 +258,7 @@ extensions: []
258
258
  extra_rdoc_files: []
259
259
  files:
260
260
  - ".github/workflows/rake.yml"
261
+ - ".github/workflows/release.yml"
261
262
  - ".gitignore"
262
263
  - ".hound.yml"
263
264
  - ".rubocop.yml"
@@ -342,7 +343,7 @@ homepage: https://github.com/metanorma/metanorma-itu
342
343
  licenses:
343
344
  - BSD-2-Clause
344
345
  metadata: {}
345
- post_install_message:
346
+ post_install_message:
346
347
  rdoc_options: []
347
348
  require_paths:
348
349
  - lib
@@ -357,8 +358,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
357
358
  - !ruby/object:Gem::Version
358
359
  version: '0'
359
360
  requirements: []
360
- rubygems_version: 3.3.16
361
- signing_key:
361
+ rubygems_version: 3.1.6
362
+ signing_key:
362
363
  specification_version: 4
363
364
  summary: Metanorma for the ITU
364
365
  test_files: []