metanorma-itu 2.2.1 → 2.2.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.
@@ -123,8 +123,8 @@ module IsoDoc
123
123
  f = renderings[xml["id"]][:formattedref]
124
124
  f &&= "<formattedref>#{f}</formattedref>"
125
125
  # retain date in order to generate reference tag
126
- xml.children =
127
- "#{f}#{xml.xpath(ns('./docidentifier | ./uri | ./note | ./date')).to_xml}"
126
+ keep = "./docidentifier | ./uri | ./note | ./date | ./biblio-tag"
127
+ xml.children = "#{f}#{xml.xpath(ns(keep)).to_xml}"
128
128
  end
129
129
 
130
130
  def twitter_cldr_localiser_symbols
@@ -179,6 +179,22 @@ module IsoDoc
179
179
  super
180
180
  end
181
181
 
182
+ def norm_ref_entry_code(_ordinal, idents, _ids, _standard, datefn)
183
+ ret = (idents[:metanorma] || idents[:sdo] || idents[:ordinal]).to_s
184
+ !idents[:metanorma] && idents[:sdo] and ret = "[#{ret}]"
185
+ ret += datefn
186
+ ret.empty? and return ret
187
+ ret.gsub(/-/, "&#x2011;").gsub(/ /, "&#xa0;")
188
+ end
189
+
190
+ def biblio_ref_entry_code(_ordinal, idents, _id, _standard, datefn)
191
+ ret = (idents[:metanorma] || idents[:sdo] || idents[:ordinal]).to_s
192
+ !idents[:metanorma] && idents[:sdo] and ret = "[#{ret}]"
193
+ ret += datefn
194
+ ret.empty? and return ret
195
+ ret.gsub(/-/, "&#x2011;").gsub(/ /, "&#xa0;")
196
+ end
197
+
182
198
  include Init
183
199
  end
184
200
  end
@@ -7,24 +7,14 @@ module IsoDoc
7
7
  module BaseConvert
8
8
  def nonstd_bibitem(list, bibitem, _ordinal, biblio)
9
9
  list.tr **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
10
- id = render_identifier(bibitem_ref_code(bibitem))
11
10
  ref.td **{ style: "vertical-align:top" } do |td|
12
- td << pick_ident(id)
13
- &.gsub(/-/, "&#x2011;")&.gsub(/ /, "&#xa0;")
14
- date_note_process(bibitem, td)
11
+ tag = bibitem.at(ns("./biblio-tag"))
12
+ tag&.children&.each { |n| parse(n, td) }
15
13
  end
16
14
  ref.td { |td| reference_format(bibitem, td) }
17
15
  end
18
16
  end
19
17
 
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
-
28
18
  def std_bibitem_entry(list, bibitem, ordinal, biblio)
29
19
  nonstd_bibitem(list, bibitem, ordinal, biblio)
30
20
  end
@@ -101,7 +101,7 @@ module IsoDoc
101
101
  olstyle: "l2" }
102
102
  end
103
103
 
104
- def make_tr_attr(tcell, row, totalrows, header)
104
+ def make_tr_attr(tcell, row, totalrows, header, bordered)
105
105
  super.merge(valign: "top")
106
106
  end
107
107
 
@@ -1238,6 +1238,11 @@
1238
1238
  </define>
1239
1239
  <define name="concept">
1240
1240
  <element name="concept">
1241
+ <optional>
1242
+ <attribute name="bold">
1243
+ <data type="boolean"/>
1244
+ </attribute>
1245
+ </optional>
1241
1246
  <optional>
1242
1247
  <attribute name="ital">
1243
1248
  <data type="boolean"/>
@@ -2653,7 +2658,7 @@
2653
2658
  <value>full</value>
2654
2659
  <value>short</value>
2655
2660
  <value>id</value>
2656
- <value>modspec</value>
2661
+ <text/>
2657
2662
  </choice>
2658
2663
  </define>
2659
2664
  <define name="erefTypeWithConnective">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ITU
3
- VERSION = "2.2.1".freeze
3
+ VERSION = "2.2.3".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.1
4
+ version: 2.2.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: 2022-12-05 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities