metanorma-ogc 2.5.1 → 2.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/html/scripts.html +3 -2
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/init.rb +5 -0
- data/lib/isodoc/ogc/metadata.rb +4 -2
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +111 -16
- data/lib/isodoc/ogc/ogc.best-practice.xsl +111 -16
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +111 -16
- data/lib/isodoc/ogc/ogc.community-practice.xsl +111 -16
- data/lib/isodoc/ogc/ogc.community-standard.xsl +111 -16
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +111 -16
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +111 -16
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +111 -16
- data/lib/isodoc/ogc/ogc.other.xsl +111 -16
- data/lib/isodoc/ogc/ogc.policy.xsl +111 -16
- data/lib/isodoc/ogc/ogc.reference-model.xsl +111 -16
- data/lib/isodoc/ogc/ogc.release-notes.xsl +111 -16
- data/lib/isodoc/ogc/ogc.standard.xsl +111 -16
- data/lib/isodoc/ogc/ogc.test-suite.xsl +111 -16
- data/lib/isodoc/ogc/ogc.user-guide.xsl +111 -16
- data/lib/isodoc/ogc/ogc.white-paper.xsl +116 -16
- data/lib/isodoc/ogc/presentation_xml_convert.rb +0 -4
- data/lib/metanorma/ogc/biblio.rng +28 -25
- data/lib/metanorma/ogc/front.rb +23 -16
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
data/lib/metanorma/ogc/front.rb
CHANGED
@@ -10,14 +10,20 @@ module Metanorma
|
|
10
10
|
personal_author(node, xml)
|
11
11
|
end
|
12
12
|
|
13
|
+
def safe_xml_string(node, key, value)
|
14
|
+
node.send key do |n|
|
15
|
+
n << value
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
13
19
|
def corporate_author(node, xml)
|
14
20
|
node.attr("submitting-organizations") or return
|
15
|
-
csv_split(
|
16
|
-
|
21
|
+
csv_split(@c.decode(node.attr("submitting-organizations")),
|
22
|
+
";")&.each do |org|
|
17
23
|
xml.contributor do |c|
|
18
24
|
c.role type: "author"
|
19
25
|
c.organization do |a|
|
20
|
-
a
|
26
|
+
safe_xml_string(a, "name", org)
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
@@ -39,9 +45,7 @@ module Metanorma
|
|
39
45
|
type = node.attr("role#{suffix}")&.downcase || "editor"
|
40
46
|
if type == "contributor"
|
41
47
|
contrib.role type: "author" do |r|
|
42
|
-
r
|
43
|
-
d << type
|
44
|
-
end
|
48
|
+
safe_xml_string(r, "description", type)
|
45
49
|
end
|
46
50
|
else contrib.role type: type
|
47
51
|
end
|
@@ -64,23 +68,27 @@ module Metanorma
|
|
64
68
|
personal_role(node, c, suffix)
|
65
69
|
c.person do |p|
|
66
70
|
p.name do |n|
|
67
|
-
|
68
|
-
n.completename node.attr("fullname#{suffix}")
|
69
|
-
else
|
70
|
-
n.forename node.attr("givenname#{suffix}")
|
71
|
-
n.surname node.attr("surname#{suffix}")
|
72
|
-
end
|
71
|
+
personal_author_name(node, n, suffix)
|
73
72
|
end
|
74
73
|
end
|
75
74
|
end
|
76
75
|
end
|
77
76
|
|
77
|
+
def personal_author_name(node, xml, suffix)
|
78
|
+
if node.attr("fullname#{suffix}")
|
79
|
+
safe_xml_string(xml, "completename", node.attr("fullname#{suffix}"))
|
80
|
+
else
|
81
|
+
safe_xml_string(xml, "forename", node.attr("givenname#{suffix}"))
|
82
|
+
safe_xml_string(xml, "surname", node.attr("surname#{suffix}"))
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
78
86
|
def default_publisher
|
79
87
|
"OGC"
|
80
88
|
end
|
81
89
|
|
82
|
-
|
83
|
-
|
90
|
+
def org_abbrev
|
91
|
+
{ "Open Geospatial Consortium" => "OGC" }
|
84
92
|
end
|
85
93
|
|
86
94
|
def metadata_committee(node, xml)
|
@@ -108,7 +116,7 @@ module Metanorma
|
|
108
116
|
a = node.attr("abbrev")
|
109
117
|
d && a or return
|
110
118
|
url = "http://www.opengis.net/doc/#{IsoDoc::Ogc::DOCTYPE_ABBR[d]}/#{a}"
|
111
|
-
v =
|
119
|
+
v = node.attr("edition") || node.attr("version") and url += "/#{v}"
|
112
120
|
url
|
113
121
|
end
|
114
122
|
|
@@ -119,7 +127,6 @@ module Metanorma
|
|
119
127
|
docnumber = node.attr("docnumber") || node.attr("docreference")
|
120
128
|
id = node.attr("docidentifier") || docnumber
|
121
129
|
xml.docidentifier id, type: "ogc-internal"
|
122
|
-
docnumber and xml.docnumber docnumber
|
123
130
|
end
|
124
131
|
|
125
132
|
def externalurl(node)
|
data/metanorma-ogc.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
27
27
|
|
28
28
|
spec.add_dependency "iso-639"
|
29
|
-
spec.add_dependency "metanorma-standoc", "~> 2.8.
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 2.8.4"
|
30
30
|
|
31
31
|
spec.add_development_dependency "debug"
|
32
32
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.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: 2024-
|
11
|
+
date: 2024-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.8.
|
33
|
+
version: 2.8.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.8.
|
40
|
+
version: 2.8.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: debug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|