metanorma-ogc 2.4.3 → 2.4.6
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/Gemfile +4 -1
- data/lib/isodoc/ogc/html_convert.rb +2 -2
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +44 -11
- data/lib/isodoc/ogc/ogc.best-practice.xsl +44 -11
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +44 -11
- data/lib/isodoc/ogc/ogc.community-practice.xsl +44 -11
- data/lib/isodoc/ogc/ogc.community-standard.xsl +44 -11
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +44 -11
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +44 -11
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +44 -11
- data/lib/isodoc/ogc/ogc.other.xsl +44 -11
- data/lib/isodoc/ogc/ogc.policy.xsl +44 -11
- data/lib/isodoc/ogc/ogc.reference-model.xsl +44 -11
- data/lib/isodoc/ogc/ogc.release-notes.xsl +44 -11
- data/lib/isodoc/ogc/ogc.standard.xsl +44 -11
- data/lib/isodoc/ogc/ogc.test-suite.xsl +44 -11
- data/lib/isodoc/ogc/ogc.user-guide.xsl +44 -11
- data/lib/isodoc/ogc/ogc.white-paper.xsl +11 -2
- data/lib/metanorma/ogc/basicdoc.rng +38 -35
- data/lib/metanorma/ogc/biblio.rng +9 -0
- data/lib/metanorma/ogc/cleanup.rb +30 -10
- data/lib/metanorma/ogc/converter.rb +14 -1
- data/lib/metanorma/ogc/front.rb +13 -14
- data/lib/metanorma/ogc/isodoc.rng +35 -1
- data/lib/metanorma/ogc/processor.rb +1 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -4
|
@@ -154,7 +154,9 @@ module Metanorma
|
|
|
154
154
|
end
|
|
155
155
|
|
|
156
156
|
def presentation_xml_converter(node)
|
|
157
|
-
IsoDoc::Ogc::PresentationXMLConvert
|
|
157
|
+
IsoDoc::Ogc::PresentationXMLConvert
|
|
158
|
+
.new(html_extract_attributes(node)
|
|
159
|
+
.merge(output_formats: ::Metanorma::Ogc::Processor.new.output_formats))
|
|
158
160
|
end
|
|
159
161
|
|
|
160
162
|
def html_converter(node)
|
|
@@ -170,6 +172,17 @@ module Metanorma
|
|
|
170
172
|
def doc_converter(node)
|
|
171
173
|
IsoDoc::Ogc::WordConvert.new(doc_extract_attributes(node))
|
|
172
174
|
end
|
|
175
|
+
|
|
176
|
+
# preempt subdoctype warning
|
|
177
|
+
def adoc2xml(text, flavour)
|
|
178
|
+
Nokogiri::XML(text).root and return text
|
|
179
|
+
c = Asciidoctor
|
|
180
|
+
.convert("= X\nA\n:semantic-metadata-headless: true\n" \
|
|
181
|
+
":novalid:\n:docsubtype: implementation\n" \
|
|
182
|
+
":doctype: standard\n\n#{text}\n",
|
|
183
|
+
backend: flavour, header_footer: true)
|
|
184
|
+
Nokogiri::XML(c).at("//xmlns:sections")
|
|
185
|
+
end
|
|
173
186
|
end
|
|
174
187
|
end
|
|
175
188
|
end
|
data/lib/metanorma/ogc/front.rb
CHANGED
|
@@ -11,8 +11,7 @@ module Metanorma
|
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def corporate_author(node, xml)
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
node.attr("submitting-organizations") or return
|
|
16
15
|
csv_split(HTMLEntities.new
|
|
17
16
|
.decode(node.attr("submitting-organizations")), ";")&.each do |org|
|
|
18
17
|
xml.contributor do |c|
|
|
@@ -49,8 +48,7 @@ module Metanorma
|
|
|
49
48
|
end
|
|
50
49
|
|
|
51
50
|
def ogc_editor(node, xml)
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
node.attr("editor") or return
|
|
54
52
|
xml.contributor do |c|
|
|
55
53
|
c.role type: "editor"
|
|
56
54
|
c.person do |p|
|
|
@@ -78,12 +76,15 @@ module Metanorma
|
|
|
78
76
|
end
|
|
79
77
|
|
|
80
78
|
def default_publisher
|
|
81
|
-
"
|
|
79
|
+
"OGC"
|
|
82
80
|
end
|
|
83
81
|
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
def org_abbrev
|
|
83
|
+
{ "Open Geospatial Consortium" => "OGC" }
|
|
84
|
+
end
|
|
86
85
|
|
|
86
|
+
def metadata_committee(node, xml)
|
|
87
|
+
node.attr("committee") or return
|
|
87
88
|
xml.editorialgroup do |a|
|
|
88
89
|
metadata_committee1(node, a)
|
|
89
90
|
end
|
|
@@ -102,12 +103,10 @@ module Metanorma
|
|
|
102
103
|
end
|
|
103
104
|
|
|
104
105
|
def externalid(node)
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
i = node.attr("external-id") and return i
|
|
107
107
|
d = doctype(node)
|
|
108
108
|
a = node.attr("abbrev")
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
d && a or return
|
|
111
110
|
url = "http://www.opengis.net/doc/#{IsoDoc::Ogc::DOCTYPE_ABBR[d]}/#{a}"
|
|
112
111
|
v = (node.attr("edition") || node.attr("version")) and url += "/#{v}"
|
|
113
112
|
url
|
|
@@ -181,12 +180,12 @@ module Metanorma
|
|
|
181
180
|
unless %w{general encoding extension profile
|
|
182
181
|
profile-with-extension}.include? s
|
|
183
182
|
@log.add("Document Attributes", nil,
|
|
184
|
-
"'#{s}' is not a permitted subtype of
|
|
185
|
-
"reverting to '
|
|
183
|
+
"'#{s}' is not a permitted subtype of best-practice: " \
|
|
184
|
+
"reverting to 'general'")
|
|
186
185
|
s = "general"
|
|
187
186
|
end
|
|
188
187
|
end
|
|
189
|
-
s and xml.subdoctype s
|
|
188
|
+
s && !s.empty? and xml.subdoctype s
|
|
190
189
|
end
|
|
191
190
|
|
|
192
191
|
def title(node, 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.8 -->
|
|
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">
|
|
@@ -1013,6 +1013,14 @@
|
|
|
1013
1013
|
</oneOrMore>
|
|
1014
1014
|
</element>
|
|
1015
1015
|
</define>
|
|
1016
|
+
<define name="BasicBlock" combine="choice">
|
|
1017
|
+
<ref name="columnbreak"/>
|
|
1018
|
+
</define>
|
|
1019
|
+
<define name="columnbreak">
|
|
1020
|
+
<element name="columnbreak">
|
|
1021
|
+
<empty/>
|
|
1022
|
+
</element>
|
|
1023
|
+
</define>
|
|
1016
1024
|
<define name="MultilingualRenderingType">
|
|
1017
1025
|
<choice>
|
|
1018
1026
|
<value>common</value>
|
|
@@ -1046,6 +1054,17 @@
|
|
|
1046
1054
|
<ref name="date_inline"/>
|
|
1047
1055
|
</choice>
|
|
1048
1056
|
</define>
|
|
1057
|
+
<define name="PureTextElement" combine="choice">
|
|
1058
|
+
<ref name="passthrough_inline"/>
|
|
1059
|
+
</define>
|
|
1060
|
+
<define name="passthrough_inline">
|
|
1061
|
+
<element name="passthrough">
|
|
1062
|
+
<optional>
|
|
1063
|
+
<attribute name="formats"/>
|
|
1064
|
+
</optional>
|
|
1065
|
+
<text/>
|
|
1066
|
+
</element>
|
|
1067
|
+
</define>
|
|
1049
1068
|
<define name="add">
|
|
1050
1069
|
<element name="add">
|
|
1051
1070
|
<choice>
|
|
@@ -1084,6 +1103,9 @@
|
|
|
1084
1103
|
<optional>
|
|
1085
1104
|
<attribute name="style"/>
|
|
1086
1105
|
</optional>
|
|
1106
|
+
<optional>
|
|
1107
|
+
<attribute name="custom-charset"/>
|
|
1108
|
+
</optional>
|
|
1087
1109
|
<oneOrMore>
|
|
1088
1110
|
<ref name="TextElement"/>
|
|
1089
1111
|
</oneOrMore>
|
|
@@ -1386,6 +1408,9 @@
|
|
|
1386
1408
|
<optional>
|
|
1387
1409
|
<attribute name="number"/>
|
|
1388
1410
|
</optional>
|
|
1411
|
+
<optional>
|
|
1412
|
+
<attribute name="branch-number"/>
|
|
1413
|
+
</optional>
|
|
1389
1414
|
<optional>
|
|
1390
1415
|
<attribute name="obligation">
|
|
1391
1416
|
<choice>
|
|
@@ -1609,6 +1634,9 @@
|
|
|
1609
1634
|
<optional>
|
|
1610
1635
|
<attribute name="number"/>
|
|
1611
1636
|
</optional>
|
|
1637
|
+
<optional>
|
|
1638
|
+
<attribute name="branch-number"/>
|
|
1639
|
+
</optional>
|
|
1612
1640
|
<optional>
|
|
1613
1641
|
<attribute name="type"/>
|
|
1614
1642
|
</optional>
|
|
@@ -1660,6 +1688,9 @@
|
|
|
1660
1688
|
<optional>
|
|
1661
1689
|
<attribute name="number"/>
|
|
1662
1690
|
</optional>
|
|
1691
|
+
<optional>
|
|
1692
|
+
<attribute name="branch-number"/>
|
|
1693
|
+
</optional>
|
|
1663
1694
|
<optional>
|
|
1664
1695
|
<ref name="section-title"/>
|
|
1665
1696
|
</optional>
|
|
@@ -1757,6 +1788,9 @@
|
|
|
1757
1788
|
<optional>
|
|
1758
1789
|
<attribute name="number"/>
|
|
1759
1790
|
</optional>
|
|
1791
|
+
<optional>
|
|
1792
|
+
<attribute name="branch-number"/>
|
|
1793
|
+
</optional>
|
|
1760
1794
|
<optional>
|
|
1761
1795
|
<attribute name="obligation">
|
|
1762
1796
|
<choice>
|
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.7.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.6
|
|
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-11-27 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.7.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.7.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: debug
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|