metanorma-iho 0.7.3 → 0.7.4
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/metanorma/iho/basicdoc.rng +0 -1
- data/lib/metanorma/iho/converter.rb +12 -5
- data/lib/metanorma/iho/isodoc.rng +1 -0
- data/lib/metanorma/iho/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: d32cbaa857fe5083ce8d434831b7f9124205fafe7401c244f8034ae90004aa81
|
4
|
+
data.tar.gz: d3b34abd94dfbbb636fbc07d86565faabaaa6a5c179ee773f32e275dfa7ce21a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac677f15e9b347f9c436d1e5d2ad0aadd6b876b67625f79b8d028be3f60e1681bb54e52f26f7b499f473eefa7bbc567a659db76f6b90e030b8c2142e7f690869
|
7
|
+
data.tar.gz: 0e1978eac7b0cf129df8d90a357f4679e0b2f927b1059847ed1a9fa3b70314d4d58119f1de845720534ea52f85ca77ff43cbcc1cf46e956715504d45c5558f92
|
@@ -3,9 +3,6 @@ require "metanorma/generic/converter"
|
|
3
3
|
|
4
4
|
module Metanorma
|
5
5
|
module IHO
|
6
|
-
# A {Converter} implementation that generates RSD output, and a document
|
7
|
-
# schema encapsulation of the document for validation
|
8
|
-
#
|
9
6
|
class Converter < Metanorma::Generic::Converter
|
10
7
|
XML_ROOT_TAG = "iho-standard".freeze
|
11
8
|
XML_NAMESPACE = "https://www.metanorma.org/ns/iho".freeze
|
@@ -19,7 +16,7 @@ module Metanorma
|
|
19
16
|
end
|
20
17
|
|
21
18
|
def appendix_parse(attrs, xml, node)
|
22
|
-
attrs["inline-header"
|
19
|
+
attrs[:"inline-header"] = node.option? "inline-header"
|
23
20
|
set_obligation(attrs, node)
|
24
21
|
xml.appendix **attr_code(attrs) do |xml_section|
|
25
22
|
xml_section.title { |name| name << node.title }
|
@@ -37,7 +34,7 @@ module Metanorma
|
|
37
34
|
|
38
35
|
def metadata_series(node, xml)
|
39
36
|
series = node.attr("series") or return
|
40
|
-
xml.series
|
37
|
+
xml.series type: "main" do |s|
|
41
38
|
s.title SERIESNAME[series.to_sym] || "N/A"
|
42
39
|
s.abbreviation series
|
43
40
|
end
|
@@ -89,6 +86,16 @@ module Metanorma
|
|
89
86
|
end
|
90
87
|
end
|
91
88
|
|
89
|
+
def metadata_version(node, xml)
|
90
|
+
if node.attr("edition-major")
|
91
|
+
ed = node.attr("edition-major")
|
92
|
+
e1 = node.attr("edition-minor") and ed += ".#{e1}"
|
93
|
+
(e2 = node.attr("edition-patch")) && e1 and ed += ".#{e2}"
|
94
|
+
node.set_attribute("edition", ed)
|
95
|
+
end
|
96
|
+
super
|
97
|
+
end
|
98
|
+
|
92
99
|
def configuration
|
93
100
|
Metanorma::IHO.configuration
|
94
101
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|