metanorma-ogc 2.7.2 → 2.7.4

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.
@@ -1,5 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <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">
3
+ <define name="requirement">
4
+ <element name="requirement">
5
+ <ref name="RequirementType"/>
6
+ </element>
7
+ </define>
8
+ <!-- ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437 -->
3
9
  <!--
4
10
  Presupposes isodoc.rnc, is included in it
5
11
  include "isodoc.rnc" { }
@@ -7,14 +13,9 @@
7
13
  This is the Metanorma default provisions model; it is overridden by other provisions models,
8
14
  such as Modspec
9
15
  -->
10
- <define name="requirement">
16
+ <define name="recommendation">
11
17
  <a:documentation>Specification of an attribute of a subject that is required.
12
18
  NOTE: A requirement can contain other requirements</a:documentation>
13
- <element name="requirement">
14
- <ref name="RequirementType"/>
15
- </element>
16
- </define>
17
- <define name="recommendation">
18
19
  <a:documentation>Specification of an attribute of a subject that is recommended</a:documentation>
19
20
  <element name="recommendation">
20
21
  <ref name="RequirementType"/>
@@ -1,10 +1,8 @@
1
1
  module Metanorma
2
2
  module Ogc
3
3
  class Converter < Standoc::Converter
4
- def validate(doc)
5
- content_validate(doc)
6
- schema_validate(formattedstr_strip(doc.dup),
7
- File.join(File.dirname(__FILE__), "ogc.rng"))
4
+ def schema_file
5
+ "ogc.rng"
8
6
  end
9
7
 
10
8
  def title_validate(_root)
@@ -32,18 +30,18 @@ module Metanorma
32
30
  end
33
31
 
34
32
  def stage_type_validate(stage, doctype)
35
- err = case doctype
36
- when "standard", "abstract-specification-topic", "draft-standard"
37
- %w(draft work-item-draft).include?(stage)
38
- when "community-standard"
39
- %w(draft swg-draft).include?(stage)
40
- when "best-practice", "community-practice"
41
- %w(draft swg-draft work-item-draft).include?(stage)
42
- else %w(swg-draft oab-review public-rfc tc-vote
43
- work-item-draft deprecated rescinded legacy).include?(stage)
44
- end
45
- err and @log.add("Document Attributes", nil,
46
- "#{stage} is not an allowed status for #{doctype}")
33
+ case doctype
34
+ when "standard", "abstract-specification-topic", "draft-standard"
35
+ %w(draft work-item-draft).include?(stage)
36
+ when "community-standard"
37
+ %w(draft swg-draft).include?(stage)
38
+ when "best-practice", "community-practice"
39
+ %w(draft swg-draft work-item-draft).include?(stage)
40
+ else %w(swg-draft oab-review public-rfc tc-vote work-item-draft
41
+ deprecated rescinded legacy).include?(stage)
42
+ end and
43
+ @log.add("Document Attributes", nil,
44
+ "#{stage} is not an allowed status for #{doctype}")
47
45
  end
48
46
 
49
47
  def version_validate(xmldoc)
@@ -108,8 +106,7 @@ module Metanorma
108
106
  end
109
107
 
110
108
  def sections_sequence_validate(root)
111
- return unless STANDARDTYPE.include?(@doctype)
112
-
109
+ STANDARDTYPE.include?(@doctype) or return
113
110
  names = root.xpath("//sections/* | //bibliography/*")
114
111
  names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val])
115
112
  names = seqcheck(names, SEQ[1][:msg], SEQ[1][:val])
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.7.2".freeze
3
+ VERSION = "2.7.4".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.7.2
4
+ version: 2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-17 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639