metanorma-ogc 1.0.3 → 1.0.8

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 +144 -49
  7. data/lib/asciidoctor/ogc/boilerplate.xml +37 -69
  8. data/lib/asciidoctor/ogc/converter.rb +6 -11
  9. data/lib/asciidoctor/ogc/isodoc.rng +49 -5
  10. data/lib/asciidoctor/ogc/ogc.rng +0 -4
  11. data/lib/isodoc/ogc/base_convert.rb +13 -112
  12. data/lib/isodoc/ogc/biblio.rb +13 -2
  13. data/lib/isodoc/ogc/html/html_ogc_titlepage.html +2 -6
  14. data/lib/isodoc/ogc/html/htmlstyle.scss +11 -1
  15. data/lib/isodoc/ogc/html/scripts.html +14 -27
  16. data/lib/isodoc/ogc/html/word_ogc_titlepage.html +13 -4
  17. data/lib/isodoc/ogc/html_convert.rb +1 -0
  18. data/lib/isodoc/ogc/i18n-en.yaml +3 -0
  19. data/lib/isodoc/ogc/metadata.rb +1 -31
  20. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +3387 -0
  21. data/lib/isodoc/ogc/ogc.best-practice.xsl +3387 -0
  22. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +3387 -0
  23. data/lib/isodoc/ogc/ogc.community-practice.xsl +3387 -0
  24. data/lib/isodoc/ogc/ogc.community-standard.xsl +3387 -0
  25. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +3387 -0
  26. data/lib/isodoc/ogc/ogc.engineering-report.xsl +3387 -0
  27. data/lib/isodoc/ogc/ogc.other.xsl +3387 -0
  28. data/lib/isodoc/ogc/ogc.policy.xsl +3387 -0
  29. data/lib/isodoc/ogc/ogc.reference-model.xsl +3387 -0
  30. data/lib/isodoc/ogc/ogc.release-notes.xsl +3387 -0
  31. data/lib/isodoc/ogc/ogc.standard.xsl +3387 -0
  32. data/lib/isodoc/ogc/ogc.test-suite.xsl +3387 -0
  33. data/lib/isodoc/ogc/ogc.user-guide.xsl +3387 -0
  34. data/lib/isodoc/ogc/ogc.white-paper.xsl +3387 -0
  35. data/lib/isodoc/ogc/pdf_convert.rb +18 -77
  36. data/lib/isodoc/ogc/reqt.rb +74 -114
  37. data/lib/isodoc/ogc/reqt_xref.rb +96 -0
  38. data/lib/isodoc/ogc/sections.rb +111 -0
  39. data/lib/isodoc/ogc/word_convert.rb +17 -11
  40. data/lib/metanorma/ogc/processor.rb +8 -0
  41. data/lib/metanorma/ogc/version.rb +1 -1
  42. data/metanorma-ogc.gemspec +1 -1
  43. metadata +21 -5
  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>
@@ -30,9 +36,8 @@
30
36
  modifications that have not been approved or adopted by LICENSOR.</p>
31
37
 
32
38
  <p>THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT
33
- CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.</p>
34
-
35
- <p>THE INTELLECTUAL PROPERTY IS PROVIDED "AS
39
+ CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.
40
+ THE INTELLECTUAL PROPERTY IS PROVIDED "AS
36
41
  IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
37
42
  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
38
43
  AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS
@@ -71,7 +76,8 @@
71
76
  authorization of LICENSOR or such copyright holder. LICENSOR is and shall at
72
77
  all times be the sole entity that may authorize you or any third party to use
73
78
  certification marks, trademarks or other special designations to indicate
74
- compliance with any LICENSOR standards or specifications. This Agreement is
79
+ compliance with any LICENSOR standards or specifications.
80
+ This Agreement is
75
81
  governed by the laws of the Commonwealth of Massachusetts. The application to
76
82
  this Agreement of the United Nations Convention on Contracts for the
77
83
  International Sale of Goods is hereby expressly excluded. In the event any
@@ -80,111 +86,73 @@
80
86
  modified the entire Agreement shall remain in full force and effect. No
81
87
  decision, action or inaction by LICENSOR shall be construed to be a waiver of
82
88
  any rights or remedies available to it.</p>
89
+
90
+ <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
91
  </clause>
84
92
  </license-statement>
85
93
 
86
94
  <legal-statement>
87
- {% if stage == "Published" or stage == "Withdrawn" %}
88
95
  {% if doctype == "Standard" or doctype == "Community Standard" %}
96
+ {% if stage == "Published" or stage == "Withdrawn" %}
89
97
  <clause>
90
98
  <title>Warning</title>
91
99
  <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
100
  </p>
93
101
  </clause>
94
-
95
- {% elsif doctype == "Discussion Paper" %}
102
+ {% else %}
96
103
  <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>
104
+ <title>Warning for Drafts</title>
105
+ <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>
106
+
107
+ <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
108
  </clause>
109
+ {% endif %}
101
110
 
102
111
 
103
112
  {% elsif doctype == "Engineering Report" %}
104
113
  <clause>
105
114
  <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>
115
+ <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>
116
+
117
+ <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
118
  </clause>
109
119
 
110
120
 
111
121
  {% elsif doctype == "Best Practice" %}
112
122
  <clause>
113
123
  <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>
124
+ <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
125
 
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>
126
+ <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
127
  </clause>
130
- {% endif %}
131
128
 
132
- {% else %}
129
+ {% elsif doctype == "Release Notes" %}
133
130
  <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" %}
131
+ <title>Warning</title>
153
132
  <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
133
 
155
134
  <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
135
 
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 %}
136
+ </clause>
162
137
 
138
+ {% else %}
139
+ <clause>
140
+ <title>Warning</title>
141
+ <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>
142
+ <p>Further, an OGC {{ doctype }} should not be referenced as required or mandatory technology in procurements.</p>
163
143
  </clause>
164
144
  {% endif %}
145
+
165
146
  </legal-statement>
166
147
 
167
148
 
168
149
 
169
150
 
170
- {% if doctype == "Standard" or doctype == "Community Standard" %}
171
151
  <feedback-statement>
172
- <clause>
152
+ {% if doctype == "Standard" %}
153
+ <clause id="boilerplate-standard-feedback">
173
154
  <p>Suggested additions, changes and comments on this standard are welcome and encouraged. Such suggestions may be submitted using the online change request form on OGC web site: <link target="http://portal.opengeospatial.org/public_ogc/change_request.php">http://portal.opengeospatial.org/public_ogc/change_request.php</link></p>
174
155
  </clause>
175
- <clause id="boilerplate-contact">
176
- <p id="boilerplate-name">Open Geospatial Consortium</p>
177
- <p id="boilerplate-address" align="left">
178
- 35 Main Street<br />
179
- Suite 5<br />
180
- Wayland<br />
181
- MA, 01778<br />
182
- United States of America<br />
183
- <br />
184
- <link target="mailto:copyright@opengeospatial.org">copyright@opengeospatial.org</link><br />
185
- <link target="www.opengeospatial.org">www.opengeospatial.org</link>
186
- </p>
187
- </clause>
156
+ {% endif %}
188
157
  </feedback-statement>
189
- {% endif %}
190
158
  </boilerplate>
@@ -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
- @log.add("Document Attributes", nil, "'#{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,9 +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
65
- @log.write(@filename + ".err") unless @novalid
67
+ @log.write(@localdir + @filename + ".err") unless @novalid
66
68
  @files_to_delete.each { |f| FileUtils.rm f }
67
69
  ret
68
70
  end
@@ -98,14 +100,6 @@ module Asciidoctor
98
100
  end
99
101
  end
100
102
 
101
- def bibliography_parse(attrs, xml, node)
102
- clausetype = node&.attr("heading")&.downcase || node.title.downcase
103
- if clausetype == "references" then norm_ref_parse(attrs, xml, node)
104
- else
105
- super
106
- end
107
- end
108
-
109
103
  def submitters_parse(attrs, xml, node)
110
104
  xml.submitters **attr_code(attrs) do |xml_section|
111
105
  xml_section << node.content
@@ -129,6 +123,7 @@ module Asciidoctor
129
123
  end
130
124
 
131
125
  def pdf_converter(node)
126
+ return nil if node.attr("no-pdf")
132
127
  IsoDoc::Ogc::PdfConvert.new(html_extract_attributes(node))
133
128
  end
134
129
 
@@ -53,6 +53,14 @@
53
53
  <optional>
54
54
  <attribute name="alt"/>
55
55
  </optional>
56
+ <optional>
57
+ <attribute name="case">
58
+ <choice>
59
+ <value>capital</value>
60
+ <value>lowercase</value>
61
+ </choice>
62
+ </attribute>
63
+ </optional>
56
64
  <text/>
57
65
  </element>
58
66
  </define>
@@ -101,9 +109,7 @@
101
109
  <ref name="structuredidentifier"/>
102
110
  </zeroOrMore>
103
111
  </define>
104
- <define name="TitleType">
105
- <text/>
106
- </define>
112
+ <!-- TitleType = text -->
107
113
  <define name="sections">
108
114
  <element name="sections">
109
115
  <oneOrMore>
@@ -131,6 +137,9 @@
131
137
  </choice>
132
138
  </attribute>
133
139
  </optional>
140
+ <attribute name="normative">
141
+ <data type="boolean"/>
142
+ </attribute>
134
143
  <optional>
135
144
  <ref name="section-title"/>
136
145
  </optional>
@@ -307,6 +316,21 @@
307
316
  </define>
308
317
  </include>
309
318
  <!-- end overrides -->
319
+ <define name="TextElement" combine="choice">
320
+ <ref name="concept"/>
321
+ </define>
322
+ <define name="concept">
323
+ <element name="concept">
324
+ <optional>
325
+ <attribute name="term"/>
326
+ </optional>
327
+ <choice>
328
+ <ref name="eref"/>
329
+ <ref name="xref"/>
330
+ <ref name="termref"/>
331
+ </choice>
332
+ </element>
333
+ </define>
310
334
  <define name="BasicBlock" combine="choice">
311
335
  <choice>
312
336
  <ref name="requirement"/>
@@ -886,7 +910,15 @@
886
910
  <attribute name="id">
887
911
  <data type="ID"/>
888
912
  </attribute>
889
- <ref name="paragraph"/>
913
+ <oneOrMore>
914
+ <choice>
915
+ <ref name="paragraph"/>
916
+ <ref name="ul"/>
917
+ <ref name="ol"/>
918
+ <ref name="dl"/>
919
+ <ref name="formula"/>
920
+ </choice>
921
+ </oneOrMore>
890
922
  </element>
891
923
  </define>
892
924
  <define name="termexample">
@@ -913,7 +945,10 @@
913
945
  </define>
914
946
  <define name="origin">
915
947
  <element name="origin">
916
- <ref name="erefType"/>
948
+ <choice>
949
+ <ref name="erefType"/>
950
+ <ref name="termref"/>
951
+ </choice>
917
952
  </element>
918
953
  </define>
919
954
  <define name="modification">
@@ -921,6 +956,15 @@
921
956
  <ref name="paragraph"/>
922
957
  </element>
923
958
  </define>
959
+ <define name="termref">
960
+ <element name="termref">
961
+ <attribute name="base"/>
962
+ <attribute name="target"/>
963
+ <optional>
964
+ <text/>
965
+ </optional>
966
+ </element>
967
+ </define>
924
968
  <define name="structuredidentifier">
925
969
  <element name="structuredidentifier">
926
970
  <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>
@@ -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
@@ -56,75 +47,14 @@ module IsoDoc
56
47
  docxml
57
48
  end
58
49
 
59
- def info(isoxml, out)
60
- @meta.keywords isoxml, out
61
- super
62
- end
63
-
64
50
  def load_yaml(lang, script)
65
51
  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
52
  else
69
53
  YAML.load_file(File.join(File.dirname(__FILE__), "i18n-en.yaml"))
70
54
  end
71
55
  super.merge(y)
72
56
  end
73
57
 
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
58
  def preface_names_numbered(clause)
129
59
  return if clause.nil?
130
60
  @prefacenum += 1
@@ -138,44 +68,24 @@ module IsoDoc
138
68
  end
139
69
  end
140
70
 
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
71
+ def example_parse(node, out)
72
+ name = node.at(ns("./name"))
73
+ example_name_parse(node, out, name) #if name
74
+ super
150
75
  end
151
76
 
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
77
+ def example_label(node, div, name)
161
78
  end
162
79
 
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" }
80
+ def example_name_parse(node, div, name)
81
+ lbl = anchor(node['id'], :label, false)
82
+ div.p **{ class: "SourceTitle", style: "text-align:center;" } do |p|
83
+ lbl.nil? or p << l10n("#{@example_lbl} #{lbl}")
84
+ name and !lbl.nil? and p << "&nbsp;&mdash; "
85
+ name&.children&.each { |n| parse(n, p) }
170
86
  end
171
87
  end
172
88
 
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
89
  def initial_anchor_names(d)
180
90
  @prefacenum = 0
181
91
  preface_names_numbered(d.at(ns("//preface/abstract")))
@@ -220,18 +130,9 @@ module IsoDoc
220
130
  sequential_asset_names(d.xpath(ns(middle_sections)))
221
131
  end
222
132
 
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
133
  def middle(isoxml, out)
234
134
  middle_title(out)
135
+ middle_admonitions(isoxml, out)
235
136
  i = scope isoxml, out, 0
236
137
  i = conformance isoxml, out, i
237
138
  i = norm_ref isoxml, out, i