metanorma-generic 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0dd504b980d302a384bf30ad0cb8bb27f187872d50aebd306a589dddfed2bb1b
4
- data.tar.gz: d5bbbc40fa58ea157bf1c2e04653031598fd4c3c5639930863ee3c00e4213973
3
+ metadata.gz: c4f4ab3c878c5e271d13ea0b54fb8b767d43727cb1c6d5d2001713fcee1a6060
4
+ data.tar.gz: 73f97affc1f31b62ea13d7b07d27af03992edb4345cad6fa450ce63819beedfd
5
5
  SHA512:
6
- metadata.gz: 2d4f3a66ff3d2b843dd8b0f7da4cef54047f3b5c6a6ebfff78e60e398e8a60e299295b93bbacbc87899ff017c9c6d69b27a9b3d7227f251bf7db952545ec5dbd
7
- data.tar.gz: 400488911c1e7a003ad49d38e162c93dd2ef8eb2c8e5113554424ce1b322ffd9747917360c718c42c75e4029a767fd7fc7cd103112a11f77e74a793230871ceb
6
+ metadata.gz: 5a3da7cb82b0a039eb7826652cf8d398b4d2cfbf74af64c9fca2daea1ade6d1aebfb8c403004fde734b3050b049c246fb1bfb8100680f85598d18c0abe2c7f2a
7
+ data.tar.gz: 59a1922fea21ca1d1167b1648beecdba198e210fca8232389201af9c4e8a16d75f00ccb4015a2492c08e3d4ce34138e8a108d18306cc0006295424d8e3b4e772
@@ -82,6 +82,12 @@ div.figure {
82
82
  @include figureBlock();
83
83
  }
84
84
 
85
+ table div.figure {
86
+ padding: 0;
87
+ margin: 0;
88
+ }
89
+
90
+
85
91
  /*
86
92
  Document types + stages
87
93
  */
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
@@ -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">
@@ -1316,7 +1326,7 @@
1316
1326
  <value>commentaryOf</value>
1317
1327
  <value>hasCommentary</value>
1318
1328
  <value>related</value>
1319
- <value>complements</value>
1329
+ <value>hasComplement</value>
1320
1330
  <value>complementOf</value>
1321
1331
  <value>obsoletes</value>
1322
1332
  <value>obsoletedBy</value>
@@ -32,6 +32,7 @@ module Metanorma
32
32
  template = configuration.docid_template ||
33
33
  "{{ organization_name_short }} {{ docnumeric }}"
34
34
  docid = xmldoc.at("//bibdata/docidentifier")
35
+ docid&.text&.empty? or return
35
36
  id = boilerplate_isodoc(xmldoc).populate_template(template, nil)
36
37
  (id.empty? and docid.remove) or docid.children = id
37
38
  end
@@ -9,7 +9,7 @@ module Metanorma
9
9
  if !configuration.organization_name_long.empty? &&
10
10
  !configuration.organization_name_short.empty? &&
11
11
  configuration.organization_name_long !=
12
- configuration.organization_name_short
12
+ configuration.organization_name_short
13
13
  { configuration.organization_name_long =>
14
14
  configuration.organization_name_short }
15
15
  else
@@ -23,13 +23,14 @@ module Metanorma
23
23
 
24
24
  def metadata_committee(node, xml)
25
25
  return unless node.attr("committee")
26
+
26
27
  xml.editorialgroup do |a|
27
28
  a.committee node.attr("committee"),
28
- **attr_code(type: node.attr("committee-type"))
29
+ **attr_code(type: node.attr("committee-type"))
29
30
  i = 2
30
- while node.attr("committee_#{i}") do
31
+ while node.attr("committee_#{i}")
31
32
  a.committee node.attr("committee_#{i}"),
32
- **attr_code(type: node.attr("committee-type_#{i}"))
33
+ **attr_code(type: node.attr("committee-type_#{i}"))
33
34
  i += 1
34
35
  end
35
36
  end
@@ -38,16 +39,16 @@ module Metanorma
38
39
  def metadata_status(node, xml)
39
40
  xml.status do |s|
40
41
  s.stage ( node.attr("status") || node.attr("docstage") ||
41
- configuration.default_stage || "published" )
42
+ configuration.default_stage || "published")
42
43
  x = node.attr("substage") and s.substage x
43
44
  x = node.attr("iteration") and s.iteration x
44
45
  end
45
46
  end
46
47
 
47
48
  def metadata_id(node, xml)
48
- xml.docidentifier **{ type:
49
- configuration.organization_name_short } do |i|
50
- i << "DUMMY"
49
+ xml.docidentifier type:
50
+ configuration.organization_name_short do |i|
51
+ i << (node.attr("docidentifier") || "")
51
52
  end
52
53
  xml.docnumber { |i| i << node.attr("docnumber") }
53
54
  end
@@ -72,8 +73,9 @@ module Metanorma
72
73
 
73
74
  def metadata_ext_hash(node, ext, hash)
74
75
  hash.each do |k, v|
75
- next if EXT_STRUCT.include?(k) || !v&.is_a?(Hash) && !node.attr(k)
76
- if v&.is_a?(Hash) && v["_list"]
76
+ next if EXT_STRUCT.include?(k) || (!v.is_a?(Hash) && !node.attr(k))
77
+
78
+ if v.is_a?(Hash) && v["_list"]
77
79
  csv_split(node.attr(k), ",").each do |val|
78
80
  metadata_ext_hash1(k, val, ext, v, node)
79
81
  end
@@ -84,21 +86,25 @@ module Metanorma
84
86
  end
85
87
 
86
88
  def metadata_ext_hash1(key, value, ext, hash, node)
87
- return if hash&.is_a?(Hash) && hash["_attribute"]
88
- is_hash = hash&.is_a?(Hash) &&
89
- !hash.keys.reject { |n| EXT_STRUCT.include?(n) }.empty?
89
+ return if hash.is_a?(Hash) && hash["_attribute"]
90
+
91
+ is_hash = hash.is_a?(Hash) &&
92
+ !hash.keys.reject { |n| EXT_STRUCT.include?(n) }.empty?
90
93
  return if !is_hash && (value.nil? || value.empty?)
91
- name = hash&.is_a?(Hash) ? (hash["_output"] || key) : key
94
+
95
+ name = hash.is_a?(Hash) ? (hash["_output"] || key) : key
92
96
  ext.send name, **attr_code(metadata_ext_attrs(hash, node)) do |e|
93
- is_hash ? metadata_ext_hash(node, e, hash) : (e << value)
97
+ is_hash ? metadata_ext_hash(node, e, hash) : (e << value)
94
98
  end
95
99
  end
96
100
 
97
101
  def metadata_ext_attrs(hash, node)
98
102
  return {} unless hash.is_a?(Hash)
103
+
99
104
  ret = {}
100
105
  hash.each do |k, v|
101
106
  next unless v.is_a?(Hash) && v["_attribute"]
107
+
102
108
  ret[(v["_output"] || k).to_sym] = node.attr(k)
103
109
  end
104
110
  ret
@@ -66,6 +66,7 @@
66
66
  <value>caution</value>
67
67
  <value>statement</value>
68
68
  <value>editorial</value>
69
+ <value>box</value>
69
70
  </choice>
70
71
  </define>
71
72
  <define name="index">
@@ -571,6 +572,11 @@
571
572
  <ref name="MultilingualRenderingType"/>
572
573
  </attribute>
573
574
  </optional>
575
+ <optional>
576
+ <attribute name="linenums">
577
+ <data type="boolean"/>
578
+ </attribute>
579
+ </optional>
574
580
  <optional>
575
581
  <ref name="tname"/>
576
582
  </optional>
@@ -1238,6 +1244,11 @@
1238
1244
  </define>
1239
1245
  <define name="concept">
1240
1246
  <element name="concept">
1247
+ <optional>
1248
+ <attribute name="bold">
1249
+ <data type="boolean"/>
1250
+ </attribute>
1251
+ </optional>
1241
1252
  <optional>
1242
1253
  <attribute name="ital">
1243
1254
  <data type="boolean"/>
@@ -1567,10 +1578,13 @@
1567
1578
  <zeroOrMore>
1568
1579
  <ref name="indexsect"/>
1569
1580
  </zeroOrMore>
1581
+ <optional>
1582
+ <ref name="colophon"/>
1583
+ </optional>
1570
1584
  </element>
1571
1585
  </define>
1572
1586
  <define name="misccontainer">
1573
- <element name="misc-container">
1587
+ <element name="metanorma-extension">
1574
1588
  <oneOrMore>
1575
1589
  <ref name="AnyElement"/>
1576
1590
  </oneOrMore>
@@ -1589,6 +1603,13 @@
1589
1603
  </oneOrMore>
1590
1604
  </element>
1591
1605
  </define>
1606
+ <define name="colophon">
1607
+ <element name="colophon">
1608
+ <oneOrMore>
1609
+ <ref name="content"/>
1610
+ </oneOrMore>
1611
+ </element>
1612
+ </define>
1592
1613
  <define name="foreword">
1593
1614
  <element name="foreword">
1594
1615
  <ref name="Content-Section"/>
@@ -2653,7 +2674,7 @@
2653
2674
  <value>full</value>
2654
2675
  <value>short</value>
2655
2676
  <value>id</value>
2656
- <value>modspec</value>
2677
+ <text/>
2657
2678
  </choice>
2658
2679
  </define>
2659
2680
  <define name="erefTypeWithConnective">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "2.3.0".freeze
3
+ VERSION = "2.3.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
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: 2023-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities