metanorma-iso 1.7.4 → 1.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +3 -13
- data/.hound.yml +3 -1
- data/.rubocop.yml +3 -7
- data/lib/asciidoctor/iso/base.rb +14 -11
- data/lib/asciidoctor/iso/biblio.rng +1 -0
- data/lib/asciidoctor/iso/cleanup.rb +40 -24
- data/lib/asciidoctor/iso/front.rb +28 -16
- data/lib/asciidoctor/iso/front_id.rb +66 -50
- data/lib/asciidoctor/iso/isodoc.rng +321 -4
- data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
- data/lib/asciidoctor/iso/isostandard.rng +12 -0
- data/lib/asciidoctor/iso/section.rb +2 -1
- data/lib/asciidoctor/iso/validate.rb +22 -110
- data/lib/asciidoctor/iso/validate_image.rb +97 -0
- data/lib/asciidoctor/iso/validate_requirements.rb +26 -20
- data/lib/asciidoctor/iso/validate_section.rb +55 -29
- data/lib/asciidoctor/iso/validate_style.rb +36 -24
- data/lib/asciidoctor/iso/validate_title.rb +2 -4
- data/lib/isodoc/iso/base_convert.rb +8 -2
- data/lib/isodoc/iso/html/style-human.css +7 -0
- data/lib/isodoc/iso/html/style-iso.css +7 -0
- data/lib/isodoc/iso/html_convert.rb +0 -1
- data/lib/isodoc/iso/iso.amendment.xsl +680 -198
- data/lib/isodoc/iso/iso.international-standard.xsl +680 -198
- data/lib/isodoc/iso/metadata.rb +1 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +44 -33
- data/lib/isodoc/iso/sts_convert.rb +10 -13
- data/lib/isodoc/iso/word_convert.rb +0 -1
- data/lib/isodoc/iso/xref.rb +52 -34
- data/lib/metanorma/iso/processor.rb +1 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +7 -7
- data/spec/asciidoctor/base_spec.rb +426 -305
- data/spec/asciidoctor/blocks_spec.rb +96 -34
- data/spec/asciidoctor/cleanup_spec.rb +383 -25
- data/spec/asciidoctor/section_spec.rb +0 -14
- data/spec/asciidoctor/validate_spec.rb +218 -83
- data/spec/isodoc/postproc_spec.rb +481 -438
- data/spec/spec_helper.rb +16 -15
- metadata +46 -46
- data/lib/isodoc/iso/html/scripts.html +0 -178
@@ -6,6 +6,11 @@ WORD_HTML_CSS = {
|
|
6
6
|
htmlstylesheet: "spec/assets/html.css",
|
7
7
|
}.freeze
|
8
8
|
|
9
|
+
WORD_HTML_CSS_SUBDIR = {
|
10
|
+
wordstylesheet: "word.css",
|
11
|
+
htmlstylesheet: "html.css",
|
12
|
+
}.freeze
|
13
|
+
|
9
14
|
WORD_HTML_CSS_HEADER_HTML = {
|
10
15
|
wordstylesheet: "spec/assets/word.css",
|
11
16
|
htmlstylesheet: "spec/assets/html.css",
|
@@ -20,80 +25,86 @@ WORD_HTML_CSS_WORDINTRO = {
|
|
20
25
|
|
21
26
|
RSpec.describe IsoDoc do
|
22
27
|
it "generates file based on string input" do
|
23
|
-
IsoDoc::Iso::HtmlConvert
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<title
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
28
|
+
IsoDoc::Iso::HtmlConvert
|
29
|
+
.new(WORD_HTML_CSS.merge(filename: "test"))
|
30
|
+
.convert("test", <<~"INPUT", false)
|
31
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
32
|
+
<bibdata>
|
33
|
+
<title>
|
34
|
+
<title format="text/plain" language="en" type="title-intro">Cereals and pulses</title>
|
35
|
+
<title format="text/plain" language="en" type="title-main">Specifications and test methods</title>
|
36
|
+
<title format="text/plain" language="en" type="title-part">Rice</title>
|
37
|
+
</title>
|
38
|
+
</bibdata>
|
39
|
+
<preface>
|
40
|
+
<foreword>
|
41
|
+
<note>
|
42
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
43
|
+
</note>
|
44
|
+
</foreword>
|
45
|
+
</preface>
|
46
|
+
</iso-standard>
|
40
47
|
INPUT
|
41
48
|
expect(File.exist?("test.html")).to be true
|
42
49
|
html = File.read("test.html", encoding: "UTF-8")
|
43
|
-
expect(html).to
|
44
|
-
|
45
|
-
)
|
50
|
+
expect(html).to include "<title>Cereals and pulses — "\
|
51
|
+
"Specifications and test methods — Rice</title>"
|
46
52
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
47
53
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
48
54
|
end
|
49
55
|
|
50
56
|
it "generates HTML output docs with null configuration" do
|
51
|
-
IsoDoc::Iso::HtmlConvert
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
<title
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
57
|
+
IsoDoc::Iso::HtmlConvert
|
58
|
+
.new(WORD_HTML_CSS.dup)
|
59
|
+
.convert("test", <<~"INPUT", false)
|
60
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
61
|
+
<bibdata>
|
62
|
+
<title>
|
63
|
+
<title format="text/plain" language="en" type="title-intro">Cereals and pulses</title>
|
64
|
+
<title format="text/plain" language="en" type="title-main">Specifications and test methods</title>
|
65
|
+
<title format="text/plain" language="en" type="title-part">Rice</title>
|
66
|
+
</title>
|
67
|
+
</bibdata>
|
68
|
+
<preface>
|
69
|
+
<foreword>
|
70
|
+
<note>
|
71
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
72
|
+
</note>
|
73
|
+
</foreword>
|
74
|
+
</preface>
|
75
|
+
</iso-standard>
|
76
|
+
INPUT
|
69
77
|
expect(File.exist?("test.html")).to be true
|
70
78
|
html = File.read("test.html", encoding: "UTF-8")
|
71
|
-
expect(html).to
|
72
|
-
|
73
|
-
)
|
79
|
+
expect(html).to include "title>Cereals and pulses — "\
|
80
|
+
"Specifications and test methods — Rice</title>"
|
74
81
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
75
82
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
76
83
|
end
|
77
84
|
|
78
85
|
it "generates Word output docs with null configuration" do
|
79
|
-
IsoDoc::Iso::WordConvert
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
86
|
+
IsoDoc::Iso::WordConvert
|
87
|
+
.new(WORD_HTML_CSS.dup)
|
88
|
+
.convert("test", <<~"INPUT", false)
|
89
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
90
|
+
<preface>
|
91
|
+
<foreword>
|
92
|
+
<note>
|
93
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
94
|
+
</note>
|
95
|
+
</foreword>
|
96
|
+
</preface>
|
97
|
+
</iso-standard>
|
98
|
+
INPUT
|
90
99
|
expect(File.exist?("test.doc")).to be true
|
91
100
|
word = File.read("test.doc", encoding: "UTF-8")
|
92
101
|
expect(word).to match(/<style>/)
|
93
102
|
end
|
94
103
|
|
95
104
|
it "generates HTML output docs with null configuration from file" do
|
96
|
-
IsoDoc::Iso::HtmlConvert
|
105
|
+
IsoDoc::Iso::HtmlConvert
|
106
|
+
.new(WORD_HTML_CSS_SUBDIR.dup)
|
107
|
+
.convert("spec/assets/iso.xml", nil, false)
|
97
108
|
expect(File.exist?("spec/assets/iso.html")).to be true
|
98
109
|
html = File.read("spec/assets/iso.html", encoding: "UTF-8")
|
99
110
|
expect(html).to match(/<style>/)
|
@@ -102,7 +113,9 @@ RSpec.describe IsoDoc do
|
|
102
113
|
end
|
103
114
|
|
104
115
|
it "generates Word output docs with null configuration from file" do
|
105
|
-
IsoDoc::Iso::WordConvert
|
116
|
+
IsoDoc::Iso::WordConvert
|
117
|
+
.new(WORD_HTML_CSS_SUBDIR.dup)
|
118
|
+
.convert("spec/assets/iso.xml", nil, false)
|
106
119
|
expect(File.exist?("spec/assets/iso.doc")).to be true
|
107
120
|
word = File.read("spec/assets/iso.doc", encoding: "UTF-8")
|
108
121
|
expect(word).to match(/<w:WordDocument>/)
|
@@ -111,28 +124,32 @@ RSpec.describe IsoDoc do
|
|
111
124
|
|
112
125
|
it "generates Pdf output docs with null configuration from file" do
|
113
126
|
mock_pdf
|
114
|
-
IsoDoc::Iso::PdfConvert
|
127
|
+
IsoDoc::Iso::PdfConvert
|
128
|
+
.new(WORD_HTML_CSS.dup)
|
129
|
+
.convert("spec/assets/iso.xml", nil, false)
|
115
130
|
expect(File.exist?("spec/assets/iso.pdf")).to be true
|
116
131
|
end
|
117
132
|
|
118
133
|
it "converts annex subheadings to h2Annex class for Word" do
|
119
|
-
IsoDoc::Iso::WordConvert
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
<
|
124
|
-
<title>
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
134
|
+
IsoDoc::Iso::WordConvert
|
135
|
+
.new(WORD_HTML_CSS.dup)
|
136
|
+
.convert("test", <<~"INPUT", false)
|
137
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
138
|
+
<annex id="P" inline-header="false" obligation="normative">
|
139
|
+
<title>Annex</title>
|
140
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
141
|
+
<title>A.1
|
142
|
+
<tab/>
|
143
|
+
Annex A.1</title>
|
144
|
+
</clause>
|
145
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
146
|
+
<title>Appendix 1
|
147
|
+
<tab/>
|
148
|
+
An Appendix</title>
|
149
|
+
</appendix>
|
150
|
+
</annex>
|
151
|
+
</iso-standard>
|
152
|
+
INPUT
|
136
153
|
|
137
154
|
word = File.read("test.doc", encoding: "UTF-8")
|
138
155
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
@@ -165,33 +182,35 @@ RSpec.describe IsoDoc do
|
|
165
182
|
end
|
166
183
|
|
167
184
|
it "populates Word template with terms reference labels" do
|
168
|
-
IsoDoc::Iso::WordConvert
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
<
|
178
|
-
|
179
|
-
<
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
185
|
+
IsoDoc::Iso::WordConvert
|
186
|
+
.new(WORD_HTML_CSS.dup)
|
187
|
+
.convert("test", <<~"INPUT", false)
|
188
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
189
|
+
<sections>
|
190
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
191
|
+
<title>1
|
192
|
+
<tab/>
|
193
|
+
Terms and Definitions</title>
|
194
|
+
<term id="paddy1">
|
195
|
+
<name>1.1</name>
|
196
|
+
<preferred>paddy</preferred>
|
197
|
+
<definition>
|
198
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
199
|
+
</definition>
|
200
|
+
<termsource status="modified">
|
201
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
202
|
+
<locality type="clause">
|
203
|
+
<referenceFrom>3.1</referenceFrom>
|
204
|
+
</locality>ISO 7301:2011, 3.1</origin>
|
205
|
+
<modification>
|
206
|
+
<p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
207
|
+
</modification>
|
208
|
+
</termsource>
|
209
|
+
</term>
|
210
|
+
</terms>
|
211
|
+
</sections>
|
212
|
+
</iso-standard>
|
213
|
+
INPUT
|
195
214
|
|
196
215
|
word = File.read("test.doc", encoding: "UTF-8")
|
197
216
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
@@ -219,142 +238,144 @@ RSpec.describe IsoDoc do
|
|
219
238
|
end
|
220
239
|
|
221
240
|
it "populates Word header" do
|
222
|
-
IsoDoc::Iso::WordConvert
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
241
|
+
IsoDoc::Iso::WordConvert
|
242
|
+
.new(WORD_HTML_CSS_HEADER_HTML.dup)
|
243
|
+
.convert("test", <<~"INPUT", false)
|
244
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
245
|
+
<bibdata type="article">
|
246
|
+
<docidentifier>
|
247
|
+
<project-number part="1">1000</project-number>
|
248
|
+
</docidentifier>
|
249
|
+
</bibdata>
|
250
|
+
</iso-standard>
|
251
|
+
INPUT
|
231
252
|
word = File.read("test.doc", encoding: "UTF-8")
|
232
|
-
|
233
|
-
"Content-Location: file:///C:/Doc/test_files/header.html")
|
234
|
-
.sub(/------=_NextPart.*$/m, "")
|
235
|
-
expect(word).to include(%{Content-Location: file:///C:/Doc/test_files/header.html})
|
253
|
+
expect(word).to include('Content-Disposition: inline; filename="header.html"')
|
236
254
|
end
|
237
255
|
|
238
256
|
it "populates Word ToC" do
|
239
|
-
IsoDoc::Iso::WordConvert
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
<clause id="N" inline-header="false" obligation="normative">
|
247
|
-
<title>1.1
|
257
|
+
IsoDoc::Iso::WordConvert
|
258
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
259
|
+
.convert("test", <<~"INPUT", false)
|
260
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
261
|
+
<sections>
|
262
|
+
<clause id="A" inline-header="false" obligation="normative">
|
263
|
+
<title>1
|
248
264
|
<tab/>
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
<
|
261
|
-
<
|
262
|
-
<
|
263
|
-
|
265
|
+
Clause 4</title>
|
266
|
+
<clause id="N" inline-header="false" obligation="normative">
|
267
|
+
<title>1.1
|
268
|
+
<tab/>
|
269
|
+
Introduction
|
270
|
+
<bookmark id="Q"/>
|
271
|
+
to this
|
272
|
+
<fn reference="1">
|
273
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
274
|
+
</title>
|
275
|
+
</clause>
|
276
|
+
<clause id="O" inline-header="false" obligation="normative">
|
277
|
+
<title>1.2
|
278
|
+
<tab/>
|
279
|
+
Clause 4.2</title>
|
280
|
+
<p>A
|
281
|
+
<fn reference="1">
|
282
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
283
|
+
</p>
|
284
|
+
</clause>
|
264
285
|
</clause>
|
265
|
-
</
|
266
|
-
</
|
267
|
-
|
268
|
-
INPUT
|
286
|
+
</sections>
|
287
|
+
</iso-standard>
|
288
|
+
INPUT
|
269
289
|
|
270
290
|
word = File.read("test.doc", encoding: "UTF-8")
|
271
291
|
.sub(/^.*An empty word intro page\./m, "")
|
272
292
|
.sub(%r{</div>.*$}m, "</div>")
|
273
293
|
|
274
|
-
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
|
275
|
-
|
276
|
-
<
|
277
|
-
<
|
278
|
-
<span
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
<span
|
284
|
-
<
|
285
|
-
<
|
286
|
-
<span
|
287
|
-
|
288
|
-
<span
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
<span
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
<span
|
298
|
-
|
299
|
-
|
294
|
+
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
|
295
|
+
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
296
|
+
<div>
|
297
|
+
<p class="MsoToc1">
|
298
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
299
|
+
<span style="mso-element:field-begin"/>
|
300
|
+
<span style="mso-spacerun:yes"> </span>TOC
|
301
|
+
\o "1-3" \h \z \u
|
302
|
+
<span style="mso-element:field-separator"/></span>
|
303
|
+
<span class="MsoHyperlink">
|
304
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
305
|
+
<a href="#_Toc">1 Clause 4
|
306
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
307
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
308
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
309
|
+
<span style="mso-element:field-begin"/>
|
310
|
+
</span>
|
311
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
312
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
313
|
+
<span style="mso-element:field-separator"/>
|
314
|
+
</span>
|
315
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
316
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
317
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
318
|
+
<span style="mso-element:field-end"/>
|
319
|
+
</span>
|
320
|
+
</a>
|
321
|
+
</span>
|
300
322
|
</span>
|
301
|
-
</
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
<span
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
</
|
321
|
-
</
|
323
|
+
</p>
|
324
|
+
<p class="MsoToc2">
|
325
|
+
<span class="MsoHyperlink">
|
326
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
327
|
+
<a href="#_Toc">1.1 Introduction to this
|
328
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
329
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
330
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
331
|
+
<span style="mso-element:field-begin"/>
|
332
|
+
</span>
|
333
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
334
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
335
|
+
<span style="mso-element:field-separator"/>
|
336
|
+
</span>
|
337
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
338
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
339
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
340
|
+
<span style="mso-element:field-end"/>
|
341
|
+
</span>
|
342
|
+
</a>
|
343
|
+
</span>
|
322
344
|
</span>
|
323
|
-
</
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
<span
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
</
|
343
|
-
</
|
345
|
+
</p>
|
346
|
+
<p class="MsoToc2">
|
347
|
+
<span class="MsoHyperlink">
|
348
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
349
|
+
<a href="#_Toc">1.2 Clause 4.2
|
350
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
351
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
352
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
353
|
+
<span style="mso-element:field-begin"/>
|
354
|
+
</span>
|
355
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
356
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
357
|
+
<span style="mso-element:field-separator"/>
|
358
|
+
</span>
|
359
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
360
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
361
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
362
|
+
<span style="mso-element:field-end"/>
|
363
|
+
</span>
|
364
|
+
</a>
|
365
|
+
</span>
|
344
366
|
</span>
|
345
|
-
</
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
</
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
OUTPUT
|
367
|
+
</p>
|
368
|
+
<p class="MsoToc1">
|
369
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
370
|
+
<span style="mso-element:field-end"/>
|
371
|
+
</span>
|
372
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
373
|
+
<p class="MsoNormal"> </p>
|
374
|
+
</span>
|
375
|
+
</p>
|
376
|
+
<p class="MsoNormal"> </p>
|
377
|
+
</div>
|
378
|
+
OUTPUT
|
358
379
|
end
|
359
380
|
|
360
381
|
it "reorders footnote numbers" do
|
@@ -388,10 +409,13 @@ RSpec.describe IsoDoc do
|
|
388
409
|
</iso-standard>
|
389
410
|
INPUT
|
390
411
|
|
391
|
-
IsoDoc::Iso::HtmlConvert
|
412
|
+
IsoDoc::Iso::HtmlConvert
|
413
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
414
|
+
.convert("test", input, false)
|
392
415
|
|
393
416
|
html = File.read("test.html", encoding: "UTF-8")
|
394
|
-
.sub(/^.*<main class="main-section">/m,
|
417
|
+
.sub(/^.*<main class="main-section">/m,
|
418
|
+
'<main xmlns:epub="epub" class="main-section">')
|
395
419
|
.sub(%r{</main>.*$}m, "</main>")
|
396
420
|
|
397
421
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -434,11 +458,15 @@ RSpec.describe IsoDoc do
|
|
434
458
|
</main>
|
435
459
|
OUTPUT
|
436
460
|
|
437
|
-
IsoDoc::Iso::WordConvert
|
461
|
+
IsoDoc::Iso::WordConvert
|
462
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
463
|
+
.convert("test", input, false)
|
438
464
|
|
439
465
|
html = File.read("test.doc", encoding: "UTF-8")
|
440
|
-
.sub(/^.*<div class="WordSection3"/m,
|
441
|
-
|
466
|
+
.sub(/^.*<div class="WordSection3"/m,
|
467
|
+
'<body xmlns:epub="epub"><div class="WordSection3"')
|
468
|
+
.sub(%r{</body>.*$}m, "</body>")
|
469
|
+
.gsub(/mso-bookmark:_Ref\d+/, "mso-bookmark:_Ref")
|
442
470
|
|
443
471
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
444
472
|
<body xmlns:epub="epub">
|
@@ -527,75 +555,77 @@ RSpec.describe IsoDoc do
|
|
527
555
|
end
|
528
556
|
|
529
557
|
it "processes IsoXML terms for HTML" do
|
530
|
-
IsoDoc::Iso::HtmlConvert
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
<
|
536
|
-
<
|
537
|
-
<
|
538
|
-
|
539
|
-
|
540
|
-
<
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
<
|
545
|
-
<
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
<
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
<
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
558
|
+
IsoDoc::Iso::HtmlConvert
|
559
|
+
.new(WORD_HTML_CSS.dup)
|
560
|
+
.convert("test", <<~"INPUT", false)
|
561
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
562
|
+
<sections>
|
563
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
564
|
+
<title>Terms and Definitions</title>
|
565
|
+
<term id="paddy1">
|
566
|
+
<name>1.1</name>
|
567
|
+
<preferred>paddy</preferred>
|
568
|
+
<domain>rice</domain>
|
569
|
+
<definition>
|
570
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
571
|
+
</definition>
|
572
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
573
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
574
|
+
<ul>
|
575
|
+
<li>A</li>
|
576
|
+
</ul>
|
577
|
+
</termexample>
|
578
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
579
|
+
<ul>
|
580
|
+
<li>A</li>
|
581
|
+
</ul>
|
582
|
+
</termexample>
|
583
|
+
<termsource status="modified">
|
584
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
585
|
+
<locality type="clause">
|
586
|
+
<referenceFrom>3.1</referenceFrom>
|
587
|
+
</locality>
|
588
|
+
</origin>
|
589
|
+
<modification>
|
590
|
+
<p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
591
|
+
</modification>
|
592
|
+
</termsource>
|
593
|
+
</term>
|
594
|
+
<term id="paddy">
|
595
|
+
<name>1.2</name>
|
596
|
+
<preferred>paddy</preferred>
|
597
|
+
<admitted>paddy rice</admitted>
|
598
|
+
<admitted>rough rice</admitted>
|
599
|
+
<deprecates>cargo rice</deprecates>
|
600
|
+
<definition>
|
601
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
602
|
+
</definition>
|
603
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
604
|
+
<ul>
|
605
|
+
<li>A</li>
|
606
|
+
</ul>
|
607
|
+
</termexample>
|
608
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
609
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
610
|
+
</termnote>
|
611
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
612
|
+
<ul>
|
613
|
+
<li>A</li>
|
614
|
+
</ul>
|
615
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
616
|
+
</termnote>
|
617
|
+
<termsource status="identical">
|
618
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
619
|
+
<locality type="clause">
|
620
|
+
<referenceFrom>3.1</referenceFrom>
|
621
|
+
</locality>
|
622
|
+
</origin>
|
623
|
+
</termsource>
|
624
|
+
</term>
|
625
|
+
</terms>
|
626
|
+
</sections>
|
627
|
+
</iso-standard>
|
628
|
+
INPUT
|
599
629
|
expect(File.exist?("test.html")).to be true
|
600
630
|
html = File.read("test.html", encoding: "UTF-8")
|
601
631
|
expect(html).to match(%r{<h2 class="TermNum" id="paddy1">1\.1</h2>})
|
@@ -603,18 +633,20 @@ RSpec.describe IsoDoc do
|
|
603
633
|
end
|
604
634
|
|
605
635
|
it "inserts default paragraph between two tables for Word" do
|
606
|
-
IsoDoc::Iso::WordConvert
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
636
|
+
IsoDoc::Iso::WordConvert
|
637
|
+
.new(WORD_HTML_CSS.dup)
|
638
|
+
.convert("test", <<~"INPUT", false)
|
639
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
640
|
+
<annex id="P" inline-header="false" obligation="normative">
|
641
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851c">
|
642
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c968">'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
643
|
+
</example>
|
644
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851d">
|
645
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c969">'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
646
|
+
</example>
|
647
|
+
</annex>
|
648
|
+
</iso-standard>
|
649
|
+
INPUT
|
618
650
|
word = File.read("test.doc", encoding: "UTF-8")
|
619
651
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
620
652
|
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
@@ -642,24 +674,26 @@ RSpec.describe IsoDoc do
|
|
642
674
|
end
|
643
675
|
|
644
676
|
it "processes figure keys (Word)" do
|
645
|
-
IsoDoc::Iso::WordConvert
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
<
|
651
|
-
|
652
|
-
<
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
677
|
+
IsoDoc::Iso::WordConvert
|
678
|
+
.new(WORD_HTML_CSS.dup)
|
679
|
+
.convert("test", <<~"INPUT", false)
|
680
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
681
|
+
<annex id="P" inline-header="false" obligation="normative">
|
682
|
+
<figure id="samplecode">
|
683
|
+
<p>Hello</p>
|
684
|
+
<p>Key</p>
|
685
|
+
<dl>
|
686
|
+
<dt>
|
687
|
+
<p>A</p>
|
688
|
+
</dt>
|
689
|
+
<dd>
|
690
|
+
<p>B</p>
|
691
|
+
</dd>
|
692
|
+
</dl>
|
693
|
+
</figure>
|
694
|
+
</annex>
|
695
|
+
</iso-standard>
|
696
|
+
INPUT
|
663
697
|
word = File.read("test.doc", encoding: "UTF-8")
|
664
698
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
665
699
|
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
@@ -795,17 +829,22 @@ RSpec.describe IsoDoc do
|
|
795
829
|
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
796
830
|
.to be_equivalent_to xmlpp(presxml)
|
797
831
|
|
798
|
-
IsoDoc::Iso::HtmlConvert
|
832
|
+
IsoDoc::Iso::HtmlConvert
|
833
|
+
.new(WORD_HTML_CSS.dup)
|
834
|
+
.convert("test", presxml, false)
|
799
835
|
|
800
836
|
word = File.read("test.html", encoding: "UTF-8")
|
801
837
|
expect((word)).to include '<h1 class="IntroTitle">Warning for Stuff</h1>'
|
802
838
|
expect((word)).to include "I am the Walrus."
|
803
839
|
|
804
|
-
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup)
|
840
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup)
|
841
|
+
.convert("test", presxml, false)
|
805
842
|
word = File.read("test.doc", encoding: "UTF-8")
|
806
843
|
expect(xmlpp(word
|
807
|
-
.sub(%r{^.*<div class="boilerplate-copyright">}m,
|
808
|
-
|
844
|
+
.sub(%r{^.*<div class="boilerplate-copyright">}m,
|
845
|
+
'<div class="boilerplate-copyright">')
|
846
|
+
.sub(%r{</div>.*$}m, "</div></div>")))
|
847
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
809
848
|
<div class="boilerplate-copyright">
|
810
849
|
<div>
|
811
850
|
<p class="zzCopyright">
|
@@ -837,125 +876,129 @@ RSpec.describe IsoDoc do
|
|
837
876
|
</div>
|
838
877
|
</div>
|
839
878
|
OUTPUT
|
840
|
-
expect(word).to include '<p class="zzWarning">This document is not
|
879
|
+
expect(word).to include '<p class="zzWarning">This document is not '\
|
880
|
+
"an ISO International Standard"
|
841
881
|
end
|
842
882
|
|
843
883
|
it "populates Word ToC" do
|
844
|
-
IsoDoc::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup)
|
845
|
-
|
846
|
-
<
|
847
|
-
<
|
848
|
-
<
|
849
|
-
|
850
|
-
<
|
851
|
-
<
|
852
|
-
|
853
|
-
|
854
|
-
<
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
<
|
859
|
-
|
860
|
-
<
|
861
|
-
<
|
862
|
-
|
863
|
-
|
864
|
-
<
|
884
|
+
IsoDoc::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup)
|
885
|
+
.convert("test", <<~"INPUT", false)
|
886
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
887
|
+
<sections>
|
888
|
+
<clause id="A" inline-header="false" obligation="normative">
|
889
|
+
<title>Clause 4</title>
|
890
|
+
<clause id="N" inline-header="false" obligation="normative">
|
891
|
+
<title>Introduction
|
892
|
+
<bookmark id="Q"/>
|
893
|
+
to this
|
894
|
+
<fn reference="1">
|
895
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
896
|
+
</title>
|
897
|
+
</clause>
|
898
|
+
<clause id="O" inline-header="false" obligation="normative">
|
899
|
+
<title>Clause 4.2</title>
|
900
|
+
<p>A
|
901
|
+
<fn reference="1">
|
902
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
903
|
+
</p>
|
904
|
+
<clause id="P" inline-header="false" obligation="normative">
|
905
|
+
<title>Clause 4.2.1</title>
|
906
|
+
</clause>
|
865
907
|
</clause>
|
866
908
|
</clause>
|
867
|
-
</
|
868
|
-
</
|
869
|
-
|
870
|
-
INPUT
|
909
|
+
</sections>
|
910
|
+
</iso-standard>
|
911
|
+
INPUT
|
871
912
|
word = File.read("test.doc")
|
872
|
-
.sub(/^.*<div class="WordSection2">/m,
|
913
|
+
.sub(/^.*<div class="WordSection2">/m,
|
914
|
+
'<div class="WordSection2">')
|
873
915
|
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
874
916
|
|
875
|
-
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
|
876
|
-
|
877
|
-
<
|
878
|
-
<
|
879
|
-
<span
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
<span
|
886
|
-
<
|
887
|
-
<
|
888
|
-
<span
|
889
|
-
|
890
|
-
<span
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
<span
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
<span
|
900
|
-
|
901
|
-
|
917
|
+
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
|
918
|
+
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
919
|
+
<div class="WordSection2">An empty word intro page.
|
920
|
+
<p class="MsoToc1">
|
921
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
922
|
+
<span style="mso-element:field-begin"/>
|
923
|
+
<span style="mso-spacerun:yes"> </span>
|
924
|
+
TOC
|
925
|
+
\o "1-2" \h \z \u
|
926
|
+
<span style="mso-element:field-separator"/></span>
|
927
|
+
<span class="MsoHyperlink">
|
928
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
929
|
+
<a href="#_Toc">Clause 4
|
930
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
931
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
932
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
933
|
+
<span style="mso-element:field-begin"/>
|
934
|
+
</span>
|
935
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
936
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
937
|
+
<span style="mso-element:field-separator"/>
|
938
|
+
</span>
|
939
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
940
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
941
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
942
|
+
<span style="mso-element:field-end"/>
|
943
|
+
</span>
|
944
|
+
</a>
|
945
|
+
</span>
|
902
946
|
</span>
|
903
|
-
</
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
<span
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
</
|
923
|
-
</
|
947
|
+
</p>
|
948
|
+
<p class="MsoToc2">
|
949
|
+
<span class="MsoHyperlink">
|
950
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
951
|
+
<a href="#_Toc">Introduction to this
|
952
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
953
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
954
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
955
|
+
<span style="mso-element:field-begin"/>
|
956
|
+
</span>
|
957
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
958
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
959
|
+
<span style="mso-element:field-separator"/>
|
960
|
+
</span>
|
961
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
962
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
963
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
964
|
+
<span style="mso-element:field-end"/>
|
965
|
+
</span>
|
966
|
+
</a>
|
967
|
+
</span>
|
924
968
|
</span>
|
925
|
-
</
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
<span
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
</
|
945
|
-
</
|
969
|
+
</p>
|
970
|
+
<p class="MsoToc2">
|
971
|
+
<span class="MsoHyperlink">
|
972
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
973
|
+
<a href="#_Toc">Clause 4.2
|
974
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
975
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
976
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
977
|
+
<span style="mso-element:field-begin"/>
|
978
|
+
</span>
|
979
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
980
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
981
|
+
<span style="mso-element:field-separator"/>
|
982
|
+
</span>
|
983
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
984
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
985
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
986
|
+
<span style="mso-element:field-end"/>
|
987
|
+
</span>
|
988
|
+
</a>
|
989
|
+
</span>
|
946
990
|
</span>
|
947
|
-
</
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
</
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
OUTPUT
|
991
|
+
</p>
|
992
|
+
<p class="MsoToc1">
|
993
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
994
|
+
<span style="mso-element:field-end"/>
|
995
|
+
</span>
|
996
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
997
|
+
<p class="MsoNormal"> </p>
|
998
|
+
</span>
|
999
|
+
</p>
|
1000
|
+
<p class="MsoNormal"> </p>
|
1001
|
+
</div>
|
1002
|
+
OUTPUT
|
960
1003
|
end
|
961
1004
|
end
|