metanorma-generic 3.2.0 → 3.2.2
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.
- checksums.yaml +4 -4
- data/lib/isodoc/generic/metadata.rb +10 -12
- data/lib/metanorma/generic/biblio.rng +18 -8
- data/lib/metanorma/generic/front.rb +10 -5
- data/lib/metanorma/generic/isodoc.rng +27 -10
- 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: 142ff668c810de695105351da5b83f38d1c50d5d97889389fd91c9aa85748443
|
|
4
|
+
data.tar.gz: 9fc97bedaaae979ed280274b9faa0d3cb777a7380a01c8ed00a7dad5483a081a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e014e23fd479eee366d9fa16954e482dd2d7a34e3e52a9fcfa62fa41e3ccf1f4bd0421b57b357db15828c241c1f53fa4b7fb30b7774ecdb4a8a8014e32910383
|
|
7
|
+
data.tar.gz: 50c472c1c2ad288c7845b9a38af6c9de9022fa9b2a641f5104066c0869e03f3f9c42bcc570a3f868b7e3e59e6b88277c0dbc95afac4067343db5d1491c5f2df3
|
|
@@ -31,18 +31,6 @@ end
|
|
|
31
31
|
module IsoDoc
|
|
32
32
|
module Generic
|
|
33
33
|
class Metadata < IsoDoc::Metadata
|
|
34
|
-
def initialize(lang, script, locale, labels)
|
|
35
|
-
super
|
|
36
|
-
here = File.dirname(__FILE__)
|
|
37
|
-
default_logo_path =
|
|
38
|
-
File.expand_path(File.join(here, "html", "logo.jpg"))
|
|
39
|
-
set(:logo, baselocation(configuration.logo_path) || default_logo_path)
|
|
40
|
-
unless configuration.logo_paths.nil?
|
|
41
|
-
set(:logo_paths,
|
|
42
|
-
Array(configuration.logo_paths).map { |p| baselocation(p) })
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
34
|
class << self
|
|
47
35
|
attr_accessor :_file
|
|
48
36
|
end
|
|
@@ -51,6 +39,16 @@ module IsoDoc
|
|
|
51
39
|
klass._file = caller_locations(1..1).first.absolute_path
|
|
52
40
|
end
|
|
53
41
|
|
|
42
|
+
def images(isoxml, out)
|
|
43
|
+
default_logo_path =
|
|
44
|
+
File.expand_path(File.join(File.dirname(__FILE__), "html", "logo.jpg"))
|
|
45
|
+
set(:logo, baselocation(configuration.logo_path) || default_logo_path)
|
|
46
|
+
unless configuration.logo_paths.nil?
|
|
47
|
+
set(:logo_paths,
|
|
48
|
+
Array(configuration.logo_paths).map { |p| baselocation(p) })
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
54
52
|
def author(isoxml, _out)
|
|
55
53
|
super
|
|
56
54
|
tc = isoxml.at(ns("//bibdata/contributor[role/description = 'committee']/organization/subdivision[@type = 'Committee']/name"))
|
|
@@ -466,11 +466,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
466
466
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
|
467
467
|
</ref>
|
|
468
468
|
</optional>
|
|
469
|
-
<
|
|
469
|
+
<zeroOrMore>
|
|
470
470
|
<ref name="logo">
|
|
471
471
|
<a:documentation>A logo for the organization</a:documentation>
|
|
472
472
|
</ref>
|
|
473
|
-
</
|
|
473
|
+
</zeroOrMore>
|
|
474
474
|
</define>
|
|
475
475
|
<define name="orgname">
|
|
476
476
|
<element name="name">
|
|
@@ -502,6 +502,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
502
502
|
</define>
|
|
503
503
|
<define name="logo">
|
|
504
504
|
<element name="logo">
|
|
505
|
+
<optional>
|
|
506
|
+
<attribute name="type">
|
|
507
|
+
<a:documentation>The type of logo</a:documentation>
|
|
508
|
+
</attribute>
|
|
509
|
+
</optional>
|
|
505
510
|
<ref name="image-no-id"/>
|
|
506
511
|
</element>
|
|
507
512
|
</define>
|
|
@@ -513,6 +518,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
513
518
|
<a:documentation>Description of what is being depicted</a:documentation>
|
|
514
519
|
</attribute>
|
|
515
520
|
</optional>
|
|
521
|
+
<optional>
|
|
522
|
+
<attribute name="type">
|
|
523
|
+
<a:documentation>Description of what kind of depiction this</a:documentation>
|
|
524
|
+
</attribute>
|
|
525
|
+
</optional>
|
|
516
526
|
<zeroOrMore>
|
|
517
527
|
<ref name="image-no-id">
|
|
518
528
|
<a:documentation>A visual depiction of the bibliographic item</a:documentation>
|
|
@@ -690,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
700
|
<define name="CitationType">
|
|
691
701
|
<attribute name="bibitemid">
|
|
692
702
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
703
|
+
<ref name="IdRefType"/>
|
|
694
704
|
</attribute>
|
|
695
705
|
<choice>
|
|
696
706
|
<zeroOrMore>
|
|
@@ -1236,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
|
|
|
1236
1246
|
<optional>
|
|
1237
1247
|
<ref name="validity"/>
|
|
1238
1248
|
</optional>
|
|
1239
|
-
<
|
|
1249
|
+
<zeroOrMore>
|
|
1240
1250
|
<ref name="depiction"/>
|
|
1241
|
-
</
|
|
1251
|
+
</zeroOrMore>
|
|
1242
1252
|
</define>
|
|
1243
1253
|
<define name="btitle">
|
|
1244
1254
|
<a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
|
|
@@ -1296,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1306
|
</define>
|
|
1297
1307
|
<define name="validityBegins">
|
|
1298
1308
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1310
|
</element>
|
|
1301
1311
|
</define>
|
|
1302
1312
|
<define name="validityEnds">
|
|
1303
1313
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1314
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1315
|
</element>
|
|
1306
1316
|
</define>
|
|
1307
1317
|
<define name="validityRevision">
|
|
1308
1318
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1319
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1320
|
</element>
|
|
1311
1321
|
</define>
|
|
1312
1322
|
<define name="TypedTitleString">
|
|
@@ -27,10 +27,14 @@ module Metanorma
|
|
|
27
27
|
|
|
28
28
|
def metadata_status(node, xml)
|
|
29
29
|
xml.status do |s|
|
|
30
|
-
s
|
|
30
|
+
add_noko_elem(s, "stage", node.attr("status") || node.attr("docstage") ||
|
|
31
31
|
configuration.default_stage || "published")
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
# s.stage ( node.attr("status") || node.attr("docstage") ||
|
|
33
|
+
# configuration.default_stage || "published")
|
|
34
|
+
add_noko_elem(s, "substage", node.attr("substage"))
|
|
35
|
+
# x = node.attr("substage") and s.substage x
|
|
36
|
+
add_noko_elem(s, "iteration", node.attr("iteration"))
|
|
37
|
+
# x = node.attr("iteration") and s.iteration x
|
|
34
38
|
end
|
|
35
39
|
end
|
|
36
40
|
|
|
@@ -65,13 +69,14 @@ module Metanorma
|
|
|
65
69
|
removed_count += 1
|
|
66
70
|
end
|
|
67
71
|
removed_count.zero? and break # Stop when no elems removed this pass
|
|
68
|
-
|
|
69
72
|
end
|
|
70
73
|
end
|
|
71
74
|
|
|
72
75
|
def metadata_doctype(node, xml)
|
|
73
76
|
d = doctype(node)
|
|
74
|
-
xml
|
|
77
|
+
add_noko_elem(xml, "doctype", d,
|
|
78
|
+
abbreviation: configuration&.doctypes&.dig(d))
|
|
79
|
+
# xml.doctype d, attr_code(abbreviation: configuration&.doctypes&.dig(d))
|
|
75
80
|
end
|
|
76
81
|
|
|
77
82
|
EXT_STRUCT = %w(_output _attribute _list).freeze
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.5 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|
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: 3.2.
|
|
4
|
+
version: 3.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|