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 +4 -4
- data/lib/isodoc/generic/html/htmlstyle.scss +6 -0
- data/lib/metanorma/generic/basicdoc.rng +0 -1
- data/lib/metanorma/generic/biblio.rng +12 -2
- data/lib/metanorma/generic/converter.rb +1 -0
- data/lib/metanorma/generic/front.rb +21 -15
- data/lib/metanorma/generic/isodoc.rng +23 -2
- data/lib/metanorma/generic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4f4ab3c878c5e271d13ea0b54fb8b767d43727cb1c6d5d2001713fcee1a6060
|
4
|
+
data.tar.gz: 73f97affc1f31b62ea13d7b07d27af03992edb4345cad6fa450ce63819beedfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a3da7cb82b0a039eb7826652cf8d398b4d2cfbf74af64c9fca2daea1ade6d1aebfb8c403004fde734b3050b049c246fb1bfb8100680f85598d18c0abe2c7f2a
|
7
|
+
data.tar.gz: 59a1922fea21ca1d1167b1648beecdba198e210fca8232389201af9c4e8a16d75f00ccb4015a2492c08e3d4ce34138e8a108d18306cc0006295424d8e3b4e772
|
@@ -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
|
-
<
|
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>
|
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
|
-
|
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
|
-
|
29
|
+
**attr_code(type: node.attr("committee-type"))
|
29
30
|
i = 2
|
30
|
-
while node.attr("committee_#{i}")
|
31
|
+
while node.attr("committee_#{i}")
|
31
32
|
a.committee node.attr("committee_#{i}"),
|
32
|
-
|
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
|
49
|
-
configuration.organization_name_short
|
50
|
-
i << "
|
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
|
76
|
-
|
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
|
88
|
-
|
89
|
-
|
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
|
-
|
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
|
-
|
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="
|
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
|
-
<
|
2677
|
+
<text/>
|
2657
2678
|
</choice>
|
2658
2679
|
</define>
|
2659
2680
|
<define name="erefTypeWithConnective">
|
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.
|
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:
|
11
|
+
date: 2023-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|