metanorma-ogc 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -166,7 +166,6 @@ module IsoDoc
166
166
  def block(docxml)
167
167
  super
168
168
  recommendation_to_table(docxml)
169
- ol docxml
170
169
  end
171
170
 
172
171
  def section(docxml)
@@ -213,16 +212,12 @@ module IsoDoc
213
212
  doctype.children = "technical-paper"
214
213
  end
215
214
 
216
- def ol(docxml)
217
- docxml.xpath(ns("//ol")).each { |f| ol1(f) }
218
- end
219
-
220
- def ol1(elem)
221
- return unless elem["class"] == "steps"
215
+ def ol_depth(node)
216
+ return super unless node["class"] == "steps" ||
217
+ node.at(".//ancestor::xmlns:ol[@class = 'steps']")
222
218
 
223
- idx = elem.xpath("./ancestor-or-self::xmlns:ol[@class = 'steps']").size
224
- elem["type"] = %w(arabic alphabet roman alphabet_upper
225
- roman_upper)[(idx - 1) % 5]
219
+ idx = node.xpath("./ancestor-or-self::xmlns:ol[@class = 'steps']").size
220
+ %i(arabic alphabet roman alphabet_upper roman_upper)[(idx - 1) % 5]
226
221
  end
227
222
 
228
223
  def termsource1(elem)
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
176
+ <optional>
177
+ <attribute name="from">
178
+ <data type="IDREF"/>
179
+ </attribute>
180
+ </optional>
179
181
  <optional>
180
182
  <attribute name="to">
181
183
  <data type="IDREF"/>
@@ -209,9 +209,6 @@
209
209
  <zeroOrMore>
210
210
  <ref name="contact"/>
211
211
  </zeroOrMore>
212
- <zeroOrMore>
213
- <ref name="uri"/>
214
- </zeroOrMore>
215
212
  </element>
216
213
  </define>
217
214
  <define name="fullname">
@@ -828,6 +825,11 @@
828
825
  <optional>
829
826
  <attribute name="scope"/>
830
827
  </optional>
828
+ <optional>
829
+ <attribute name="primary">
830
+ <data type="boolean"/>
831
+ </attribute>
832
+ </optional>
831
833
  <text/>
832
834
  </element>
833
835
  </define>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.0.2".freeze
3
+ VERSION = "2.0.3".freeze
4
4
  end
5
5
  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: 2.0.2
4
+ version: 2.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: 2022-01-22 00:00:00.000000000 Z
11
+ date: 2022-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639