metanorma-ogc 1.0.2 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +10 -10
  3. data/.github/workflows/ubuntu.yml +25 -11
  4. data/.github/workflows/windows.yml +11 -12
  5. data/README.adoc +3 -2
  6. data/lib/asciidoctor/ogc/biblio.rng +131 -46
  7. data/lib/asciidoctor/ogc/boilerplate.xml +33 -50
  8. data/lib/asciidoctor/ogc/converter.rb +6 -10
  9. data/lib/asciidoctor/ogc/front.rb +10 -5
  10. data/lib/asciidoctor/ogc/isodoc.rng +37 -4
  11. data/lib/asciidoctor/ogc/ogc.rng +0 -4
  12. data/lib/asciidoctor/ogc/validate.rb +12 -10
  13. data/lib/isodoc/ogc/base_convert.rb +12 -107
  14. data/lib/isodoc/ogc/biblio.rb +13 -2
  15. data/lib/isodoc/ogc/html/html_ogc_titlepage.html +9 -8
  16. data/lib/isodoc/ogc/html/htmlstyle.scss +44 -13
  17. data/lib/isodoc/ogc/html/scripts.html +14 -27
  18. data/lib/isodoc/ogc/html/word_ogc_titlepage.html +13 -4
  19. data/lib/isodoc/ogc/i18n-en.yaml +3 -0
  20. data/lib/isodoc/ogc/metadata.rb +1 -23
  21. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +3225 -0
  22. data/lib/isodoc/ogc/ogc.best-practice.xsl +3225 -0
  23. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +3225 -0
  24. data/lib/isodoc/ogc/ogc.community-practice.xsl +3225 -0
  25. data/lib/isodoc/ogc/ogc.community-standard.xsl +3225 -0
  26. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +3225 -0
  27. data/lib/isodoc/ogc/ogc.engineering-report.xsl +3225 -0
  28. data/lib/isodoc/ogc/ogc.other.xsl +3225 -0
  29. data/lib/isodoc/ogc/ogc.policy.xsl +3225 -0
  30. data/lib/isodoc/ogc/ogc.reference-model.xsl +3225 -0
  31. data/lib/isodoc/ogc/ogc.release-notes.xsl +3225 -0
  32. data/lib/isodoc/ogc/ogc.standard.xsl +3225 -0
  33. data/lib/isodoc/ogc/ogc.test-suite.xsl +3225 -0
  34. data/lib/isodoc/ogc/ogc.user-guide.xsl +3225 -0
  35. data/lib/isodoc/ogc/ogc.white-paper.xsl +3225 -0
  36. data/lib/isodoc/ogc/pdf_convert.rb +18 -77
  37. data/lib/isodoc/ogc/reqt.rb +76 -36
  38. data/lib/isodoc/ogc/sections.rb +111 -0
  39. data/lib/isodoc/ogc/word_convert.rb +20 -9
  40. data/lib/metanorma/ogc/processor.rb +8 -0
  41. data/lib/metanorma/ogc/version.rb +1 -1
  42. data/metanorma-ogc.gemspec +2 -3
  43. metadata +22 -21
  44. data/lib/isodoc/ogc/html/scripts.pdf.html +0 -72
@@ -3,11 +3,17 @@
3
3
  <clause>
4
4
  <title>Copyright notice</title>
5
5
 
6
- <p align="center">Copyright
6
+ <p>Copyright
7
7
  © {{ docyear }} Open Geospatial Consortium<br/>
8
8
  To obtain additional rights of use, visit
9
9
  <link target="http://www.opengeospatial.org/legal/">http://www.opengeospatial.org/legal/</link></p>
10
10
  </clause>
11
+ <clause>
12
+ <title>Note</title>
13
+ <p>Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. The Open Geospatial Consortium shall not be held responsible for identifying any or all such patent rights.</p>
14
+
15
+ <p>Recipients of this document are requested to submit, with their comments, notification of any relevant patent claims or other intellectual property rights of which they may be aware that might be infringed by any implementation of the standard set forth in this document, and to provide supporting documentation.</p>
16
+ </clause>
11
17
  </copyright-statement>
12
18
  <license-statement>
13
19
  <clause>
@@ -71,7 +77,9 @@
71
77
  authorization of LICENSOR or such copyright holder. LICENSOR is and shall at
72
78
  all times be the sole entity that may authorize you or any third party to use
73
79
  certification marks, trademarks or other special designations to indicate
74
- compliance with any LICENSOR standards or specifications. This Agreement is
80
+ compliance with any LICENSOR standards or specifications.</p>
81
+
82
+ <p> This Agreement is
75
83
  governed by the laws of the Commonwealth of Massachusetts. The application to
76
84
  this Agreement of the United Nations Convention on Contracts for the
77
85
  International Sale of Goods is hereby expressly excluded. In the event any
@@ -80,88 +88,63 @@
80
88
  modified the entire Agreement shall remain in full force and effect. No
81
89
  decision, action or inaction by LICENSOR shall be construed to be a waiver of
82
90
  any rights or remedies available to it.</p>
91
+
92
+ <p>None of the Intellectual Property or underlying information or technology may be downloaded or otherwise exported or reexported in violation of U.S. export laws and regulations. In addition, you are responsible for complying with any local laws in your jurisdiction which may impact your right to import, export or use the Intellectual Property, and you represent that you have complied with any regulations or registration procedures required by applicable law to make this license enforceable.</p>
83
93
  </clause>
84
94
  </license-statement>
85
95
 
86
96
  <legal-statement>
87
- {% if stage == "Published" or stage == "Withdrawn" %}
88
97
  {% if doctype == "Standard" or doctype == "Community Standard" %}
98
+ {% if stage == "Published" or stage == "Withdrawn" %}
89
99
  <clause>
90
100
  <title>Warning</title>
91
101
  <p>This document is an OGC Member approved international standard. This document is available on a royalty free, non-discriminatory basis. Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.
92
102
  </p>
93
103
  </clause>
94
-
95
- {% elsif doctype == "Discussion Paper" %}
104
+ {% else %}
96
105
  <clause>
97
- <title>Warning</title>
98
- <p>This document is not an OGC Standard. This document is an OGC Discussion Paper and is therefore <em>not an official position</em> of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, an OGC Discussion Paper should not be referenced as required or mandatory technology in procurements.
99
- </p>
106
+ <title>Warning for Drafts</title>
107
+ <p>This document is not an OGC Standard. This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
108
+
109
+ <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
100
110
  </clause>
111
+ {% endif %}
101
112
 
102
113
 
103
114
  {% elsif doctype == "Engineering Report" %}
104
115
  <clause>
105
116
  <title>Warning</title>
106
- <p>This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is <em>not an official position</em> of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, any OGC Engineering Report should not be referenced as required or mandatory technology in procurements.
107
- </p>
117
+ <p>This document is not an OGC Standard. This document is an OGC Public Engineering Report created as a deliverable in an OGC Interoperability Initiative and is <em>not an official position</em> of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard.</p>
118
+
119
+ <p>Further, any OGC Engineering Report should not be referenced as required or mandatory technology in procurements. However, the discussions in this document could very well lead to the definition of an OGC Standard.</p>
108
120
  </clause>
109
121
 
110
122
 
111
123
  {% elsif doctype == "Best Practice" %}
112
124
  <clause>
113
125
  <title>Warning</title>
114
- <p>This document defines an OGC Best Practices on a particular technology or approach related to an OGC standard. This document is <em>not</em> an OGC Standard and may not be referred to as an OGC Standard. It is subject to change without notice. However, this document is an <em>official</em> position of the OGC membership on this particular technology topic.
115
- </p>
116
- </clause>
126
+ <p>This document defines an OGC Best Practice on a particular technology or approach related to an OGC standard. This document is <em>not</em> an OGC Standard and may not be referred to as an OGC Standard. It is subject to change without notice. However, this document is an <em>official</em> position of the OGC membership on this particular technology topic.</p>
117
127
 
118
- {% elsif doctype == "Policy" %}
119
- <clause>
120
- <title>Warning</title>
121
- <p>This document is an OGC Policies and Procedures Document. The document is subject to change based on membership requirements and motions. Please note that the OGC <link target="http://www.opengeospatial.org/ogc/policies/directives">Policies Related to OGC Standards</link> should be also be read.
122
- </p>
123
- </clause>
124
- {% else %}
125
- <clause>
126
- <title>Warning</title>
127
- <p>This document is published by OGC.
128
- </p>
128
+ <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
129
129
  </clause>
130
- {% endif %}
131
130
 
132
- {% else %}
131
+ {% elsif doctype == "Release Notes" %}
133
132
  <clause>
134
- <title>Warning for Drafts</title>
135
-
136
- {% if doctype == "Standard" or doctype == "Standard With Suite" %}
137
- <p>This document is not an OGC Standard. This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
138
-
139
- <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
140
-
141
- {% elsif doctype == "Best Practice" %}
142
- <p>This document defines an OGC Best Practice on a particular technology or approach related to an OGC standard. This document is not an OGC Standard and may not be referred to as an OGC Standard. It is subject to change without notice. However, this document is an official position of the OGC membership on this particular technology topic.</p>
143
-
144
- <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
145
-
146
- {% elsif doctype == "Discussion Paper" %}
147
- <p>This document is not an OGC Standard. This document is an OGC Discussion Paper and is therefore not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, an OGC Discussion Paper should not be referenced as required or mandatory technology in procurements.</p>
148
-
149
- {% elsif doctype == "White Paper" %}
150
- <p>This document is not an OGC Standard. This document is an OGC White Paper and is therefore not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard. Further, an OGC White Paper should not be referenced as required or mandatory technology in procurements.</p>
151
-
152
- {% elsif doctype == "Release Notes" %}
133
+ <title>Warning</title>
153
134
  <p>This document is not an OGC standard. This document provides release notes for an OGC standard. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
154
135
 
155
136
  <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
156
137
 
157
- {% else %}
158
- <p>This document is not an OGC Standard. This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard.</p>
159
-
160
- <p>Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</p>
161
- {% endif %}
138
+ </clause>
162
139
 
140
+ {% else %}
141
+ <clause>
142
+ <title>Warning</title>
143
+ <p>This document is not an OGC Standard. This document is an OGC {{ doctype }} and is therefore not an official position of the OGC membership. It is distributed for review and comment. It is subject to change without notice and may not be referred to as an OGC Standard.</p>
144
+ <p>Further, an OGC {{ doctype }} should not be referenced as required or mandatory technology in procurements.</p>
163
145
  </clause>
164
146
  {% endif %}
147
+
165
148
  </legal-statement>
166
149
 
167
150
 
@@ -33,7 +33,8 @@ 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,
37
+ "'#{d}' is not a legal document type: reverting to 'standard'")
37
38
  @warned_doctype = true
38
39
  d = "standard"
39
40
  end
@@ -45,6 +46,7 @@ module Asciidoctor
45
46
  when "preface" then "foreword"
46
47
  when "foreword" then "donotrecognise-foreword"
47
48
  when "introduction" then "donotrecognise-foreword"
49
+ when "references" then "normative references"
48
50
  else
49
51
  super
50
52
  end
@@ -60,8 +62,9 @@ module Asciidoctor
60
62
  File.open(filename, "w") { |f| f.write(ret) }
61
63
  html_converter(node).convert filename unless node.attr("nodoc")
62
64
  word_converter(node).convert filename unless node.attr("nodoc")
63
- pdf_converter(node).convert filename unless node.attr("nodoc")
65
+ pdf_converter(node)&.convert filename unless node.attr("nodoc")
64
66
  end
67
+ @log.write(@localdir + @filename + ".err") unless @novalid
65
68
  @files_to_delete.each { |f| FileUtils.rm f }
66
69
  ret
67
70
  end
@@ -97,14 +100,6 @@ module Asciidoctor
97
100
  end
98
101
  end
99
102
 
100
- def bibliography_parse(attrs, xml, node)
101
- clausetype = node&.attr("heading")&.downcase || node.title.downcase
102
- if clausetype == "references" then norm_ref_parse(attrs, xml, node)
103
- else
104
- super
105
- end
106
- end
107
-
108
103
  def submitters_parse(attrs, xml, node)
109
104
  xml.submitters **attr_code(attrs) do |xml_section|
110
105
  xml_section << node.content
@@ -128,6 +123,7 @@ module Asciidoctor
128
123
  end
129
124
 
130
125
  def pdf_converter(node)
126
+ return nil if node.attr("no-pdf")
131
127
  IsoDoc::Ogc::PdfConvert.new(html_extract_attributes(node))
132
128
  end
133
129
 
@@ -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
@@ -101,9 +101,7 @@
101
101
  <ref name="structuredidentifier"/>
102
102
  </zeroOrMore>
103
103
  </define>
104
- <define name="TitleType">
105
- <text/>
106
- </define>
104
+ <!-- TitleType = text -->
107
105
  <define name="sections">
108
106
  <element name="sections">
109
107
  <oneOrMore>
@@ -131,6 +129,9 @@
131
129
  </choice>
132
130
  </attribute>
133
131
  </optional>
132
+ <attribute name="normative">
133
+ <data type="boolean"/>
134
+ </attribute>
134
135
  <optional>
135
136
  <ref name="section-title"/>
136
137
  </optional>
@@ -307,6 +308,21 @@
307
308
  </define>
308
309
  </include>
309
310
  <!-- end overrides -->
311
+ <define name="TextElement" combine="choice">
312
+ <ref name="concept"/>
313
+ </define>
314
+ <define name="concept">
315
+ <element name="concept">
316
+ <optional>
317
+ <attribute name="term"/>
318
+ </optional>
319
+ <choice>
320
+ <ref name="eref"/>
321
+ <ref name="xref"/>
322
+ <ref name="termref"/>
323
+ </choice>
324
+ </element>
325
+ </define>
310
326
  <define name="BasicBlock" combine="choice">
311
327
  <choice>
312
328
  <ref name="requirement"/>
@@ -645,6 +661,11 @@
645
661
  <optional>
646
662
  <attribute name="script"/>
647
663
  </optional>
664
+ <optional>
665
+ <attribute name="inline-header">
666
+ <data type="boolean"/>
667
+ </attribute>
668
+ </optional>
648
669
  <optional>
649
670
  <attribute name="obligation">
650
671
  <choice>
@@ -908,7 +929,10 @@
908
929
  </define>
909
930
  <define name="origin">
910
931
  <element name="origin">
911
- <ref name="erefType"/>
932
+ <choice>
933
+ <ref name="erefType"/>
934
+ <ref name="termref"/>
935
+ </choice>
912
936
  </element>
913
937
  </define>
914
938
  <define name="modification">
@@ -916,6 +940,15 @@
916
940
  <ref name="paragraph"/>
917
941
  </element>
918
942
  </define>
943
+ <define name="termref">
944
+ <element name="termref">
945
+ <attribute name="base"/>
946
+ <attribute name="target"/>
947
+ <optional>
948
+ <text/>
949
+ </optional>
950
+ </element>
951
+ </define>
919
952
  <define name="structuredidentifier">
920
953
  <element name="structuredidentifier">
921
954
  <optional>
@@ -75,10 +75,6 @@
75
75
  <value>profile</value>
76
76
  <value>profile-with-extension</value>
77
77
  <value>general</value>
78
- <value>encoding</value>
79
- <value>extension</value>
80
- <value>profile</value>
81
- <value>profile-with-extension</value>
82
78
  </choice>
83
79
  </element>
84
80
  </define>
@@ -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
@@ -2,21 +2,12 @@ require "isodoc"
2
2
  require_relative "metadata"
3
3
  require_relative "reqt"
4
4
  require_relative "biblio"
5
+ require_relative "sections"
5
6
  require "fileutils"
6
7
 
7
8
  module IsoDoc
8
9
  module Ogc
9
10
  module BaseConvert
10
- def annex_name(annex, name, div)
11
- div.h1 **{ class: "Annex" } do |t|
12
- t << "#{anchor(annex['id'], :label)} "
13
- t.br
14
- t.b do |b|
15
- name&.children&.each { |c2| parse(c2, b) }
16
- end
17
- end
18
- end
19
-
20
11
  def fileloc(loc)
21
12
  File.join(File.dirname(__FILE__), loc)
22
13
  end
@@ -63,68 +54,12 @@ module IsoDoc
63
54
 
64
55
  def load_yaml(lang, script)
65
56
  y = if @i18nyaml then YAML.load_file(@i18nyaml)
66
- elsif lang == "en"
67
- YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
68
57
  else
69
58
  YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
70
59
  end
71
60
  super.merge(y)
72
61
  end
73
62
 
74
- def keywords(_docxml, out)
75
- kw = @meta.get[:keywords]
76
- kw.empty? and return
77
- @prefacenum += 1
78
- out.div **{ class: "Section3" } do |div|
79
- clause_name(RomanNumerals.to_roman(@prefacenum).downcase,
80
- "Keywords", div, class: "IntroTitle")
81
- div.p "The following are keywords to be used by search engines and "\
82
- "document catalogues."
83
- div.p kw.join(", ")
84
- end
85
- end
86
-
87
- SUBMITTINGORGS =
88
- "//bibdata/contributor[role/@type = 'author']/organization/name".freeze
89
-
90
- def submittingorgs(docxml, out)
91
- orgs = []
92
- docxml.xpath(ns(SUBMITTINGORGS)).each { |org| orgs << org.text }
93
- return if orgs.empty?
94
- @prefacenum += 1
95
- out.div **{ class: "Section3" } do |div|
96
- clause_name(RomanNumerals.to_roman(@prefacenum).downcase,
97
- "Submitting Organizations", div, class: "IntroTitle")
98
- div.p "The following organizations submitted this Document to the "\
99
- "Open Geospatial Consortium (OGC):"
100
- div.ul do |ul|
101
- orgs.each { |org| ul.li org }
102
- end
103
- end
104
- end
105
-
106
- def submitters(docxml, out)
107
- f = docxml.at(ns("//submitters")) || return
108
- @prefacenum += 1
109
- out.div **{ class: "Section3" } do |div|
110
- clause_name(anchor(f['id'], :label), "Submitters", div,
111
- class: "IntroTitle")
112
- f.elements.each { |e| parse(e, div) unless e.name == "title" }
113
- end
114
- end
115
-
116
- def preface(isoxml, out)
117
- title_attr = { class: "IntroTitle" }
118
- isoxml.xpath(ns("//preface/clause")).each do |f|
119
- @prefacenum += 1
120
- out.div **{ class: "Section3", id: f["id"] } do |div|
121
- clause_name(RomanNumerals.to_roman(@prefacenum).downcase,
122
- f&.at(ns("./title")), div, title_attr)
123
- f.elements.each { |e| parse(e, div) unless e.name == "title" }
124
- end
125
- end
126
- end
127
-
128
63
  def preface_names_numbered(clause)
129
64
  return if clause.nil?
130
65
  @prefacenum += 1
@@ -138,44 +73,24 @@ module IsoDoc
138
73
  end
139
74
  end
140
75
 
141
- def abstract(isoxml, out)
142
- f = isoxml.at(ns("//preface/abstract")) || return
143
- @prefacenum += 1
144
- page_break(out)
145
- out.div **attr_code(id: f["id"]) do |s|
146
- clause_name(anchor(f["id"], :label), @abstract_lbl, s,
147
- class: "AbstractTitle")
148
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
149
- end
76
+ def example_parse(node, out)
77
+ name = node.at(ns("./name"))
78
+ example_name_parse(node, out, name) #if name
79
+ super
150
80
  end
151
81
 
152
- def foreword(isoxml, out)
153
- f = isoxml.at(ns("//foreword")) || return
154
- @prefacenum += 1
155
- page_break(out)
156
- out.div **attr_code(id: f["id"]) do |s|
157
- clause_name(anchor(f["id"], :label), @foreword_lbl, s,
158
- class: "ForewordTitle")
159
- f.elements.each { |e| parse(e, s) unless e.name == "title" }
160
- end
82
+ def example_label(node, div, name)
161
83
  end
162
84
 
163
- def acknowledgements(isoxml, out)
164
- f = isoxml.at(ns("//acknowledgements")) || return
165
- @prefacenum += 1
166
- out.div **{ class: "Section3", id: f["id"] } do |div|
167
- clause_name(anchor(f["id"], :label), f&.at(ns("./title")), div,
168
- class: "IntroTitle")
169
- f.elements.each { |e| parse(e, div) unless e.name == "title" }
85
+ def example_name_parse(node, div, name)
86
+ lbl = anchor(node['id'], :label, false)
87
+ div.p **{ class: "SourceTitle", style: "text-align:center;" } do |p|
88
+ lbl.nil? or p << l10n("#{@example_lbl} #{lbl}")
89
+ name and !lbl.nil? and p << "&nbsp;&mdash; "
90
+ name&.children&.each { |n| parse(n, p) }
170
91
  end
171
92
  end
172
93
 
173
- def example_parse(node, out)
174
- name = node.at(ns("./name"))
175
- sourcecode_name_parse(node, out, name) if name
176
- super
177
- end
178
-
179
94
  def initial_anchor_names(d)
180
95
  @prefacenum = 0
181
96
  preface_names_numbered(d.at(ns("//preface/abstract")))
@@ -220,16 +135,6 @@ module IsoDoc
220
135
  sequential_asset_names(d.xpath(ns(middle_sections)))
221
136
  end
222
137
 
223
- def conformance(isoxml, out, num)
224
- f = isoxml.at(ns("//clause[title = 'Conformance']")) or return num
225
- out.div **attr_code(id: f["id"]) do |div|
226
- num = num + 1
227
- clause_name(num, "Conformance", div, nil)
228
- f.elements.each { |e| parse(e, div) unless e.name == "title" }
229
- end
230
- num
231
- end
232
-
233
138
  def middle(isoxml, out)
234
139
  middle_title(out)
235
140
  i = scope isoxml, out, 0