metanorma-iso 1.3.17 → 1.3.18

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f43540e36abfb8c5efc0ea4ed12280723159eac0cfdd76ca9654ad90c92f0ccf
4
- data.tar.gz: 1634a302b026965820392bfe701d13ce391f251592e30d6fb7cb7908cea207cd
3
+ metadata.gz: 146d86d99c9e34976c9441ba645187a22e60c8df18a15de7c2fa909951733f87
4
+ data.tar.gz: 33c553f29ef5d88a27de15b385992fef2a3b56cf795fb738b6664fdce7f2dbc8
5
5
  SHA512:
6
- metadata.gz: 479f3cd417cf68c89a2b0c100b6a4ec04ed3934b009b6c8ca234e004025d709602b0e8df26a781b0e8731924d7266d8a6bbd6b1446132b10647a86d079d6230d
7
- data.tar.gz: d9cf5fe5031b9be10cf46ec3be59e76081e4a77c5f03a487ed7ff939c43211d5b5bf696f54be3cd930acc59400ea7cb19beeea01143375dfbdced33944294120
6
+ metadata.gz: 45d142b2e6cb8961435405b29cff8dfcf7ac2a9dcbe386ca53719d80132db1d09dc23323b9d38e2e18cd2746dbbed32b6d1d0fc1e9f8bf36f3ac65febc27a7a2
7
+ data.tar.gz: cf6c7970dba205716f5a17f98898b8c2a95c1434a1ead5fb6dc6a6a40647ce798c1748cd52cc227fc9ec4ce4f8d5f570476579c4791418baf42e8bd9edb7bd37
@@ -9,14 +9,15 @@ require "pp"
9
9
  module Asciidoctor
10
10
  module ISO
11
11
  class Converter < Standoc::Converter
12
- PRE_NORMREF_FOOTNOTES = "//foreword//fn | //introduction//fn |"\
13
- "//clause[title = 'Scope']//fn" .freeze
12
+ PRE_NORMREF_FOOTNOTES = "//preface//fn | "\
13
+ "//clause[title = 'Scope']//fn".freeze
14
14
 
15
15
  NORMREF_FOOTNOTES =
16
16
  "//references[title = 'Normative References']//fn".freeze
17
17
 
18
18
  POST_NORMREF_FOOTNOTES =
19
- "//clause[not(title = 'Scope')]//fn | "\
19
+ "//sections//clause[not(title = 'Scope')]//fn | "\
20
+ "//annex//fn | "\
20
21
  "//references[title = 'Bibliography']//fn".freeze
21
22
 
22
23
  def other_footnote_renumber(xmldoc)
@@ -63,6 +64,7 @@ module Asciidoctor
63
64
  super
64
65
  end
65
66
 
67
+ TERM_CLAUSE = "//sections//terms".freeze
66
68
  PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
67
69
  OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or "\
68
70
  "@type = 'ISBN'".freeze
@@ -8,6 +8,7 @@ module Asciidoctor
8
8
  a = section_attributes(node)
9
9
  noko do |xml|
10
10
  case sectiontype(node)
11
+ when "foreword" then foreword_parse(a, xml, node)
11
12
  when "introduction" then introduction_parse(a, xml, node)
12
13
  when "patent notice" then patent_notice_parse(xml, node)
13
14
  when "scope" then scope_parse(a, xml, node)
@@ -18,6 +19,8 @@ module Asciidoctor
18
19
  @term_def = false
19
20
  when "symbols and abbreviated terms"
20
21
  symbols_parse(a, xml, node)
22
+ when "acknowledgements"
23
+ acknowledgements_parse(a, xml, node)
21
24
  when "bibliography" then bibliography_parse(a, xml, node)
22
25
  else
23
26
  if @term_def then term_def_subclause_parse(a, xml, node)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.3.17".freeze
3
+ VERSION = "1.3.18".freeze
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ RSpec.describe Asciidoctor::ISO do
4
4
  it "processes sections" do
5
5
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
6
6
  #{ASCIIDOC_BLANK_HDR}
7
- .Foreword
7
+ == Foreword
8
8
 
9
9
  Text
10
10
 
@@ -16,6 +16,8 @@ RSpec.describe Asciidoctor::ISO do
16
16
 
17
17
  Text
18
18
 
19
+ == Acknowledgements
20
+
19
21
  == Normative References
20
22
 
21
23
  == Terms and Definitions
@@ -53,13 +55,17 @@ RSpec.describe Asciidoctor::ISO do
53
55
  === Bibliography Subsection
54
56
  INPUT
55
57
  #{BLANK_HDR}
56
- <preface><foreword obligation="informative">
58
+ <preface><foreword id='_' obligation='informative'>
57
59
  <title>Foreword</title>
58
60
  <p id="_">Text</p>
59
61
  </foreword><introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
60
62
  <title>Introduction Subsection</title>
61
63
  </clause>
62
- </introduction></preface><sections>
64
+ </introduction>
65
+ <acknowledgements id='_' obligation='informative'>
66
+ <title>Acknowledgements</title>
67
+ </acknowledgements>
68
+ </preface><sections>
63
69
  <clause id="_" obligation="normative">
64
70
  <title>Scope</title>
65
71
  <p id="_">Text</p>
@@ -83,6 +89,25 @@ standardization at the following addresses:</p>
83
89
  </term>
84
90
  </terms>
85
91
  <clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
92
+ <p id='_'>For the purposes of this document, the following terms and definitions apply.</p>
93
+ <p id='_'>
94
+ ISO and IEC maintain terminological databases for use in
95
+ standardization at the following addresses:
96
+ </p>
97
+ <ul id='_'>
98
+ <li>
99
+ <p id='_'>
100
+ ISO Online browsing platform: available at
101
+ <link target='http://www.iso.org/obp'/>
102
+ </p>
103
+ </li>
104
+ <li>
105
+ <p id='_'>
106
+ IEC Electropedia: available at
107
+ <link target='http://www.electropedia.org'/>
108
+ </p>
109
+ </li>
110
+ </ul>
86
111
  <title>Normal Terms</title>
87
112
  <term id="_">
88
113
  <preferred>Term2</preferred>
@@ -122,147 +147,6 @@ standardization at the following addresses:</p>
122
147
  OUTPUT
123
148
  end
124
149
 
125
- it "processes sections with title attributes" do
126
- expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
127
- #{ASCIIDOC_BLANK_HDR}
128
- .Foreword
129
-
130
- Text
131
-
132
- [heading=introduction]
133
- == Εισαγωγή
134
-
135
- === Introduction Subsection
136
-
137
- [heading=scope]
138
- == Σκοπός
139
-
140
- Text
141
-
142
- [heading=normative references]
143
- == Κανονιστικές Παραπομπές
144
-
145
- [heading=terms and definitions]
146
- == Όροι και Ορισμοί
147
-
148
- === Term1
149
-
150
- [heading="terms, definitions, symbols and abbreviated terms"]
151
- == Όροι, Ορισμοί, Σύμβολα και Συντομογραφίες
152
-
153
- === Normal Terms
154
-
155
- ==== Term2
156
-
157
- [heading=symbols and abbreviated terms]
158
- === Σύμβολα και Συντομογραφίες
159
-
160
- [heading=symbols and abbreviated terms]
161
- == Σύμβολα και Συντομογραφίες
162
-
163
- == Clause 4
164
-
165
- === Introduction
166
-
167
- === Clause 4.2
168
-
169
- [appendix]
170
- == Annex
171
-
172
- === Annex A.1
173
-
174
- [%appendix]
175
- === Appendx 1
176
-
177
- [heading=bibliography]
178
- == Βιβλιογραφία
179
-
180
- === Bibliography Subsection
181
- INPUT
182
- #{BLANK_HDR}
183
- <preface>
184
- <foreword obligation="informative">
185
- <title>Foreword</title>
186
- <p id="_">Text</p>
187
- </foreword>
188
- <introduction id="_" obligation="informative"><title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
189
- <title>Introduction Subsection</title>
190
- </clause>
191
- </introduction>
192
- </preface>
193
- <sections>
194
- <clause id="_" obligation="normative">
195
- <title>Scope</title>
196
- <p id="_">Text</p>
197
- </clause>
198
-
199
- <terms id="_" obligation="normative">
200
- <title>Terms and definitions</title>
201
- <p id="_">For the purposes of this document, the following terms and definitions apply.</p>
202
- <p id="_">ISO and IEC maintain terminological databases for use in
203
- standardization at the following addresses:</p>
204
-
205
- <ul id="_">
206
- <li> <p id="_">ISO Online browsing platform: available at
207
- <link target="http://www.iso.org/obp"/></p> </li>
208
- <li> <p id="_">IEC Electropedia: available at
209
- <link target="http://www.electropedia.org"/>
210
- </p> </li> </ul>
211
- <term id="_">
212
- <preferred>Term1</preferred>
213
- </term>
214
- </terms>
215
- <clause id='_' obligation='normative'>
216
- <title>Terms and definitions</title>
217
- <terms id='_' obligation='normative'>
218
- <title>Normal Terms</title>
219
- <term id='_'>
220
- <preferred>Term2</preferred>
221
- </term>
222
- </terms>
223
- <definitions id='_'>
224
- <title>Σύμβολα και Συντομογραφίες</title>
225
- </definitions>
226
- </clause>
227
- <definitions id='_'>
228
- <title>Σύμβολα και Συντομογραφίες</title>
229
- </definitions>
230
- <clause id='_' inline-header='false' obligation='normative'>
231
- <title>Clause 4</title>
232
- <clause id='_' inline-header='false' obligation='normative'>
233
- <title>Introduction</title>
234
- </clause>
235
- <clause id='_' inline-header='false' obligation='normative'>
236
- <title>Clause 4.2</title>
237
- </clause>
238
- </clause>
239
- </sections>
240
- <annex id='_' inline-header='false' obligation='normative'>
241
- <title>Annex</title>
242
- <clause id='_' inline-header='false' obligation='normative'>
243
- <title>Annex A.1</title>
244
- </clause>
245
- <appendix id='_' inline-header='false' obligation='normative'>
246
- <title>Appendx 1</title>
247
- </appendix>
248
- </annex>
249
- <bibliography>
250
- <references id='_' obligation='informative'>
251
- <title>Normative References</title>
252
- <p id="_">There are no normative references in this document.</p>
253
- </references>
254
- <clause id='_' obligation='informative'>
255
- <title>Bibliography</title>
256
- <references id='_' obligation='informative'>
257
- <title>Bibliography Subsection</title>
258
- </references>
259
- </clause>
260
- </bibliography>
261
- </iso-standard>
262
-
263
- OUTPUT
264
- end
265
-
266
150
  it "processes section obligations" do
267
151
  expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
268
152
  #{ASCIIDOC_BLANK_HDR}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.17
4
+ version: 1.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-17 00:00:00.000000000 Z
11
+ date: 2020-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-jing