metanorma-bsi 0.0.1 → 0.1.0
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.
Potentially problematic release.
This version of metanorma-bsi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +43 -0
- data/.github/workflows/release_github_packages.yml +49 -0
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/README.adoc +95 -11
- data/lib/asciidoctor/bsi/biblio.rng +1 -0
- data/lib/asciidoctor/bsi/bsi.rng +32 -4
- data/lib/asciidoctor/bsi/bsi_intro_en.xml +87 -61
- data/lib/asciidoctor/bsi/cleanup.rb +15 -8
- data/lib/asciidoctor/bsi/cleanup_ref.rb +10 -21
- data/lib/asciidoctor/bsi/converter.rb +7 -5
- data/lib/asciidoctor/bsi/front.rb +26 -5
- data/lib/asciidoctor/bsi/isodoc.rng +191 -3
- data/lib/asciidoctor/bsi/isostandard.rng +12 -0
- data/lib/asciidoctor/bsi/validate.rb +5 -6
- data/lib/asciidoctor/bsi/validate_list.rb +2 -2
- data/lib/isodoc/bsi/base_convert.rb +2 -1
- data/lib/isodoc/bsi/bsi.international-standard.xsl +3380 -2349
- data/lib/isodoc/bsi/html/htmlstyle.css +43 -22
- data/lib/isodoc/bsi/html/htmlstyle.scss +46 -22
- data/lib/isodoc/bsi/html_convert.rb +2 -2
- data/lib/isodoc/bsi/i18n-en.yaml +4 -4
- data/lib/isodoc/bsi/metadata.rb +2 -2
- data/lib/isodoc/bsi/presentation_xml_convert.rb +26 -5
- data/lib/isodoc/bsi/xref.rb +11 -4
- data/lib/metanorma/bsi/version.rb +1 -1
- data/metanorma-bsi.gemspec +2 -2
- data/spec/asciidoctor/base_spec.rb +564 -494
- data/spec/asciidoctor/blocks_spec.rb +192 -195
- data/spec/asciidoctor/cleanup_spec.rb +361 -361
- data/spec/asciidoctor/refs_spec.rb +8 -78
- data/spec/asciidoctor/section_spec.rb +227 -227
- data/spec/asciidoctor/validate_spec.rb +26 -1
- data/spec/isodoc/blocks_spec.rb +56 -21
- data/spec/isodoc/i18n_spec.rb +156 -234
- data/spec/isodoc/inline_spec.rb +7 -7
- data/spec/isodoc/iso_spec.rb +4 -4
- data/spec/isodoc/metadata_spec.rb +0 -1
- data/spec/isodoc/ref_spec.rb +7 -7
- data/spec/isodoc/section_spec.rb +400 -343
- data/spec/isodoc/terms_spec.rb +224 -225
- data/spec/isodoc/xref_spec.rb +1347 -1360
- data/spec/metanorma/processor_spec.rb +37 -40
- data/spec/spec_helper.rb +6 -4
- data/spec/vcr_cassettes/iso-639.yml +19 -19
- data/spec/vcr_cassettes/isobib_get_639_1967.yml +17 -17
- data/spec/vcr_cassettes/multistandard.yml +15 -193
- metadata +7 -5
@@ -96,15 +96,15 @@ RSpec.describe Asciidoctor::BSI do
|
|
96
96
|
#{@blank_hdr}
|
97
97
|
<preface>
|
98
98
|
<foreword id='_' obligation='informative'>
|
99
|
-
<title>
|
99
|
+
<title>Foreword</title>
|
100
100
|
<p id='_'>
|
101
101
|
<eref type='inline' bibitemid='ref3' citeas='[1]'/>
|
102
102
|
<eref type='inline' bibitemid='ref7' citeas='IETF RFC 7749'/>
|
103
103
|
<eref type='inline' bibitemid='ref6' citeas='[N1]'/>
|
104
104
|
<eref type='inline' bibitemid='ref1' citeas='[2]'/>
|
105
105
|
<eref type='inline' bibitemid='ref4' citeas='[N2]'/>
|
106
|
-
<eref type='inline' bibitemid='ref5' citeas='ISO
|
107
|
-
<eref type='inline' bibitemid='ref2' citeas='ISO
|
106
|
+
<eref type='inline' bibitemid='ref5' citeas='ISO 639:1967'/>
|
107
|
+
<eref type='inline' bibitemid='ref2' citeas='ISO 15124'/>
|
108
108
|
</p>
|
109
109
|
</foreword>
|
110
110
|
</preface>
|
@@ -171,41 +171,19 @@ RSpec.describe Asciidoctor::BSI do
|
|
171
171
|
<place>Fremont, CA</place>
|
172
172
|
</bibitem>
|
173
173
|
<bibitem id='ref5' type='standard'>
|
174
|
-
<
|
175
|
-
<
|
176
|
-
<title type='main' format='text/plain' language='en' script='Latn'>Symbols for languages, countries and authorities</title>
|
177
|
-
<uri type='src'>https://www.iso.org/standard/4765.html</uri>
|
178
|
-
<uri type='rss'>https://www.iso.org/contents/data/standard/00/47/4765.detail.rss</uri>
|
179
|
-
<docidentifier type='ISO'>ISO/R 639:1967</docidentifier>
|
180
|
-
<docidentifier type='URN'>urn:iso:std:iso-r:r:639:stage-95.99:ed-1:en</docidentifier>
|
174
|
+
<title format='text/plain'>REF5</title>
|
175
|
+
<docidentifier type='ISO'>ISO 639:1967</docidentifier>
|
181
176
|
<docnumber>639</docnumber>
|
182
177
|
<date type='published'>
|
183
|
-
<on>1967
|
178
|
+
<on>1967</on>
|
184
179
|
</date>
|
185
180
|
<contributor>
|
186
181
|
<role type='publisher'/>
|
187
182
|
<organization>
|
188
183
|
<name>International Organization for Standardization</name>
|
189
184
|
<abbreviation>ISO</abbreviation>
|
190
|
-
<uri>www.iso.org</uri>
|
191
185
|
</organization>
|
192
186
|
</contributor>
|
193
|
-
<edition>1</edition>
|
194
|
-
<language>en</language>
|
195
|
-
<script>Latn</script>
|
196
|
-
<status>
|
197
|
-
<stage>95</stage>
|
198
|
-
<substage>99</substage>
|
199
|
-
</status>
|
200
|
-
<copyright>
|
201
|
-
<from>1967</from>
|
202
|
-
<owner>
|
203
|
-
<organization>
|
204
|
-
<name>ISO/R</name>
|
205
|
-
</organization>
|
206
|
-
</owner>
|
207
|
-
</copyright>
|
208
|
-
<place>Geneva</place>
|
209
187
|
</bibitem>
|
210
188
|
</references>
|
211
189
|
<references normative='true' unnumbered='true'>
|
@@ -234,64 +212,16 @@ RSpec.describe Asciidoctor::BSI do
|
|
234
212
|
any amendments) applies.
|
235
213
|
</p>
|
236
214
|
<bibitem id='ref2' type='standard'>
|
237
|
-
|
238
|
-
|
239
|
-
<title type='title-main' format='text/plain' language='en' script='Latn'>International Standardized Profile FOD126</title>
|
240
|
-
<title type='title-part' format='text/plain' language='en' script='Latn'>
|
241
|
-
Open Document Format: Image
|
242
|
-
Applications — Enhanced document
|
243
|
-
structure — Character, raster graphics, and
|
244
|
-
geometric graphics content architecture — Part 1:
|
245
|
-
Document Application Profile (DAP)
|
246
|
-
</title>
|
247
|
-
<title type='main' format='text/plain' language='en' script='Latn'>
|
248
|
-
Information technology — International
|
249
|
-
Standardized Profile FOD126 — Open Document
|
250
|
-
Format: Image Applications — Enhanced document
|
251
|
-
structure — Character, raster graphics, and
|
252
|
-
geometric graphics content architecture — Part 1:
|
253
|
-
Document Application Profile (DAP)
|
254
|
-
</title>
|
255
|
-
<uri type='src'>https://www.iso.org/standard/26440.html</uri>
|
256
|
-
<uri type='rss'>https://www.iso.org/contents/data/standard/02/64/26440.detail.rss</uri>
|
257
|
-
<docidentifier type='ISO'>ISO/IEC ISP 15124-1:1998</docidentifier>
|
258
|
-
<docidentifier type='URN'>urn:iso:std:iso-iec:isp:15124:-1:stage-95.99:ed-1:en</docidentifier>
|
215
|
+
<title format='text/plain'>REF2</title>
|
216
|
+
<docidentifier type='ISO'>ISO 15124</docidentifier>
|
259
217
|
<docnumber>15124</docnumber>
|
260
|
-
<date type='published'>
|
261
|
-
<on>1998-07</on>
|
262
|
-
</date>
|
263
218
|
<contributor>
|
264
219
|
<role type='publisher'/>
|
265
220
|
<organization>
|
266
221
|
<name>International Organization for Standardization</name>
|
267
222
|
<abbreviation>ISO</abbreviation>
|
268
|
-
<uri>www.iso.org</uri>
|
269
223
|
</organization>
|
270
224
|
</contributor>
|
271
|
-
<contributor>
|
272
|
-
<role type='publisher'/>
|
273
|
-
<organization>
|
274
|
-
<name>International Electrotechnical Commission</name>
|
275
|
-
<abbreviation>IEC</abbreviation>
|
276
|
-
<uri>www.iec.ch</uri>
|
277
|
-
</organization>
|
278
|
-
</contributor>
|
279
|
-
<edition>1</edition>
|
280
|
-
<language>en</language>
|
281
|
-
<script>Latn</script>
|
282
|
-
<status>
|
283
|
-
<stage>95</stage>
|
284
|
-
<substage>99</substage>
|
285
|
-
</status>
|
286
|
-
<copyright>
|
287
|
-
<from>1998</from>
|
288
|
-
<owner>
|
289
|
-
<organization>
|
290
|
-
<name>ISO/IEC</name>
|
291
|
-
</organization>
|
292
|
-
</owner>
|
293
|
-
</copyright>
|
294
|
-
<place>Geneva</place>
|
295
225
|
</bibitem>
|
296
226
|
</references>
|
297
227
|
<references normative='false' unnumbered='true'>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe Asciidoctor::BSI do
|
4
|
-
|
5
|
-
|
6
|
-
end
|
4
|
+
before(:all) do
|
5
|
+
@blank_hdr = blank_hdr_gen
|
6
|
+
end
|
7
7
|
|
8
8
|
it "processes sections" do
|
9
9
|
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -56,88 +56,66 @@ end
|
|
56
56
|
|
57
57
|
=== Bibliography Subsection
|
58
58
|
INPUT
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
<title>
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
</sections><annex id="_" inline-header="false" obligation="normative">
|
120
|
-
<title>Annex</title>
|
121
|
-
<clause id="_" inline-header="false" obligation="normative">
|
122
|
-
<title>Annex A.1</title>
|
123
|
-
</clause>
|
124
|
-
<appendix id="_" inline-header="false" obligation="normative">
|
125
|
-
<title>Appendix 1</title>
|
126
|
-
</appendix></annex><bibliography><references id="_" obligation="informative" normative="true">
|
127
|
-
<title>Normative references</title><p id="_">There are no normative references in this document.</p>
|
128
|
-
</references><clause id="_" obligation="informative">
|
129
|
-
<title>Bibliography</title>
|
130
|
-
<references id="_" obligation="informative" normative="false">
|
131
|
-
<title>Bibliography Subsection</title>
|
132
|
-
<p id='_'>
|
133
|
-
For dated references, only the edition cited applies. For undated
|
134
|
-
references, the latest edition of the referenced document (including
|
135
|
-
any amendments) applies.
|
136
|
-
</p>
|
137
|
-
</references>
|
138
|
-
</clause>
|
139
|
-
</bibliography>
|
140
|
-
</bsi-standard>
|
59
|
+
#{@blank_hdr}
|
60
|
+
<preface><foreword id="_" obligation="informative">
|
61
|
+
<title>Foreword</title>
|
62
|
+
<p id="_">Text</p>
|
63
|
+
</foreword><introduction id="_" obligation="informative">
|
64
|
+
<title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
|
65
|
+
<title>Introduction Subsection</title>
|
66
|
+
</clause>
|
67
|
+
</introduction></preface><sections>
|
68
|
+
<clause id="_" obligation="normative" type="scope" inline-header='false'>
|
69
|
+
<title>Scope</title>
|
70
|
+
<p id="_">Text</p>
|
71
|
+
</clause>
|
72
|
+
<terms id="_" obligation="normative">
|
73
|
+
<title>Terms and definitions</title>
|
74
|
+
<p id="_">For the purposes of this British Standard, the following terms and definitions apply.</p>
|
75
|
+
#{TERMS_BOILERPLATE}
|
76
|
+
<term id="term-term1">
|
77
|
+
<preferred>Term1</preferred>
|
78
|
+
</term>
|
79
|
+
</terms>
|
80
|
+
<clause id="_" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="_" obligation="normative">
|
81
|
+
<title>Normal Terms</title>
|
82
|
+
<term id="term-term2">
|
83
|
+
<preferred>Term2</preferred>
|
84
|
+
</term>
|
85
|
+
</terms>
|
86
|
+
<definitions id="_" obligation="normative"><title>Symbols and abbreviated terms</title></definitions></clause>
|
87
|
+
<definitions id="_" obligation="normative"><title>Symbols and abbreviated terms</title></definitions>
|
88
|
+
<clause id="_" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="_" inline-header="false" obligation="normative">
|
89
|
+
<title>Introduction</title>
|
90
|
+
</clause>
|
91
|
+
<clause id="_" inline-header="false" obligation="normative">
|
92
|
+
<title>Clause 4.2</title>
|
93
|
+
</clause></clause>
|
94
|
+
<clause id="_" inline-header="false" obligation="normative">
|
95
|
+
<title>Terms and Definitions</title>
|
96
|
+
</clause>
|
97
|
+
</sections><annex id="_" inline-header="false" obligation="normative">
|
98
|
+
<title>Annex</title>
|
99
|
+
<clause id="_" inline-header="false" obligation="normative">
|
100
|
+
<title>Annex A.1</title>
|
101
|
+
</clause>
|
102
|
+
<appendix id="_" inline-header="false" obligation="normative">
|
103
|
+
<title>Appendix 1</title>
|
104
|
+
</appendix></annex><bibliography><references id="_" obligation="informative" normative="true">
|
105
|
+
<title>Normative references</title><p id="_">There are no normative references in this document.</p>
|
106
|
+
</references><clause id="_" obligation="informative">
|
107
|
+
<title>Bibliography</title>
|
108
|
+
<references id="_" obligation="informative" normative="false">
|
109
|
+
<title>Bibliography Subsection</title>
|
110
|
+
<p id='_'>
|
111
|
+
For dated references, only the edition cited applies. For undated
|
112
|
+
references, the latest edition of the referenced document (including
|
113
|
+
any amendments) applies.
|
114
|
+
</p>
|
115
|
+
</references>
|
116
|
+
</clause>
|
117
|
+
</bibliography>
|
118
|
+
</bsi-standard>
|
141
119
|
OUTPUT
|
142
120
|
end
|
143
121
|
|
@@ -198,107 +176,88 @@ end
|
|
198
176
|
|
199
177
|
=== Bibliography Subsection
|
200
178
|
INPUT
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
<title>
|
209
|
-
|
210
|
-
</clause>
|
211
|
-
</introduction>
|
212
|
-
</preface>
|
213
|
-
<sections>
|
214
|
-
<clause id="_" obligation="normative" type="scope" inline-header='false'>
|
215
|
-
<title>Scope</title>
|
216
|
-
<p id="_">Text</p>
|
217
|
-
</clause>
|
218
|
-
<terms id="_" obligation="normative">
|
219
|
-
<title>Terms and definitions</title>
|
220
|
-
<p id="_">For the purposes of this British Standard, the following terms and definitions apply.</p>
|
221
|
-
#{TERMS_BOILERPLATE}
|
222
|
-
<term id="term-term1">
|
223
|
-
<preferred>Term1</preferred>
|
224
|
-
</term>
|
225
|
-
</terms>
|
226
|
-
<clause id='_' obligation='normative'>
|
227
|
-
<title>Terms, definitions, symbols and abbreviated terms</title>
|
228
|
-
<terms id='_' obligation='normative'>
|
229
|
-
<title>Normal Terms</title>
|
230
|
-
<p id='_'>For the purposes of this British Standard, the following terms and definitions apply.</p>
|
231
|
-
<p id='_'>
|
232
|
-
ISO and IEC maintain terminological databases for use in
|
233
|
-
standardization at the following addresses:
|
234
|
-
</p>
|
235
|
-
<ul id='_'>
|
236
|
-
<li>
|
237
|
-
<p id='_'>
|
238
|
-
IEC Electropedia: available at
|
239
|
-
<link target='http://www.electropedia.org'/>
|
240
|
-
</p>
|
241
|
-
</li>
|
242
|
-
<li>
|
243
|
-
<p id='_'>
|
244
|
-
ISO Online browsing platform: available at
|
245
|
-
<link target='http://www.iso.org/obp'/>
|
246
|
-
</p>
|
247
|
-
</li>
|
248
|
-
</ul>
|
249
|
-
<term id='term-term2'>
|
250
|
-
<preferred>Term2</preferred>
|
251
|
-
</term>
|
252
|
-
</terms>
|
253
|
-
<definitions id='_' obligation="normative">
|
254
|
-
<title>Symbols and abbreviated terms</title>
|
255
|
-
</definitions>
|
256
|
-
</clause>
|
257
|
-
<definitions id='_' obligation="normative">
|
258
|
-
<title>Symbols and abbreviated terms</title>
|
259
|
-
</definitions>
|
260
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
261
|
-
<title>Clause 4</title>
|
262
|
-
<clause id='_' inline-header='false' obligation='normative'>
|
263
|
-
<title>Introduction</title>
|
179
|
+
#{@blank_hdr}
|
180
|
+
<preface>
|
181
|
+
<foreword id="_" obligation="informative">
|
182
|
+
<title>Foreword</title>
|
183
|
+
<p id="_">Text</p>
|
184
|
+
</foreword>
|
185
|
+
<introduction id="_" obligation="informative">
|
186
|
+
<title>Introduction</title><clause id="_" inline-header="false" obligation="informative">
|
187
|
+
<title>Introduction Subsection</title>
|
264
188
|
</clause>
|
265
|
-
|
266
|
-
|
189
|
+
</introduction>
|
190
|
+
</preface>
|
191
|
+
<sections>
|
192
|
+
<clause id="_" obligation="normative" type="scope" inline-header='false'>
|
193
|
+
<title>Scope</title>
|
194
|
+
<p id="_">Text</p>
|
267
195
|
</clause>
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
<
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
</
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
196
|
+
<terms id="_" obligation="normative">
|
197
|
+
<title>Terms and definitions</title>
|
198
|
+
<p id="_">For the purposes of this British Standard, the following terms and definitions apply.</p>
|
199
|
+
#{TERMS_BOILERPLATE}
|
200
|
+
<term id="term-term1">
|
201
|
+
<preferred>Term1</preferred>
|
202
|
+
</term>
|
203
|
+
</terms>
|
204
|
+
<clause id='_' obligation='normative'>
|
205
|
+
<title>Terms, definitions, symbols and abbreviated terms</title>
|
206
|
+
<terms id='_' obligation='normative'>
|
207
|
+
<title>Normal Terms</title>
|
208
|
+
<term id='term-term2'>
|
209
|
+
<preferred>Term2</preferred>
|
210
|
+
</term>
|
211
|
+
</terms>
|
212
|
+
<definitions id='_' obligation="normative">
|
213
|
+
<title>Symbols and abbreviated terms</title>
|
214
|
+
</definitions>
|
215
|
+
</clause>
|
216
|
+
<definitions id='_' obligation="normative">
|
217
|
+
<title>Symbols and abbreviated terms</title>
|
218
|
+
</definitions>
|
219
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
220
|
+
<title>Clause 4</title>
|
221
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
222
|
+
<title>Introduction</title>
|
223
|
+
</clause>
|
224
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
225
|
+
<title>Clause 4.2</title>
|
226
|
+
</clause>
|
227
|
+
</clause>
|
228
|
+
</sections>
|
229
|
+
<annex id='_' inline-header='false' obligation='normative'>
|
230
|
+
<title>Annex</title>
|
231
|
+
<clause id='_' inline-header='false' obligation='normative'>
|
232
|
+
<title>Annex A.1</title>
|
233
|
+
</clause>
|
234
|
+
<appendix id='_' inline-header='false' obligation='normative'>
|
235
|
+
<title>Appendx 1</title>
|
236
|
+
</appendix>
|
237
|
+
</annex>
|
238
|
+
<bibliography>
|
239
|
+
<references id='_' obligation='informative' normative="true">
|
240
|
+
<title>Normative references</title>
|
241
|
+
<p id="_">There are no normative references in this document.</p>
|
242
|
+
</references>
|
243
|
+
<clause id='_' obligation='informative'>
|
244
|
+
<title>Bibliography</title>
|
245
|
+
<references id='_' obligation='informative' normative="false">
|
246
|
+
<title>Bibliography Subsection</title>
|
247
|
+
<p id='_'>
|
248
|
+
For dated references, only the edition cited applies. For undated
|
249
|
+
references, the latest edition of the referenced document (including
|
250
|
+
any amendments) applies.
|
251
|
+
</p>
|
252
|
+
</references>
|
253
|
+
</clause>
|
254
|
+
</bibliography>
|
255
|
+
</bsi-standard>
|
297
256
|
OUTPUT
|
298
257
|
end
|
299
258
|
|
300
259
|
it "processes section obligations" do
|
301
|
-
|
260
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
302
261
|
#{ASCIIDOC_BLANK_HDR}
|
303
262
|
[obligation=informative]
|
304
263
|
== Clause 1
|
@@ -310,26 +269,26 @@ end
|
|
310
269
|
|
311
270
|
[appendix,obligation=informative]
|
312
271
|
== Annex
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
272
|
+
INPUT
|
273
|
+
#{@blank_hdr}
|
274
|
+
<sections><clause id="_" inline-header="false" obligation="informative">
|
275
|
+
<title>Clause 1</title>
|
276
|
+
<clause id="_" inline-header="false" obligation="informative">
|
277
|
+
<title>Clause 1a</title>
|
278
|
+
</clause>
|
279
|
+
</clause>
|
280
|
+
<clause id="_" inline-header="false" obligation="normative">
|
281
|
+
<title>Clause 2</title>
|
282
|
+
</clause>
|
283
|
+
</sections><annex id="_" inline-header="false" obligation="informative">
|
284
|
+
<title>Annex</title>
|
285
|
+
</annex>
|
286
|
+
</bsi-standard>
|
287
|
+
OUTPUT
|
329
288
|
end
|
330
289
|
|
331
|
-
|
332
|
-
|
290
|
+
it "processes inline headers" do
|
291
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
333
292
|
#{ASCIIDOC_BLANK_HDR}
|
334
293
|
== Clause 1
|
335
294
|
|
@@ -341,42 +300,83 @@ end
|
|
341
300
|
|
342
301
|
[%inline-header]
|
343
302
|
=== Clause Aa
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
303
|
+
INPUT
|
304
|
+
#{@blank_hdr}
|
305
|
+
<sections><clause id="_" inline-header="false" obligation="normative">
|
306
|
+
<title>Clause 1</title>
|
307
|
+
<clause id="_" inline-header="true" obligation="normative">
|
308
|
+
<title>Clause 1a</title>
|
309
|
+
</clause>
|
310
|
+
</clause>
|
311
|
+
</sections><annex id="_" inline-header="false" obligation="normative">
|
312
|
+
<title>Annex A</title>
|
313
|
+
<clause id="_" inline-header="true" obligation="normative">
|
314
|
+
<title>Clause Aa</title>
|
315
|
+
</clause>
|
316
|
+
</annex>
|
317
|
+
</bsi-standard>
|
318
|
+
OUTPUT
|
319
|
+
end
|
361
320
|
|
362
321
|
it "processes blank headers" do
|
363
|
-
|
322
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
364
323
|
#{ASCIIDOC_BLANK_HDR}
|
365
324
|
== Clause 1
|
366
325
|
|
367
326
|
=== {blank}
|
368
327
|
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
328
|
+
INPUT
|
329
|
+
#{@blank_hdr}
|
330
|
+
<sections>
|
331
|
+
<clause id="_" inline-header="false" obligation="normative">
|
332
|
+
<title>Clause 1</title>
|
333
|
+
<clause id="_" inline-header="false" obligation="normative">
|
334
|
+
</clause>
|
335
|
+
</clause>
|
336
|
+
</sections>
|
337
|
+
</bsi-standard>
|
338
|
+
OUTPUT
|
380
339
|
end
|
381
340
|
|
341
|
+
it "handles corrigenda section" do
|
342
|
+
expect(xmlpp(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :bsi, header_footer: true)))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
343
|
+
#{ASCIIDOC_BLANK_HDR}
|
344
|
+
|
345
|
+
[.preface,type=corrigenda]
|
346
|
+
== Amendments/corrigenda issued since publication
|
347
|
+
[[tab_ace_nat]]
|
348
|
+
[cols="1,1",options="header,unnumbered"]
|
349
|
+
|===
|
350
|
+
|Date |Text affected
|
351
|
+
|===
|
352
|
+
|
353
|
+
== Clause 1
|
354
|
+
|
355
|
+
INPUT
|
356
|
+
#{@blank_hdr}
|
357
|
+
<preface>
|
358
|
+
<clause id='_' type='corrigenda' inline-header='false' obligation='informative'>
|
359
|
+
<title>Amendments/corrigenda issued since publication</title>
|
360
|
+
<table id='tab_ace_nat' unnumbered='true'>
|
361
|
+
<colgroup>
|
362
|
+
<col width='50%'/>
|
363
|
+
<col width='50%'/>
|
364
|
+
</colgroup>
|
365
|
+
<thead>
|
366
|
+
<tr>
|
367
|
+
<th valign='top' align='left'>Date</th>
|
368
|
+
<th valign='top' align='left'>Text affected</th>
|
369
|
+
</tr>
|
370
|
+
</thead>
|
371
|
+
</table>
|
372
|
+
</clause>
|
373
|
+
</preface>
|
374
|
+
<sections>
|
375
|
+
<clause id="_" inline-header="false" obligation="normative">
|
376
|
+
<title>Clause 1</title>
|
377
|
+
</clause>
|
378
|
+
</sections>
|
379
|
+
</bsi-standard>
|
380
|
+
OUTPUT
|
381
|
+
end
|
382
382
|
end
|