metanorma-ogc 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4584b19640ae392d32331f799e97e13e6716ac96fe509b7ccf1c0c533778982d
4
- data.tar.gz: 7db35d1b9b76cbc831f30acd5abf1b0a474819625898c2089fbb1e8083401872
3
+ metadata.gz: f7861239c1f4e7838cbc7d20c8ef140bca08b5041faa586a4fa27730a5133ecb
4
+ data.tar.gz: 650181b76786a892c9327d1f88d4e925836b96badb255142f57236350eacce84
5
5
  SHA512:
6
- metadata.gz: 0131aa4d4e433d368d47f431b5d6c45cf798a1340b3eb2083ceb1b5a51739570225832d9303f11b134a4fe721f6bdf3332b9d92b45cc2f50430c8d610a2348a9
7
- data.tar.gz: bc237907bc224453c0d6dee4ce0beaa28e3611dec7bde17eeedd43279f179489558b43cd5f35091b2e84d9353f559239ae1ef130b2e86ca726530e2e2eeb20fc
6
+ metadata.gz: ddd4e2f8fa8fc49e5025eefc97cebba4bbff58dbd05e3748b9da5385e6901043d8e67cba3b09091c1b7e25d26d14f3a84f360de7fae6abd2634f1828ef2ab99a
7
+ data.tar.gz: 99311ec02dd10b3c750f5af2ba48d457a7ffc0d74a2595a64fa7ffe805809acb93a404e85a28a263fda3fb42499a78e543e6dd1e36149db7dc0019d1a13af791
@@ -33,7 +33,7 @@ module Asciidoctor
33
33
  reference-model release-notes standard user-guide white-paper
34
34
  test-suite}.include? d
35
35
  @warned_doctype or
36
- warn "'#{d}' is not a legal document type: reverting to 'standard'"
36
+ @log.add("Document Attributes", nil, "'#{d}' is not a legal document type: reverting to 'standard'")
37
37
  @warned_doctype = true
38
38
  d = "standard"
39
39
  end
@@ -62,6 +62,7 @@ module Asciidoctor
62
62
  word_converter(node).convert filename unless node.attr("nodoc")
63
63
  pdf_converter(node).convert filename unless node.attr("nodoc")
64
64
  end
65
+ @log.write(@filename + ".err") unless @novalid
65
66
  @files_to_delete.each { |f| FileUtils.rm f }
66
67
  ret
67
68
  end
@@ -93,7 +93,7 @@ module Asciidoctor
93
93
  a = node.attr("abbrev")
94
94
  return unless d and a
95
95
  url = "http://www.opengis.net/doc/#{IsoDoc::Ogc::DOCTYPE_ABBR[d]}/#{a}"
96
- v = node.attr("edition") and url += "/#{v}"
96
+ v = (node.attr("edition") || node.attr("version")) and url += "/#{v}"
97
97
  url
98
98
  end
99
99
 
@@ -150,6 +150,11 @@ module Asciidoctor
150
150
  end
151
151
  end
152
152
 
153
+ def metadata_version(node, xml)
154
+ node.set_attr("edition", node.attr("version"), false) if node.attr("version")
155
+ super
156
+ end
157
+
153
158
  def metadata_subdoctype(node, xml)
154
159
  s = node.attr("docsubtype")
155
160
  s1 = ::IsoDoc::Ogc::DOCSUBTYPE_ABBR.invert[s] and s = s1
@@ -158,15 +163,15 @@ module Asciidoctor
158
163
  unless %w{conceptual-model conceptual-model-and-encoding
159
164
  conceptual-model-and-implementation encoding extension
160
165
  implementation profile profile-with-extension}.include? s
161
- warn "'#{s}' is not a permitted subtype of Standard: "\
162
- "reverting to 'implementation'"
166
+ @log.add("Document Attributes", nil, "'#{s}' is not a permitted subtype of Standard: "\
167
+ "reverting to 'implementation'")
163
168
  s = "implementation"
164
169
  end
165
170
  when "best-practice"
166
171
  unless %w{general encoding extension profile
167
172
  profile-with-extension}.include? s
168
- warn "'#{s}' is not a permitted subtype of Standard: "\
169
- "reverting to 'implementation'"
173
+ @log.add("Document Attributes", nil, "'#{s}' is not a permitted subtype of Standard: "\
174
+ "reverting to 'implementation'")
170
175
  s = "general"
171
176
  end
172
177
  end
@@ -645,6 +645,11 @@
645
645
  <optional>
646
646
  <attribute name="script"/>
647
647
  </optional>
648
+ <optional>
649
+ <attribute name="inline-header">
650
+ <data type="boolean"/>
651
+ </attribute>
652
+ </optional>
648
653
  <optional>
649
654
  <attribute name="obligation">
650
655
  <choice>
@@ -19,16 +19,18 @@ module Asciidoctor
19
19
  stage = xmldoc&.at("//bibdata/status/stage")&.text
20
20
  %w(swg-draft oab-review public-rfc tc-vote
21
21
  published deprecated retired).include? stage or
22
- warn "Document Attributes: #{stage} is not a recognised status"
22
+ @log.add("Document Attributes", nil, "#{stage} is not a recognised status")
23
23
  end
24
24
 
25
25
  def version_validate(xmldoc)
26
26
  version = xmldoc&.at("//bibdata/edition")&.text
27
27
  doctype = xmldoc&.at("//bibdata/ext/doctype")&.text
28
28
  if %w(engineering-report discussion-paper).include? doctype
29
- warn "Version not permitted for #{doctype}" unless version.nil?
29
+ version.nil? or
30
+ @log.add("Document Attributes", nil, "Version not permitted for #{doctype}")
30
31
  else
31
- warn "Version required for #{doctype}" if version.nil?
32
+ version.nil? and
33
+ @log.add("Document Attributes", nil, "Version required for #{doctype}")
32
34
  end
33
35
  end
34
36
 
@@ -74,7 +76,7 @@ module Asciidoctor
74
76
  def seqcheck(names, msg, accepted)
75
77
  n = names.shift
76
78
  unless accepted.include? n
77
- warn "OGC style: #{msg}"
79
+ @log.add("Style", nil, msg)
78
80
  names = []
79
81
  end
80
82
  names
@@ -93,7 +95,7 @@ module Asciidoctor
93
95
  n = names.shift
94
96
  end
95
97
  unless n
96
- warn "OGC style: Document must contain at least one clause"
98
+ @log.add("Style", nil, "Document must contain at least one clause")
97
99
  return
98
100
  end
99
101
  root.at("//references | //clause[descendant::references]"\
@@ -103,14 +105,14 @@ module Asciidoctor
103
105
  end
104
106
 
105
107
  def preface_sequence_validate(root)
106
- root.at("//preface/abstract") or warn "OGC style: Abstract is missing!"
108
+ root.at("//preface/abstract") or @log.add("Style", nil, "Abstract is missing!")
107
109
  root.at("//bibdata/keyword | //bibdata/ext/keyword") or
108
- warn "OGC style: Keywords are missing!"
109
- root.at("//foreword") or warn "OGC style: Preface is missing!"
110
+ @log.add("Style", nil, "Keywords are missing!")
111
+ root.at("//foreword") or @log.add("Style", nil, "Preface is missing!")
110
112
  root.at("//bibdata/contributor[role/@type = 'author']/organization/"\
111
113
  "name") or
112
- warn "OGC style: Submitting Organizations is missing!"
113
- root.at("//submitters") or warn "OGC style: Submitters is missing!"
114
+ @log.add("Style", nil, "Submitting Organizations is missing!")
115
+ root.at("//submitters") or @log.add("Style", nil, "Submitters is missing!")
114
116
  end
115
117
  end
116
118
  end
@@ -1,8 +1,8 @@
1
- <div class="document-stage-band" id='{{ stage | downcase | replace: " ", "-" }}-band'>
1
+ <div class="document-stage-band" id="{{ stage | downcase | replace: ' ', '-' }}-band">
2
2
  <p class="document-stage">{{ stage }}</p>
3
3
  </div>
4
4
 
5
- <div class="document-type-band" id='{{ doctype | downcase | replace: " ", "-" }}-band'>
5
+ <div class="document-type-band" id="{{ doctype | downcase | replace: ' ', '-' }}-band">
6
6
  <p class="document-type">OGC {{ doctype }}</p>
7
7
  </div>
8
8
 
@@ -54,13 +54,13 @@
54
54
  {% if previousuri %}
55
55
  <span class="label">Previous URI: </span> <span class="value"><a href="{{ previousuri }}">{{previousuri}}</a></span>
56
56
  {% endif %}
57
- {% if edition %}
58
- <span class="label">Version: </span> <span class="value">{{ edition }}</span>
59
- {% endif %}
60
57
  </div>
61
58
 
62
- {% if xml or pdf or doc %}
63
59
  <div class="coverpage-alt-formats">
60
+ {% if edition %}
61
+ <span class="label">Version: </span> <span class="value">{{ edition }}</span><br/>
62
+ {% endif %}
63
+ {% if xml or pdf or doc %}
64
64
  <span class="label">Additional Formats: </span>
65
65
  {% if xml %}
66
66
  <span class="value"><a href="{{ xml }}"><i class="far fa-file-code"></i>XML</a></span>
@@ -72,8 +72,8 @@
72
72
  <span class="value"><a href="{{ doc }}"><i class="far fa-file-word"></i>DOC</a></span>
73
73
  {% endif %}
74
74
  </span>
75
- </div>
76
75
  {% endif %}
76
+ </div>
77
77
 
78
78
  </div>
79
79
 
@@ -1,23 +1,44 @@
1
1
  $doctype-colors-list: (
2
- standard: rgb(216, 236, 168),
3
- governance: #750697,
4
- policy-and-procedures: #750697,
2
+ standard: #3D9970,
3
+ abstract-specification-topic: #3D9970,
4
+ reference-model: #3D9970,
5
+
6
+ best-practice: #39CCCC,
7
+ discussion-paper: #39CCCC,
8
+ white-paper: #39CCCC,
9
+ engineering-report: #39CCCC,
10
+
11
+ release-notes: #FFDC00,
12
+ user-guide: #FFDC00,
13
+
14
+ community-practice: #FF851B,
15
+ community-standard: #FF851B,
16
+
17
+ other: #0074D9,
18
+ policy: #0074D9,
19
+ change-request-supporting-document: #0074D9,
20
+
21
+ test-suite: #001F3F,
22
+
5
23
  );
6
24
 
7
25
 
8
26
  $docstage-colors-list: (
9
- rfc: #48a0e7,
10
- candidate: #fd06fd,
27
+ candidate: #8B9EB7,
28
+ working-draft: #8B9EB7,
29
+ proposal: #8B9EB7,
30
+ oab-review: #8B9EB7,
31
+ committee-draft: #8B9EB7,
32
+ swg-draft: #8B9EB7,
33
+
34
+ public-rfc: #48a0e7,
35
+
36
+ tc-vote: #fd06fd,
37
+
11
38
  published: #9abd48,
39
+
12
40
  deprecated: #7e0d13,
13
41
  retired: #7e0d13,
14
- working-draft: #f780ec,
15
- proposal: #f780ec,
16
- committee-draft: #fd06fd,
17
- draft-standard: #fd06fd,
18
- standard: #9abd48,
19
- obsolete: #7e0d13,
20
- guide: #48a0e7,
21
42
  );
22
43
 
23
44
 
@@ -58,7 +58,6 @@ module IsoDoc
58
58
  out
59
59
  end
60
60
 
61
-
62
61
  def recommendation_attributes(node, out)
63
62
  ret = recommendation_attributes1(node)
64
63
  return if ret.empty?
@@ -142,8 +142,8 @@ module IsoDoc
142
142
  end
143
143
 
144
144
  def word_cleanup(docxml)
145
- word_recommend_cleanup(docxml)
146
145
  super
146
+ word_recommend_cleanup(docxml)
147
147
  word_license_cleanup(docxml)
148
148
  word_term_cleanup(docxml)
149
149
  docxml
@@ -168,9 +168,10 @@ module IsoDoc
168
168
  docxml.xpath("//table[@class = 'recommend']/thead/tr").each do |tr|
169
169
  style_update(tr, "background:#A5A5A5;")
170
170
  end
171
- docxml.xpath("//table[@class = 'recommend']/tbody/tr").
172
- each_slice(2) do |tr1, tr2|
173
- tr2 && style_update(tr2, "background:#C9C9C9;")
171
+ docxml.xpath("//table[@class = 'recommend']/tbody").each do |tr|
172
+ tr.xpath("./tr").each_slice(2) do |tr1, tr2|
173
+ tr2 && style_update(tr2, "background:#C9C9C9;")
174
+ end
174
175
  end
175
176
  end
176
177
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
5
5
  end
@@ -26,8 +26,8 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency "htmlentities", "~> 4.3.4"
28
28
  spec.add_dependency "ruby-jing"
29
- spec.add_dependency "metanorma-standoc", "~> 1.3.0"
30
- spec.add_dependency "isodoc", "~> 1.0.0"
29
+ spec.add_dependency "metanorma-standoc", "~> 1.3.20"
30
+ spec.add_dependency "isodoc", "~> 1.0.20"
31
31
  spec.add_dependency "iso-639"
32
32
 
33
33
  spec.add_development_dependency "byebug", "~> 9.1"
@@ -39,5 +39,4 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "rubocop", "= 0.54.0"
40
40
  spec.add_development_dependency "simplecov", "~> 0.15"
41
41
  spec.add_development_dependency "timecop", "~> 0.9"
42
- spec.add_development_dependency "metanorma", "~> 0.3.0"
43
42
  end
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: 1.0.2
4
+ version: 1.0.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: 2020-03-05 00:00:00.000000000 Z
11
+ date: 2020-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.0
47
+ version: 1.3.20
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.0
54
+ version: 1.3.20
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: isodoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
61
+ version: 1.0.20
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0
68
+ version: 1.0.20
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: iso-639
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -206,20 +206,6 @@ dependencies:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0.9'
209
- - !ruby/object:Gem::Dependency
210
- name: metanorma
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: 0.3.0
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - "~>"
221
- - !ruby/object:Gem::Version
222
- version: 0.3.0
223
209
  description: 'Metanorma for the Open Geospatial Consortium.
224
210
 
225
211
  '