relaton-ogc 1.12.0 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,14 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
- <!--
4
- Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
5
- we cannot have a new default namespace: we will end up with a grammar with two different
6
- namespaces, one for isostandard and one for csand additions. And we do not want that.
7
- -->
8
- <include href="isodoc.rng">
9
- <start>
10
- <ref name="ogc-standard"/>
11
- </start>
3
+ <include href="biblio-standoc.rng">
12
4
  <define name="DocumentType">
13
5
  <choice>
14
6
  <value>abstract-specification-topic</value>
@@ -26,6 +18,20 @@
26
18
  <value>user-guide</value>
27
19
  <value>white-paper</value>
28
20
  <value>test-suite</value>
21
+ <value>draft-standard</value>
22
+ </choice>
23
+ </define>
24
+ <define name="DocumentSubtype">
25
+ <choice>
26
+ <value>conceptual-model</value>
27
+ <value>conceptual-model-and-encoding</value>
28
+ <value>conceptual-model-and-implementation</value>
29
+ <value>encoding</value>
30
+ <value>extension</value>
31
+ <value>implementation</value>
32
+ <value>profile</value>
33
+ <value>profile-with-extension</value>
34
+ <value>general</value>
29
35
  </choice>
30
36
  </define>
31
37
  <define name="editorialgroup">
@@ -40,6 +46,9 @@
40
46
  </element>
41
47
  </define>
42
48
  <define name="BibDataExtensionType">
49
+ <optional>
50
+ <attribute name="schema-version"/>
51
+ </optional>
43
52
  <optional>
44
53
  <ref name="doctype"/>
45
54
  </optional>
@@ -51,52 +60,7 @@
51
60
  <ref name="ics"/>
52
61
  </zeroOrMore>
53
62
  </define>
54
- <define name="preface">
55
- <element name="preface">
56
- <optional>
57
- <ref name="abstract"/>
58
- </optional>
59
- <ref name="foreword"/>
60
- <optional>
61
- <ref name="submitters"/>
62
- </optional>
63
- </element>
64
- </define>
65
- <define name="DocumentSubtype">
66
- <choice>
67
- <value>conceptual-model</value>
68
- <value>conceptual-model-and-encoding</value>
69
- <value>conceptual-model-and-implementation</value>
70
- <value>encoding</value>
71
- <value>extension</value>
72
- <value>implementation</value>
73
- <value>profile</value>
74
- <value>profile-with-extension</value>
75
- <value>general</value>
76
- </choice>
77
- </define>
78
63
  </include>
79
- <define name="TextElement" combine="choice">
80
- <ref name="hi"/>
81
- </define>
82
- <define name="PureTextElement" combine="choice">
83
- <ref name="hi"/>
84
- </define>
85
- <define name="hi">
86
- <element name="hi">
87
- <zeroOrMore>
88
- <choice>
89
- <ref name="PureTextElement"/>
90
- <ref name="stem"/>
91
- </choice>
92
- </zeroOrMore>
93
- </element>
94
- </define>
95
- <define name="submitters">
96
- <element name="submitters">
97
- <ref name="Basic-Section"/>
98
- </element>
99
- </define>
100
64
  <define name="committee">
101
65
  <element name="committee">
102
66
  <choice>
@@ -116,36 +80,4 @@
116
80
  <ref name="IsoWorkgroup"/>
117
81
  </element>
118
82
  </define>
119
- <define name="ogc-standard">
120
- <element name="ogc-standard">
121
- <attribute name="version"/>
122
- <attribute name="type">
123
- <choice>
124
- <value>semantic</value>
125
- <value>presentation</value>
126
- </choice>
127
- </attribute>
128
- <ref name="bibdata"/>
129
- <zeroOrMore>
130
- <ref name="termdocsource"/>
131
- </zeroOrMore>
132
- <optional>
133
- <ref name="misccontainer"/>
134
- </optional>
135
- <optional>
136
- <ref name="boilerplate"/>
137
- </optional>
138
- <ref name="preface"/>
139
- <oneOrMore>
140
- <ref name="sections"/>
141
- </oneOrMore>
142
- <zeroOrMore>
143
- <ref name="annex"/>
144
- </zeroOrMore>
145
- <ref name="bibliography"/>
146
- <zeroOrMore>
147
- <ref name="indexsect"/>
148
- </zeroOrMore>
149
- </element>
150
- </define>
151
83
  </grammar>
@@ -25,6 +25,15 @@ module RelatonOgc
25
25
  super
26
26
  end
27
27
 
28
+ #
29
+ # Fetches flavof schema version
30
+ #
31
+ # @return [String] schema version
32
+ #
33
+ def ext_schema
34
+ @ext_schema ||= schema_versions["relaton-model-ogc"]
35
+ end
36
+
28
37
  # @param hash [Hash]
29
38
  # @return [RelatonOgc::OgcBibliographicItem]
30
39
  def self.from_hash(hash)
@@ -45,14 +54,15 @@ module RelatonOgc
45
54
  # @option opts [Symbol, NilClass] :date_format (:short), :full
46
55
  # @option opts [String, Symbol] :lang language
47
56
  # @return [String] XML
48
- def to_xml(**opts)
57
+ def to_xml(**opts) # rubocop:disable Metrics/AbcSize
49
58
  super(**opts) do |b|
50
- b.ext do
59
+ ext = b.ext do
51
60
  b.doctype doctype if doctype
52
61
  b.subdoctype subdoctype if subdoctype
53
62
  editorialgroup&.to_xml b
54
63
  ics.each { |i| i.to_xml b }
55
64
  end
65
+ ext["schema-version"] = ext_schema unless opts[:embedded]
56
66
  end
57
67
  end
58
68
 
@@ -1,3 +1,3 @@
1
1
  module RelatonOgc
2
- VERSION = "1.12.0".freeze
2
+ VERSION = "1.14.0".freeze
3
3
  end
data/relaton_ogc.gemspec CHANGED
@@ -35,5 +35,5 @@ Gem::Specification.new do |spec|
35
35
  spec.add_development_dependency "webmock"
36
36
 
37
37
  spec.add_dependency "faraday", "~> 1.0"
38
- spec.add_dependency "relaton-iso-bib", "~> 1.12.0"
38
+ spec.add_dependency "relaton-iso-bib", "~> 1.14.0"
39
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-25 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: 1.12.0
145
+ version: 1.14.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: 1.12.0
152
+ version: 1.14.0
153
153
  description: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
154
154
  model'
155
155
  email:
@@ -159,6 +159,7 @@ extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
161
  - ".github/workflows/rake.yml"
162
+ - ".github/workflows/release.yml"
162
163
  - ".gitignore"
163
164
  - ".rspec"
164
165
  - ".rubocop.yml"
@@ -170,10 +171,10 @@ files:
170
171
  - bin/rspec
171
172
  - bin/setup
172
173
  - grammars/basicdoc.rng
174
+ - grammars/biblio-standoc.rng
173
175
  - grammars/biblio.rng
174
- - grammars/isodoc.rng
175
- - grammars/ogc.rng
176
- - grammars/reqt.rng
176
+ - grammars/relaton-ogc-compile.rng
177
+ - grammars/relaton-ogc.rng
177
178
  - lib/relaton_ogc.rb
178
179
  - lib/relaton_ogc/data_fetcher.rb
179
180
  - lib/relaton_ogc/editorial_group.rb
@@ -191,7 +192,7 @@ homepage: https://github.com/relaton/relaton-ogc
191
192
  licenses:
192
193
  - BSD-2-Clause
193
194
  metadata: {}
194
- post_install_message:
195
+ post_install_message:
195
196
  rdoc_options: []
196
197
  require_paths:
197
198
  - lib
@@ -206,8 +207,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
207
  - !ruby/object:Gem::Version
207
208
  version: '0'
208
209
  requirements: []
209
- rubygems_version: 3.2.3
210
- signing_key:
210
+ rubygems_version: 3.1.6
211
+ signing_key:
211
212
  specification_version: 4
212
213
  summary: 'RelatonOgc: retrieve OGC Standards for bibliographic use using the OgcBibliographicItem
213
214
  model'