metanorma-ogc 2.4.1 → 2.4.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_convert.rb +2 -2
- 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/basicdoc.rng +18 -2
- data/lib/metanorma/ogc/biblio.rng +1 -1
- data/lib/metanorma/ogc/cleanup.rb +24 -6
- data/lib/metanorma/ogc/isodoc.rng +18 -1
- 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: fb73a22a896fe1504ae9b753559974f1661b9efcf681d0bf5b33ebaff7367c04
|
4
|
+
data.tar.gz: 1ed9c11c1d4cd3178e4a83d4f2859c88f1585f2d6e3bfdc4f029bc8f75d7db52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e5bdca3ba426991aec0174b59a3828257f682d97a370805964dd6a94063be863f61854ff5e47ea1053d8c6cde67b1ca761f1edb42a7039a731b9b7f900ec1d7
|
7
|
+
data.tar.gz: 8b90fd7e42d112c8cbfbf1ed2ce3285fbb771dd1401e92331f7c6790d2c3998e5f7ca0395e1961b246ea09d854b970b15cfca4e12cc23e33fa522a733e388229
|
@@ -69,9 +69,9 @@ module IsoDoc
|
|
69
69
|
|
70
70
|
def html_head
|
71
71
|
ret = super
|
72
|
-
k = @meta.get[:keywords].join(", ")
|
72
|
+
k = @meta.get[:keywords].join(", ").gsub("'", "'")
|
73
73
|
k.empty? or ret += "<meta name='keywords' content='#{k}'/>"
|
74
|
-
k = @meta.get[:abstract]
|
74
|
+
k = @meta.get[:abstract]&.gsub("'", "'")
|
75
75
|
(k.nil? || k.empty?) or
|
76
76
|
ret += "<meta name='description' content='#{k}'/>"
|
77
77
|
ret
|
@@ -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 }]
|
@@ -346,6 +346,8 @@
|
|
346
346
|
<ref name="keyword"/>
|
347
347
|
<ref name="xref"/>
|
348
348
|
<ref name="hyperlink"/>
|
349
|
+
<ref name="index"/>
|
350
|
+
<ref name="index-xref"/>
|
349
351
|
</choice>
|
350
352
|
</oneOrMore>
|
351
353
|
</element>
|
@@ -623,6 +625,8 @@
|
|
623
625
|
<ref name="eref"/>
|
624
626
|
<ref name="xref"/>
|
625
627
|
<ref name="hyperlink"/>
|
628
|
+
<ref name="index"/>
|
629
|
+
<ref name="index-xref"/>
|
626
630
|
</choice>
|
627
631
|
</zeroOrMore>
|
628
632
|
</element>
|
@@ -636,6 +640,8 @@
|
|
636
640
|
<ref name="eref"/>
|
637
641
|
<ref name="xref"/>
|
638
642
|
<ref name="hyperlink"/>
|
643
|
+
<ref name="index"/>
|
644
|
+
<ref name="index-xref"/>
|
639
645
|
</choice>
|
640
646
|
</zeroOrMore>
|
641
647
|
</element>
|
@@ -648,6 +654,8 @@
|
|
648
654
|
<ref name="eref"/>
|
649
655
|
<ref name="xref"/>
|
650
656
|
<ref name="hyperlink"/>
|
657
|
+
<ref name="index"/>
|
658
|
+
<ref name="index-xref"/>
|
651
659
|
</choice>
|
652
660
|
</zeroOrMore>
|
653
661
|
</element>
|
@@ -655,7 +663,11 @@
|
|
655
663
|
<define name="keyword">
|
656
664
|
<element name="keyword">
|
657
665
|
<zeroOrMore>
|
658
|
-
<
|
666
|
+
<choice>
|
667
|
+
<ref name="PureTextElement"/>
|
668
|
+
<ref name="index"/>
|
669
|
+
<ref name="index-xref"/>
|
670
|
+
</choice>
|
659
671
|
</zeroOrMore>
|
660
672
|
</element>
|
661
673
|
</define>
|
@@ -676,7 +688,11 @@
|
|
676
688
|
<define name="strike">
|
677
689
|
<element name="strike">
|
678
690
|
<zeroOrMore>
|
679
|
-
<
|
691
|
+
<choice>
|
692
|
+
<ref name="PureTextElement"/>
|
693
|
+
<ref name="index"/>
|
694
|
+
<ref name="index-xref"/>
|
695
|
+
</choice>
|
680
696
|
</zeroOrMore>
|
681
697
|
</element>
|
682
698
|
</define>
|
@@ -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)
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.2.
|
20
|
+
<!-- VERSION v1.2.5 -->
|
21
21
|
<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">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -485,6 +485,8 @@
|
|
485
485
|
<choice>
|
486
486
|
<text/>
|
487
487
|
<ref name="callout"/>
|
488
|
+
<ref name="xref"/>
|
489
|
+
<ref name="eref"/>
|
488
490
|
</choice>
|
489
491
|
</oneOrMore>
|
490
492
|
<zeroOrMore>
|
@@ -865,6 +867,7 @@
|
|
865
867
|
<ref name="PureTextElement"/>
|
866
868
|
<ref name="stem"/>
|
867
869
|
<ref name="index"/>
|
870
|
+
<ref name="index-xref"/>
|
868
871
|
<ref name="eref"/>
|
869
872
|
<ref name="erefstack"/>
|
870
873
|
<ref name="xref"/>
|
@@ -880,6 +883,7 @@
|
|
880
883
|
<ref name="PureTextElement"/>
|
881
884
|
<ref name="stem"/>
|
882
885
|
<ref name="index"/>
|
886
|
+
<ref name="index-xref"/>
|
883
887
|
<ref name="eref"/>
|
884
888
|
<ref name="erefstack"/>
|
885
889
|
<ref name="xref"/>
|
@@ -894,6 +898,7 @@
|
|
894
898
|
<choice>
|
895
899
|
<ref name="PureTextElement"/>
|
896
900
|
<ref name="index"/>
|
901
|
+
<ref name="index-xref"/>
|
897
902
|
<ref name="eref"/>
|
898
903
|
<ref name="erefstack"/>
|
899
904
|
<ref name="xref"/>
|
@@ -908,6 +913,7 @@
|
|
908
913
|
<choice>
|
909
914
|
<ref name="PureTextElement"/>
|
910
915
|
<ref name="index"/>
|
916
|
+
<ref name="index-xref"/>
|
911
917
|
</choice>
|
912
918
|
</zeroOrMore>
|
913
919
|
</element>
|
@@ -918,6 +924,7 @@
|
|
918
924
|
<choice>
|
919
925
|
<ref name="PureTextElement"/>
|
920
926
|
<ref name="index"/>
|
927
|
+
<ref name="index-xref"/>
|
921
928
|
</choice>
|
922
929
|
</zeroOrMore>
|
923
930
|
</element>
|
@@ -928,6 +935,7 @@
|
|
928
935
|
<choice>
|
929
936
|
<ref name="PureTextElement"/>
|
930
937
|
<ref name="index"/>
|
938
|
+
<ref name="index-xref"/>
|
931
939
|
</choice>
|
932
940
|
</zeroOrMore>
|
933
941
|
</element>
|
@@ -938,6 +946,7 @@
|
|
938
946
|
<choice>
|
939
947
|
<ref name="PureTextElement"/>
|
940
948
|
<ref name="index"/>
|
949
|
+
<ref name="index-xref"/>
|
941
950
|
</choice>
|
942
951
|
</zeroOrMore>
|
943
952
|
</element>
|
@@ -1047,6 +1056,8 @@
|
|
1047
1056
|
<ref name="keyword"/>
|
1048
1057
|
<ref name="xref"/>
|
1049
1058
|
<ref name="hyperlink"/>
|
1059
|
+
<ref name="index"/>
|
1060
|
+
<ref name="index-xref"/>
|
1050
1061
|
</choice>
|
1051
1062
|
</element>
|
1052
1063
|
</define>
|
@@ -1060,6 +1071,8 @@
|
|
1060
1071
|
<ref name="keyword"/>
|
1061
1072
|
<ref name="xref"/>
|
1062
1073
|
<ref name="hyperlink"/>
|
1074
|
+
<ref name="index"/>
|
1075
|
+
<ref name="index-xref"/>
|
1063
1076
|
</choice>
|
1064
1077
|
</element>
|
1065
1078
|
</define>
|
@@ -1126,6 +1139,8 @@
|
|
1126
1139
|
<choice>
|
1127
1140
|
<ref name="PureTextElement"/>
|
1128
1141
|
<ref name="stem"/>
|
1142
|
+
<ref name="index"/>
|
1143
|
+
<ref name="index-xref"/>
|
1129
1144
|
</choice>
|
1130
1145
|
</zeroOrMore>
|
1131
1146
|
</element>
|
@@ -1136,6 +1151,8 @@
|
|
1136
1151
|
<choice>
|
1137
1152
|
<ref name="PureTextElement"/>
|
1138
1153
|
<ref name="stem"/>
|
1154
|
+
<ref name="index"/>
|
1155
|
+
<ref name="index-xref"/>
|
1139
1156
|
</choice>
|
1140
1157
|
</zeroOrMore>
|
1141
1158
|
</element>
|
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.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: 2023-
|
11
|
+
date: 2023-09-25 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
|