metanorma-ogc 2.4.1 → 2.4.2
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/pdf_convert.rb +3 -4
- data/lib/isodoc/ogc/word_convert.rb +1 -2
- data/lib/isodoc/ogc/xref.rb +1 -1
- data/lib/metanorma/ogc/cleanup.rb +24 -6
- data/lib/metanorma/ogc/validate.rb +0 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c36eb2eb19714efe36a2bddd955d89702cbabb9a3206b636f39d89cdddb9b196
|
4
|
+
data.tar.gz: 5fa6aaadc06ada3a8f856b33cdd95b8fc3407df9c25f7b43f30d6cac045ab565
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c45ff6fe107ed9e9e34b63925a01c4244943e261224d969412183a81baa0ee67fe3ca5ed870ef1cf485cb6c6e9be747e90307c46d3207ae6341e7388db43c4d9
|
7
|
+
data.tar.gz: 0fbc5ca07fda92e07ed344beb8aa9d359eccfad72b0ba4514af0880a43db1dc3c74909551592c561ba55ec0d82c9ae68ce8568dc594f187f875549f7d10095ee
|
@@ -11,14 +11,13 @@ module IsoDoc
|
|
11
11
|
super
|
12
12
|
end
|
13
13
|
|
14
|
-
def pdf_stylesheet(
|
15
|
-
doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
|
14
|
+
def pdf_stylesheet(_docxml)
|
16
15
|
%w(abstract-specification-topic best-practice draft-standard
|
17
16
|
change-request-supporting-document community-practice
|
18
17
|
community-standard discussion-paper engineering-report policy
|
19
18
|
reference-model release-notes standard user-guide test-suite
|
20
|
-
white-paper).include? doctype or doctype = "other"
|
21
|
-
"ogc.#{doctype}.xsl"
|
19
|
+
white-paper).include? @doctype or @doctype = "other"
|
20
|
+
"ogc.#{@doctype}.xsl"
|
22
21
|
end
|
23
22
|
end
|
24
23
|
end
|
@@ -40,13 +40,12 @@ module IsoDoc
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def convert1(docxml, filename, dir)
|
43
|
-
if
|
43
|
+
if @doctype == "white-paper"
|
44
44
|
@wordstylesheet_name = html_doc_path("wordstyle_wp.scss")
|
45
45
|
@standardstylesheet_name = html_doc_path("ogc_wp.scss")
|
46
46
|
@wordcoverpage = html_doc_path("word_ogc_titlepage_wp.html")
|
47
47
|
@wordintropage = html_doc_path("word_ogc_intro_wp.html")
|
48
48
|
@header = html_doc_path("header_wp.html")
|
49
|
-
@doctype = "white-paper"
|
50
49
|
options[:bodyfont] = '"Arial",sans-serif'
|
51
50
|
options[:headerfont] = '"Lato",sans-serif'
|
52
51
|
options[:normalfontsize] = "11.0pt"
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -12,7 +12,7 @@ module IsoDoc
|
|
12
12
|
"//sections/definitions | " \
|
13
13
|
"//sections/clause[descendant::definitions][not(descendant::terms)]",
|
14
14
|
@klass.middle_clause(docxml)]
|
15
|
-
ret + if
|
15
|
+
ret + if @doctype == "engineering-report"
|
16
16
|
[{ path: a.join(" | "), multi: true }]
|
17
17
|
else
|
18
18
|
[{ path: a[0] }, { path: a[1] }, { path: a[2], multi: true }]
|
@@ -34,16 +34,32 @@ module Metanorma
|
|
34
34
|
def insert_security(xml, sect)
|
35
35
|
description = "document"
|
36
36
|
description = "standard" if %w(standard community-standard)
|
37
|
-
.include?(
|
37
|
+
.include?(@doctype)
|
38
|
+
@doctype == "engineering-report" and return remove_security(xml)
|
38
39
|
preface = sect.at("//preface") ||
|
39
40
|
sect.add_previous_sibling("<preface/>").first
|
40
41
|
sect = xml.at("//clause[@type = 'security']")&.remove ||
|
41
|
-
|
42
|
-
"<title>Security considerations</title>" \
|
43
|
-
"<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
|
42
|
+
create_security_clause(xml)
|
44
43
|
preface.add_child sect
|
45
44
|
end
|
46
45
|
|
46
|
+
def remove_security(xml)
|
47
|
+
a = xml.at("//clause[@type = 'security']") and
|
48
|
+
a.delete("type")
|
49
|
+
end
|
50
|
+
|
51
|
+
def create_security_clause(xml)
|
52
|
+
doctype = xml.at("//bibdata/ext/doctype")&.text
|
53
|
+
description = "document"
|
54
|
+
description = "standard" if %w(standard community-standard)
|
55
|
+
.include?(doctype)
|
56
|
+
<<~CLAUSE
|
57
|
+
<clause type='security' #{add_id}>
|
58
|
+
<title>Security considerations</title>
|
59
|
+
<p>#{@i18n.security_empty.sub('%', description)}</p></clause>
|
60
|
+
CLAUSE
|
61
|
+
end
|
62
|
+
|
47
63
|
def insert_submitters(xml, sect)
|
48
64
|
if xml.at("//submitters")
|
49
65
|
preface = sect.at("//preface") ||
|
@@ -62,9 +78,11 @@ module Metanorma
|
|
62
78
|
super
|
63
79
|
a = xmldoc.at("//bibdata/status/stage")
|
64
80
|
a.text == "published" and a.children = "approved"
|
65
|
-
doctype
|
66
|
-
|
81
|
+
if @doctype == "technical-paper"
|
82
|
+
doctype = xmldoc.at("//bibdata/ext/doctype")
|
67
83
|
doctype.children = "white-paper"
|
84
|
+
@doctype = "white-paper"
|
85
|
+
end
|
68
86
|
end
|
69
87
|
|
70
88
|
def section_names_terms_cleanup(xml)
|
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.
|
29
|
+
spec.add_dependency "metanorma-standoc", "~> 2.6.0"
|
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.4.
|
4
|
+
version: 2.4.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: 2023-
|
11
|
+
date: 2023-09-11 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.
|
33
|
+
version: 2.6.0
|
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.
|
40
|
+
version: 2.6.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: debug
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|