metanorma-ogc 2.7.4 → 2.7.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ogc/base_convert.rb +4 -18
  3. data/lib/isodoc/ogc/html/htmlstyle.css +1 -1
  4. data/lib/isodoc/ogc/html/htmlstyle.scss +1 -1
  5. data/lib/isodoc/ogc/html/ogc.css +1 -1
  6. data/lib/isodoc/ogc/html/ogc.scss +1 -1
  7. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +202 -33
  8. data/lib/isodoc/ogc/ogc.best-practice.xsl +202 -33
  9. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +202 -33
  10. data/lib/isodoc/ogc/ogc.community-practice.xsl +202 -33
  11. data/lib/isodoc/ogc/ogc.community-standard.xsl +202 -33
  12. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +202 -33
  13. data/lib/isodoc/ogc/ogc.draft-standard.xsl +202 -33
  14. data/lib/isodoc/ogc/ogc.engineering-report.xsl +202 -33
  15. data/lib/isodoc/ogc/ogc.other.xsl +202 -33
  16. data/lib/isodoc/ogc/ogc.policy.xsl +202 -33
  17. data/lib/isodoc/ogc/ogc.reference-model.xsl +202 -33
  18. data/lib/isodoc/ogc/ogc.release-notes.xsl +202 -33
  19. data/lib/isodoc/ogc/ogc.standard.xsl +202 -33
  20. data/lib/isodoc/ogc/ogc.test-suite.xsl +202 -33
  21. data/lib/isodoc/ogc/ogc.user-guide.xsl +202 -33
  22. data/lib/isodoc/ogc/ogc.white-paper.xsl +206 -34
  23. data/lib/isodoc/ogc/presentation_sections.rb +18 -14
  24. data/lib/isodoc/ogc/sections.rb +0 -11
  25. data/lib/isodoc/ogc/xref.rb +9 -10
  26. data/lib/metanorma/ogc/basicdoc.rng +9 -5
  27. data/lib/metanorma/ogc/cleanup.rb +10 -20
  28. data/lib/metanorma/ogc/converter.rb +12 -20
  29. data/lib/metanorma/ogc/isodoc.rng +147 -5
  30. data/lib/metanorma/ogc/ogc.rng +2 -35
  31. data/lib/metanorma/ogc/validate.rb +3 -3
  32. data/lib/metanorma/ogc/version.rb +1 -1
  33. metadata +2 -2
@@ -4,15 +4,24 @@ module IsoDoc
4
4
  def middle_title(docxml); end
5
5
 
6
6
  def preface_rearrange(doc)
7
- super
7
+ [
8
+ ["//preface/abstract",
9
+ %w(executivesummary foreword introduction clause acknowledgements)],
10
+ ["//preface/executivesummary",
11
+ %w(foreword introduction clause acknowledgements)],
12
+ ["//preface/foreword",
13
+ %w(introduction clause acknowledgements)],
14
+ ["//preface/introduction",
15
+ %w(clause acknowledgements)],
16
+ ["//preface/acknowledgements", %w()],
17
+ ].each do |x|
18
+ preface_move(doc.xpath(ns(x[0])), x[1], doc)
19
+ end
8
20
  insert_preface_sections(doc)
9
21
  end
10
22
 
11
23
  def insert_preface_sections(doc)
12
- preface_insert(doc.at(ns("//preface/clause" \
13
- "[@type = 'executivesummary']")),
14
- doc.at(ns("//preface/abstract")), doc)
15
- preface_insert(doc.at(ns("//preface//submitters")),
24
+ preface_insert(doc.at(ns("//preface//clause[@type = 'submitters' or @type = 'contributors']")),
16
25
  submit_orgs_append_pt(doc), doc)
17
26
  insert_submitting_orgs(doc)
18
27
  preface_insert(doc.at(ns("//preface/clause[@type = 'security']")),
@@ -39,8 +48,8 @@ module IsoDoc
39
48
  def submit_orgs_append_pt(docxml)
40
49
  docxml.at(ns("//foreword")) ||
41
50
  docxml.at(ns("//preface/clause[@type = 'keywords']")) ||
42
- docxml.at(ns("//preface/clause[@type = 'executivesummary']")) ||
43
- docxml.at(ns("//preface/abstract"))
51
+ docxml.at(ns("//preface/abstract")) ||
52
+ docxml.at(ns("//preface/executivesummary"))
44
53
  end
45
54
 
46
55
  def insert_submitting_orgs(docxml)
@@ -78,7 +87,7 @@ module IsoDoc
78
87
  kw = @meta.get[:keywords]
79
88
  kw.empty? and return
80
89
  if abstract =
81
- docxml.at(ns("//preface/clause[@type = 'executivesummary']")) ||
90
+ docxml.at(ns("//preface/executivesummary")) ||
82
91
  docxml.at(ns("//preface/abstract"))
83
92
  abstract.next = keyword_clause(kw)
84
93
  else
@@ -88,12 +97,7 @@ module IsoDoc
88
97
  end
89
98
 
90
99
  def annex_delim(_elem)
91
- "<br/>"
92
- end
93
-
94
- def clause(docxml)
95
- super
96
- docxml.xpath(ns("//submitters")).each { |f| clause1(f) }
100
+ "<br/>"
97
101
  end
98
102
 
99
103
  def clause1(elem)
@@ -1,13 +1,6 @@
1
1
  module IsoDoc
2
2
  module Ogc
3
3
  module BaseConvert
4
- def top_element_render(node, out)
5
- case node.name
6
- when "submitters" then intro_clause node, out
7
- else super
8
- end
9
- end
10
-
11
4
  def preface(clause, out)
12
5
  case clause["type"]
13
6
  when "toc"
@@ -17,10 +10,6 @@ module IsoDoc
17
10
  end
18
11
  end
19
12
 
20
- def sections_names
21
- super + %w[submitters]
22
- end
23
-
24
13
  def intro_clause(elem, out)
25
14
  out.div class: "Section3", id: elem["id"] do |div|
26
15
  clause_name(elem, elem&.at(ns("./fmt-title")), div,
@@ -42,7 +42,7 @@ module IsoDoc
42
42
  def middle_section_asset_names(doc)
43
43
  middle_sections =
44
44
  "//clause[@type = 'scope' or @type = 'conformance'] | //foreword | " \
45
- "//introduction | //preface/abstract | //submitters | " \
45
+ "//introduction | //preface/abstract | " \
46
46
  "//acknowledgements | //preface/clause | " \
47
47
  "#{@klass.norm_ref_xpath} | //sections/terms | " \
48
48
  "//sections/definitions | //clause[parent::sections]"
@@ -69,7 +69,7 @@ module IsoDoc
69
69
  def preface_names_numbered1(clause, parentnum, num, level)
70
70
  lbl = clause_number_semx(parentnum, clause, num)
71
71
  @anchors[clause["id"]] =
72
- { label: lbl, level: level,
72
+ { label: lbl, level: level,
73
73
  xref: labelled_autonum(@labels["clause"], lbl),
74
74
  type: "clause", elem: @labels["clause"] }
75
75
  clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
@@ -110,7 +110,7 @@ module IsoDoc
110
110
  @anchors[t["id"]] = anchor_struct(
111
111
  c.print, t,
112
112
  @labels["sourcecode"], "sourcecode",
113
- { unnumb: t["unnumbered"], container: container}
113
+ { unnumb: t["unnumbered"], container: container }
114
114
  )
115
115
  end
116
116
  end
@@ -123,13 +123,12 @@ module IsoDoc
123
123
  def hierarchical_sourcecode_names(clauses, num)
124
124
  c = Counter.new
125
125
  nodeSet(clauses).each do |clause|
126
- clause.xpath(ns(LISTING)).noblank.each do |t|
127
- @anchors[t["id"]] =
128
- anchor_struct(#"#{num}#{hier_separator}#{c.increment(t).print}",
129
- hiersemx(clause, num, c.increment(t), t),
130
- t, @labels["sourcecode"],
131
- "sourcecode", { unnumb:t["unnumbered"] })
132
- end
126
+ clause.xpath(ns(LISTING)).noblank.each do |t|
127
+ @anchors[t["id"]] =
128
+ anchor_struct(hiersemx(clause, num, c.increment(t), t),
129
+ t, @labels["sourcecode"],
130
+ "sourcecode", { unnumb: t["unnumbered"] })
131
+ end
133
132
  end
134
133
  end
135
134
  end
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
267
267
  <value>justified</value>
268
268
  </choice>
269
269
  </define>
270
+ <define name="IdRefType">
271
+ <a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
272
+ <data type="IDREF"/>
273
+ </define>
270
274
  <define name="RequiredId">
271
275
  <a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
272
276
  <attribute name="id">
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
409
413
  <attribute name="from">
410
414
  <a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
411
415
  If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
412
- <data type="IDREF"/>
416
+ <ref name="IdRefType"/>
413
417
  </attribute>
414
418
  </optional>
415
419
  <optional>
416
420
  <attribute name="to">
417
421
  <a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
418
- <data type="IDREF"/>
422
+ <ref name="IdRefType"/>
419
423
  </attribute>
420
424
  </optional>
421
425
  </define>
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
1504
1508
  <attribute name="to">
1505
1509
  <a:documentation>A reference to an anchor element (typically a bookmark),
1506
1510
  to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
1507
- <data type="IDREF"/>
1511
+ <ref name="IdRefType"/>
1508
1512
  </attribute>
1509
1513
  </optional>
1510
1514
  <ref name="index-primary">
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
1662
1666
  <define name="XrefAttributes">
1663
1667
  <attribute name="target">
1664
1668
  <a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
1665
- <data type="IDREF"/>
1669
+ <ref name="IdRefType"/>
1666
1670
  </attribute>
1667
1671
  <optional>
1668
1672
  <attribute name="type">
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
1723
1727
  <attribute name="target">
1724
1728
  <a:documentation>The target of the callout is understood to be the location of the callout within the source code;
1725
1729
  the extent of the target is not expressed overtly</a:documentation>
1726
- <data type="IDREF"/>
1730
+ <ref name="IdRefType"/>
1727
1731
  </attribute>
1728
1732
  <text>
1729
1733
  <a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
@@ -14,26 +14,17 @@ module Metanorma
14
14
 
15
15
  def make_preface(xml, sect)
16
16
  super
17
- insert_execsummary(xml, sect)
18
17
  insert_security(xml, sect)
19
18
  insert_submitters(xml, sect)
20
19
  end
21
20
 
22
- def add_id
21
+ def add_id_txt
23
22
  %(id="_#{UUIDTools::UUID.random_create}")
24
23
  end
25
24
 
26
- def insert_execsummary(xml, sect)
27
- summ = xml&.at("//clause[@type = 'executivesummary']")&.remove or
28
- return
29
- preface = sect.at("//preface") ||
30
- sect.add_previous_sibling("<preface/>").first
31
- preface.add_child summ
32
- end
33
-
34
25
  def insert_security(xml, sect)
35
- description = "document"
36
- description = "standard" if %w(standard community-standard)
26
+ "document"
27
+ "standard" if %w(standard community-standard)
37
28
  .include?(@doctype)
38
29
  @doctype == "engineering-report" and return remove_security(xml)
39
30
  preface = sect.at("//preface") ||
@@ -54,21 +45,20 @@ module Metanorma
54
45
  description = "standard" if %w(standard community-standard)
55
46
  .include?(doctype)
56
47
  <<~CLAUSE
57
- <clause type='security' #{add_id}>
48
+ <clause type='security' #{add_id_txt}>
58
49
  <title>Security considerations</title>
59
50
  <p>#{@i18n.security_empty.sub('%', description)}</p></clause>
60
51
  CLAUSE
61
52
  end
62
53
 
63
54
  def insert_submitters(xml, sect)
64
- if xml.at("//submitters")
65
- preface = sect.at("//preface") ||
55
+ if xml.at("//clause[@type = 'submitters' or @type = 'contributors']")
56
+ p = sect.at("//preface") ||
66
57
  sect.add_previous_sibling("<preface/>").first
67
- xml.xpath("//submitters").each do |s|
68
- s.xpath(".//table").each do |t|
69
- t["unnumbered"] = true
70
- end
71
- preface.add_child s.remove
58
+ xml.xpath("//clause[@type = 'submitters' or @type = 'contributors']")
59
+ .each do |s|
60
+ s.xpath(".//table").each { |t| t["unnumbered"] = true }
61
+ p.add_child s.remove
72
62
  end
73
63
  end
74
64
  end
@@ -7,13 +7,7 @@ require_relative "cleanup"
7
7
 
8
8
  module Metanorma
9
9
  module Ogc
10
- # A {Converter} implementation that generates RSD output, and a document
11
- # schema encapsulation of the document for validation
12
- #
13
10
  class Converter < Standoc::Converter
14
- #XML_ROOT_TAG = "ogc-standard".freeze
15
- #XML_NAMESPACE = "https://www.metanorma.org/ns/ogc".freeze
16
-
17
11
  register_for "ogc"
18
12
 
19
13
  def init_toc(node)
@@ -71,10 +65,8 @@ module Metanorma
71
65
 
72
66
  def override_style(node)
73
67
  s = node.attr("style")
74
- if %w(executive_summary overview future_outlook value_proposition
75
- contributors).include?(s)
68
+ if %w(overview future_outlook value_proposition contributors).include?(s)
76
69
  node.set_attr("style", "preface")
77
- s == "executive_summary" and s = "executivesummary"
78
70
  node.set_attr("type", s)
79
71
  end
80
72
  if %w(aims objectives topics outlook security).include?(s)
@@ -88,11 +80,16 @@ module Metanorma
88
80
  when "foreword", "introduction" then "donotrecognise-foreword"
89
81
  when "references" then "normative references"
90
82
  when "glossary" then "terms and definitions"
91
- else
92
- super
83
+ else super
93
84
  end
94
85
  end
95
86
 
87
+ # legacy encoding
88
+ def sectiontype1(node)
89
+ role_style(node, "executive_summary") and return "executivesummary"
90
+ super
91
+ end
92
+
96
93
  def outputs(node, ret)
97
94
  File.open("#{@filename}.xml", "w:UTF-8") { |f| f.write(ret) }
98
95
  presentation_xml_converter(node).convert("#{@filename}.xml")
@@ -105,20 +102,18 @@ module Metanorma
105
102
  end
106
103
 
107
104
  def clause_parse(attrs, xml, node)
108
- %w(executivesummary overview future_outlook value_proposition
105
+ %w(overview future_outlook value_proposition
109
106
  contributors aims objectives topics outlook security)
110
107
  .include?(node.attr("type")) and
111
108
  attrs = attrs.merge(type: node.attr("type"))
112
109
  case node.attr("heading")&.downcase || node.title.downcase
113
110
  when "submitters"
114
- return submitters_parse(attrs, xml, node)
111
+ return submitters_parse(attrs.merge(type: "submitters"), xml, node)
115
112
  when "contributors"
116
113
  return submitters_parse(attrs.merge(type: "contributors"), xml, node)
117
114
  when "conformance" then attrs = attrs.merge(type: "conformance")
118
115
  when "security considerations"
119
116
  attrs = attrs.merge(type: "security")
120
- when "executive summary"
121
- attrs = attrs.merge(type: "executivesummary")
122
117
  end
123
118
  super
124
119
  end
@@ -128,7 +123,7 @@ module Metanorma
128
123
  doctype(node) == "engineering-report" ||
129
124
  attrs[:type] == "contributors" and
130
125
  title = @i18n.contributors_clause
131
- xml.submitters **attr_code(attrs) do |xml_section|
126
+ xml.clause **attr_code(attrs) do |xml_section|
132
127
  xml_section.title title
133
128
  xml_section << node.content
134
129
  end
@@ -155,6 +150,7 @@ module Metanorma
155
150
  attrs1 = attrs.merge(id: "_#{UUIDTools::UUID.random_create}")
156
151
  xml.annex **attr_code(attrs1) do |xml_section|
157
152
  xml_section.title { |name| name << node.title }
153
+ attrs.delete(:anchor)
158
154
  xml_section.terms **attr_code(attrs) do |terms|
159
155
  (s = node.attr("source")) && s.split(",").each do |s1|
160
156
  terms.termdocsource(nil, **attr_code(bibitemid: s1))
@@ -164,10 +160,6 @@ module Metanorma
164
160
  end
165
161
  end
166
162
 
167
- def highlight_parse(text, xml)
168
- xml.hi { |s| s << text }
169
- end
170
-
171
163
  def set_obligation(attrs, node)
172
164
  if node.attr("style") == "appendix" && node.level == 1
173
165
  attrs[:obligation] = if node.attributes.has_key?("obligation")
@@ -1,6 +1,6 @@
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
- <!-- VERSION v2.0.3 -->
3
+ <!-- VERSION v2.0.5 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -36,6 +36,12 @@
36
36
  </zeroOrMore>
37
37
  </element>
38
38
  </define>
39
+ <define name="IdRefType">
40
+ <a:documentation>Cross-references are not normalised to xsd:IDREF in Semantic XML: that is deferred to Presentation XML.
41
+ All IdRefType instances point not to `@id` in Semantic XML, which is the Content GUID for an element,
42
+ but to `@anchor`, the user-supplied cross-reference</a:documentation>
43
+ <text/>
44
+ </define>
39
45
  <define name="index-primary">
40
46
  <element name="primary">
41
47
  <oneOrMore>
@@ -238,7 +244,7 @@
238
244
  <a:documentation>Notes specific to this block</a:documentation>
239
245
  </ref>
240
246
  </zeroOrMore>
241
- <ref name="TermSource">
247
+ <ref name="BlockSource">
242
248
  <a:documentation>A source for the table</a:documentation>
243
249
  </ref>
244
250
  </define>
@@ -262,10 +268,112 @@ and is intended to be referenced by a callout within the source code</a:document
262
268
  <a:documentation>Notes whose scope is the current block</a:documentation>
263
269
  </ref>
264
270
  </zeroOrMore>
265
- <ref name="TermSource">
271
+ <ref name="BlockSource">
272
+ <a:documentation>A source for the block</a:documentation>
273
+ </ref>
274
+ </define>
275
+ <define name="FigureBody">
276
+ <optional>
277
+ <ref name="tname">
278
+ <a:documentation>The caption of the block</a:documentation>
279
+ </ref>
280
+ </optional>
281
+ <choice>
282
+ <a:documentation>Content of the figure</a:documentation>
283
+ <ref name="image"/>
284
+ <ref name="video"/>
285
+ <ref name="audio"/>
286
+ <ref name="pre"/>
287
+ <oneOrMore>
288
+ <ref name="paragraph-with-footnote"/>
289
+ </oneOrMore>
290
+ <zeroOrMore>
291
+ <ref name="figure"/>
292
+ </zeroOrMore>
293
+ </choice>
294
+ <zeroOrMore>
295
+ <ref name="fn">
296
+ <a:documentation>Footnotes specific to the figure</a:documentation>
297
+ </ref>
298
+ </zeroOrMore>
299
+ <optional>
300
+ <ref name="dl">
301
+ <a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
302
+ </ref>
303
+ </optional>
304
+ <zeroOrMore>
305
+ <ref name="note">
306
+ <a:documentation>Notes whose scope is the current block</a:documentation>
307
+ </ref>
308
+ </zeroOrMore>
309
+ <ref name="BlockSource">
266
310
  <a:documentation>A source for the block</a:documentation>
267
311
  </ref>
268
312
  </define>
313
+ <define name="FigureNoIdBody">
314
+ <optional>
315
+ <ref name="source">
316
+ <a:documentation>A URI or other reference intended to link to an externally hosted image (or equivalent)</a:documentation>
317
+ </ref>
318
+ </optional>
319
+ <optional>
320
+ <ref name="tname">
321
+ <a:documentation>The caption of the block</a:documentation>
322
+ </ref>
323
+ </optional>
324
+ <choice>
325
+ <a:documentation>Content of the figure</a:documentation>
326
+ <ref name="image-no-id"/>
327
+ <ref name="video-no-id"/>
328
+ <ref name="audio-no-id"/>
329
+ <ref name="pre-no-id"/>
330
+ <oneOrMore>
331
+ <ref name="paragraph-with-footnote-no-id"/>
332
+ </oneOrMore>
333
+ <zeroOrMore>
334
+ <ref name="figure-no-id"/>
335
+ </zeroOrMore>
336
+ </choice>
337
+ <zeroOrMore>
338
+ <ref name="fn">
339
+ <a:documentation>Footnotes specific to the figure</a:documentation>
340
+ </ref>
341
+ </zeroOrMore>
342
+ <optional>
343
+ <ref name="dl-no-id">
344
+ <a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
345
+ </ref>
346
+ </optional>
347
+ <zeroOrMore>
348
+ <ref name="note-no-id">
349
+ <a:documentation>Notes whose scope is the current block</a:documentation>
350
+ </ref>
351
+ </zeroOrMore>
352
+ <ref name="BlockSource">
353
+ <a:documentation>A source for the block</a:documentation>
354
+ </ref>
355
+ </define>
356
+ <define name="source">
357
+ <element name="source">
358
+ <attribute name="status">
359
+ <a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
360
+ <ref name="SourceStatusType"/>
361
+ </attribute>
362
+ <attribute name="type">
363
+ <a:documentation>The type of the managed term in the present context</a:documentation>
364
+ <ref name="SourceTypeType"/>
365
+ </attribute>
366
+ <ref name="origin">
367
+ <a:documentation>The original document and location where the term definition has been obtained from</a:documentation>
368
+ </ref>
369
+ <optional>
370
+ <ref name="modification">
371
+ <a:documentation>Any changes that the definition of the term has undergone relative to the original document,
372
+ in order to be applicable in this standardisation document</a:documentation>
373
+ </ref>
374
+ </optional>
375
+ </element>
376
+ </define>
269
377
  <define name="sourcecodebody">
270
378
  <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
271
379
  (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
@@ -687,6 +795,20 @@ titlecase, or lowercase</a:documentation>
687
795
  </attribute>
688
796
  </optional>
689
797
  </define>
798
+ <define name="RequiredId" combine="interleave">
799
+ <optional>
800
+ <attribute name="anchor">
801
+ <a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
802
+ </attribute>
803
+ </optional>
804
+ </define>
805
+ <define name="OptionalId" combine="interleave">
806
+ <optional>
807
+ <attribute name="anchor">
808
+ <a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
809
+ </attribute>
810
+ </optional>
811
+ </define>
690
812
  <define name="ObligationType">
691
813
  <a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
692
814
  <choice>
@@ -1081,7 +1203,7 @@ That concept may be defined as a term within the current document, or it may be
1081
1203
  <element name="label">
1082
1204
  <!-- Identifier of form input element that this element is a label of -->
1083
1205
  <attribute name="for">
1084
- <data type="IDREF"/>
1206
+ <ref name="IdRefType"/>
1085
1207
  </attribute>
1086
1208
  <zeroOrMore>
1087
1209
  <ref name="PureTextElement"/>
@@ -1328,6 +1450,7 @@ numbers</a:documentation>
1328
1450
  <ref name="foreword"/>
1329
1451
  <ref name="introduction"/>
1330
1452
  <ref name="acknowledgements"/>
1453
+ <ref name="executivesummary"/>
1331
1454
  </choice>
1332
1455
  </oneOrMore>
1333
1456
  </element>
@@ -1351,6 +1474,11 @@ numbers</a:documentation>
1351
1474
  <ref name="Content-Section"/>
1352
1475
  </element>
1353
1476
  </define>
1477
+ <define name="executivesummary">
1478
+ <element name="executivesummary">
1479
+ <ref name="Content-Section"/>
1480
+ </element>
1481
+ </define>
1354
1482
  <define name="indexsect">
1355
1483
  <element name="indexsect">
1356
1484
  <ref name="Content-Section"/>
@@ -1576,6 +1704,15 @@ used in document amendments</a:documentation>
1576
1704
  <define name="annex">
1577
1705
  <element name="annex">
1578
1706
  <ref name="Annex-Section"/>
1707
+ <zeroOrMore>
1708
+ <ref name="annex-appendix"/>
1709
+ </zeroOrMore>
1710
+ </element>
1711
+ </define>
1712
+ <define name="annex-appendix">
1713
+ <a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
1714
+ <element name="appendix">
1715
+ <ref name="Clause-Section"/>
1579
1716
  </element>
1580
1717
  </define>
1581
1718
  <define name="terms">
@@ -2106,7 +2243,7 @@ used in document amendments</a:documentation>
2106
2243
  </define>
2107
2244
  <define name="termsource">
2108
2245
  <a:documentation>The bibliographic source where a term is defined in the sense applicable in this standardisation document</a:documentation>
2109
- <element name="termsource">
2246
+ <element name="source">
2110
2247
  <attribute name="status">
2111
2248
  <a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
2112
2249
  <ref name="SourceStatusType"/>
@@ -2488,6 +2625,11 @@ Normative References contents contain normative references, but as a clause in t
2488
2625
  <ref name="termsource"/>
2489
2626
  </zeroOrMore>
2490
2627
  </define>
2628
+ <define name="BlockSource">
2629
+ <zeroOrMore>
2630
+ <ref name="source"/>
2631
+ </zeroOrMore>
2632
+ </define>
2491
2633
  <start>
2492
2634
  <ref name="standard-document"/>
2493
2635
  </start>
@@ -1,39 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <include href="relaton-ogc.rng"/>
4
- <include href="isodoc.rng">
5
- <define name="preface">
6
- <element name="preface">
7
- <optional>
8
- <ref name="abstract"/>
9
- </optional>
10
- <ref name="foreword"/>
11
- <optional>
12
- <ref name="submitters"/>
13
- </optional>
14
- </element>
15
- </define>
16
- </include>
17
- <!-- end overrides -->
18
- <define name="TextElement" combine="choice">
19
- <ref name="hi"/>
20
- </define>
21
- <define name="PureTextElement" combine="choice">
22
- <ref name="hi"/>
23
- </define>
24
- <define name="hi">
25
- <element name="hi">
26
- <zeroOrMore>
27
- <choice>
28
- <ref name="PureTextElement"/>
29
- <ref name="stem"/>
30
- </choice>
31
- </zeroOrMore>
32
- </element>
33
- </define>
34
- <define name="submitters">
35
- <element name="submitters">
36
- <ref name="Basic-Section"/>
37
- </element>
38
- </define>
4
+ <include href="isodoc.rng"/>
39
5
  </grammar>
6
+ <!-- end overrides -->
@@ -56,7 +56,7 @@ module Metanorma
56
56
  end
57
57
 
58
58
  def execsummary_validate(xmldoc)
59
- sect = xmldoc.at("//clause[@type = 'executivesummary']")
59
+ sect = xmldoc.at("//executivesummary")
60
60
  @doctype == "engineering-report" && sect.nil? and
61
61
  @log.add("Style", nil,
62
62
  "Executive Summary required for Engineering Reports!")
@@ -136,8 +136,8 @@ module Metanorma
136
136
  root.at("//bibdata/contributor[role/@type = 'author']/organization/" \
137
137
  "name") or
138
138
  @log.add("Style", nil, "Submitting Organizations is missing!")
139
- root.at("//submitters") or @log.add("Style", nil,
140
- "Submitters is missing!")
139
+ root.at("//clause[@type = 'submitters' or @type = 'contributors']") or
140
+ @log.add("Style", nil, "Submitters is missing!")
141
141
  end
142
142
 
143
143
  def norm_ref_validate(doc)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.7.4".freeze
3
+ VERSION = "2.7.6".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.4
4
+ version: 2.7.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: 2025-04-14 00:00:00.000000000 Z
11
+ date: 2025-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639