metanorma-iso 1.8.1 → 1.8.6
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 +4 -8
- data/lib/asciidoctor/iso/base.rb +1 -0
- data/lib/asciidoctor/iso/biblio.rng +1 -0
- data/lib/asciidoctor/iso/cleanup.rb +17 -5
- data/lib/asciidoctor/iso/front.rb +3 -1
- data/lib/asciidoctor/iso/front_id.rb +66 -50
- data/lib/asciidoctor/iso/isodoc.rng +209 -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_section.rb +16 -9
- data/lib/isodoc/iso/base_convert.rb +13 -13
- data/lib/isodoc/iso/html/isodoc.css +475 -20
- data/lib/isodoc/iso/html/isodoc.scss +456 -23
- data/lib/isodoc/iso/html/wordstyle.css +202 -31
- data/lib/isodoc/iso/html/wordstyle.scss +194 -32
- data/lib/isodoc/iso/iso.amendment.xsl +679 -473
- data/lib/isodoc/iso/iso.international-standard.xsl +679 -473
- data/lib/isodoc/iso/metadata.rb +3 -2
- data/lib/isodoc/iso/presentation_xml_convert.rb +18 -9
- data/lib/isodoc/iso/sts_convert.rb +10 -13
- data/lib/isodoc/iso/word_convert.rb +153 -39
- data/lib/isodoc/iso/xref.rb +42 -27
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -4
- data/spec/asciidoctor/base_spec.rb +426 -334
- 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 +119 -39
- data/spec/isodoc/amd_spec.rb +193 -201
- data/spec/isodoc/blocks_spec.rb +100 -88
- data/spec/isodoc/i18n_spec.rb +36 -36
- data/spec/isodoc/inline_spec.rb +282 -2
- data/spec/isodoc/iso_spec.rb +86 -138
- data/spec/isodoc/postproc_spec.rb +492 -442
- data/spec/isodoc/ref_spec.rb +6 -6
- data/spec/isodoc/section_spec.rb +301 -306
- data/spec/isodoc/table_spec.rb +166 -231
- data/spec/isodoc/terms_spec.rb +11 -8
- data/spec/isodoc/xref_spec.rb +147 -118
- data/spec/spec_helper.rb +16 -15
- metadata +9 -9
@@ -25,80 +25,86 @@ WORD_HTML_CSS_WORDINTRO = {
|
|
25
25
|
|
26
26
|
RSpec.describe IsoDoc do
|
27
27
|
it "generates file based on string input" do
|
28
|
-
IsoDoc::Iso::HtmlConvert
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
<title
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
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>
|
45
47
|
INPUT
|
46
48
|
expect(File.exist?("test.html")).to be true
|
47
49
|
html = File.read("test.html", encoding: "UTF-8")
|
48
|
-
expect(html).to
|
49
|
-
|
50
|
-
)
|
50
|
+
expect(html).to include "<title>Cereals and pulses — "\
|
51
|
+
"Specifications and test methods — Rice</title>"
|
51
52
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
52
53
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
53
54
|
end
|
54
55
|
|
55
56
|
it "generates HTML output docs with null configuration" do
|
56
|
-
IsoDoc::Iso::HtmlConvert
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<title
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
74
77
|
expect(File.exist?("test.html")).to be true
|
75
78
|
html = File.read("test.html", encoding: "UTF-8")
|
76
|
-
expect(html).to
|
77
|
-
|
78
|
-
)
|
79
|
+
expect(html).to include "title>Cereals and pulses — "\
|
80
|
+
"Specifications and test methods — Rice</title>"
|
79
81
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
80
82
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
81
83
|
end
|
82
84
|
|
83
85
|
it "generates Word output docs with null configuration" do
|
84
|
-
IsoDoc::Iso::WordConvert
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
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
|
95
99
|
expect(File.exist?("test.doc")).to be true
|
96
100
|
word = File.read("test.doc", encoding: "UTF-8")
|
97
101
|
expect(word).to match(/<style>/)
|
98
102
|
end
|
99
103
|
|
100
104
|
it "generates HTML output docs with null configuration from file" do
|
101
|
-
IsoDoc::Iso::HtmlConvert
|
105
|
+
IsoDoc::Iso::HtmlConvert
|
106
|
+
.new(WORD_HTML_CSS_SUBDIR.dup)
|
107
|
+
.convert("spec/assets/iso.xml", nil, false)
|
102
108
|
expect(File.exist?("spec/assets/iso.html")).to be true
|
103
109
|
html = File.read("spec/assets/iso.html", encoding: "UTF-8")
|
104
110
|
expect(html).to match(/<style>/)
|
@@ -107,7 +113,9 @@ RSpec.describe IsoDoc do
|
|
107
113
|
end
|
108
114
|
|
109
115
|
it "generates Word output docs with null configuration from file" do
|
110
|
-
IsoDoc::Iso::WordConvert
|
116
|
+
IsoDoc::Iso::WordConvert
|
117
|
+
.new(WORD_HTML_CSS_SUBDIR.dup)
|
118
|
+
.convert("spec/assets/iso.xml", nil, false)
|
111
119
|
expect(File.exist?("spec/assets/iso.doc")).to be true
|
112
120
|
word = File.read("spec/assets/iso.doc", encoding: "UTF-8")
|
113
121
|
expect(word).to match(/<w:WordDocument>/)
|
@@ -116,28 +124,35 @@ RSpec.describe IsoDoc do
|
|
116
124
|
|
117
125
|
it "generates Pdf output docs with null configuration from file" do
|
118
126
|
mock_pdf
|
119
|
-
IsoDoc::Iso::PdfConvert
|
127
|
+
IsoDoc::Iso::PdfConvert
|
128
|
+
.new(WORD_HTML_CSS.dup)
|
129
|
+
.convert("spec/assets/iso.xml", nil, false)
|
120
130
|
expect(File.exist?("spec/assets/iso.pdf")).to be true
|
121
131
|
end
|
122
132
|
|
123
133
|
it "converts annex subheadings to h2Annex class for Word" do
|
124
|
-
IsoDoc::Iso::WordConvert
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
<
|
129
|
-
<title>
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
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
|
+
<bibliography>
|
152
|
+
<references id="R" normative="false"><title>Bibliography</title></references>
|
153
|
+
</bibliography>
|
154
|
+
</iso-standard>
|
155
|
+
INPUT
|
141
156
|
|
142
157
|
word = File.read("test.doc", encoding: "UTF-8")
|
143
158
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
@@ -151,7 +166,7 @@ RSpec.describe IsoDoc do
|
|
151
166
|
</p>
|
152
167
|
<div class="Section3">
|
153
168
|
<a id="P" name="P"/>
|
154
|
-
<
|
169
|
+
<p class="ANNEX">Annex</p>
|
155
170
|
<div>
|
156
171
|
<a id="Q" name="Q"/>
|
157
172
|
<p class="h2Annex">A.1
|
@@ -165,38 +180,46 @@ RSpec.describe IsoDoc do
|
|
165
180
|
An Appendix</p>
|
166
181
|
</div>
|
167
182
|
</div>
|
183
|
+
<p class='MsoNormal'>
|
184
|
+
<br clear='all' style='mso-special-character:line-break;page-break-before:always'/>
|
185
|
+
</p>
|
186
|
+
<div>
|
187
|
+
<p class='BiblioTitle'>Bibliography</p>
|
188
|
+
</div>
|
168
189
|
</div>
|
169
190
|
OUTPUT
|
170
191
|
end
|
171
192
|
|
172
193
|
it "populates Word template with terms reference labels" do
|
173
|
-
IsoDoc::Iso::WordConvert
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
<
|
183
|
-
|
184
|
-
<
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
194
|
+
IsoDoc::Iso::WordConvert
|
195
|
+
.new(WORD_HTML_CSS.dup)
|
196
|
+
.convert("test", <<~"INPUT", false)
|
197
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
198
|
+
<sections>
|
199
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
200
|
+
<title>1
|
201
|
+
<tab/>
|
202
|
+
Terms and Definitions</title>
|
203
|
+
<term id="paddy1">
|
204
|
+
<name>1.1</name>
|
205
|
+
<preferred>paddy</preferred>
|
206
|
+
<definition>
|
207
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
208
|
+
</definition>
|
209
|
+
<termsource status="modified">
|
210
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
211
|
+
<locality type="clause">
|
212
|
+
<referenceFrom>3.1</referenceFrom>
|
213
|
+
</locality>ISO 7301:2011, 3.1</origin>
|
214
|
+
<modification>
|
215
|
+
<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>
|
216
|
+
</modification>
|
217
|
+
</termsource>
|
218
|
+
</term>
|
219
|
+
</terms>
|
220
|
+
</sections>
|
221
|
+
</iso-standard>
|
222
|
+
INPUT
|
200
223
|
|
201
224
|
word = File.read("test.doc", encoding: "UTF-8")
|
202
225
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
@@ -213,9 +236,9 @@ RSpec.describe IsoDoc do
|
|
213
236
|
<p class="TermNum">
|
214
237
|
<a id="paddy1" name="paddy1"/>1.1</p>
|
215
238
|
<p class="Terms" style="text-align:left;">paddy</p>
|
216
|
-
<p class="
|
239
|
+
<p class="Definition">
|
217
240
|
<a id="_eb29b35e-123e-4d1c-b50b-2714d41e747f" name="_eb29b35e-123e-4d1c-b50b-2714d41e747f"/>rice retaining its husk after threshing</p>
|
218
|
-
<p class="
|
241
|
+
<p class="Source">[SOURCE:
|
219
242
|
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
220
243
|
, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
|
221
244
|
</div>
|
@@ -224,139 +247,145 @@ RSpec.describe IsoDoc do
|
|
224
247
|
end
|
225
248
|
|
226
249
|
it "populates Word header" do
|
227
|
-
IsoDoc::Iso::WordConvert
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
250
|
+
IsoDoc::Iso::WordConvert
|
251
|
+
.new(WORD_HTML_CSS_HEADER_HTML.dup)
|
252
|
+
.convert("test", <<~"INPUT", false)
|
253
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
254
|
+
<bibdata type="article">
|
255
|
+
<docidentifier>
|
256
|
+
<project-number part="1">1000</project-number>
|
257
|
+
</docidentifier>
|
258
|
+
</bibdata>
|
259
|
+
</iso-standard>
|
260
|
+
INPUT
|
236
261
|
word = File.read("test.doc", encoding: "UTF-8")
|
237
262
|
expect(word).to include('Content-Disposition: inline; filename="header.html"')
|
238
263
|
end
|
239
264
|
|
240
265
|
it "populates Word ToC" do
|
241
|
-
IsoDoc::Iso::WordConvert
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
<clause id="N" inline-header="false" obligation="normative">
|
249
|
-
<title>1.1
|
266
|
+
IsoDoc::Iso::WordConvert
|
267
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
268
|
+
.convert("test", <<~"INPUT", false)
|
269
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
270
|
+
<sections>
|
271
|
+
<clause id="A" inline-header="false" obligation="normative">
|
272
|
+
<title>1
|
250
273
|
<tab/>
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
<
|
263
|
-
<
|
264
|
-
<
|
265
|
-
|
274
|
+
Clause 4</title>
|
275
|
+
<clause id="N" inline-header="false" obligation="normative">
|
276
|
+
<title>1.1
|
277
|
+
<tab/>
|
278
|
+
Introduction
|
279
|
+
<bookmark id="Q"/>
|
280
|
+
to this
|
281
|
+
<fn reference="1">
|
282
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
283
|
+
</title>
|
284
|
+
</clause>
|
285
|
+
<clause id="O" inline-header="false" obligation="normative">
|
286
|
+
<title>1.2
|
287
|
+
<tab/>
|
288
|
+
Clause 4.2</title>
|
289
|
+
<p>A
|
290
|
+
<fn reference="1">
|
291
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
292
|
+
</p>
|
293
|
+
</clause>
|
266
294
|
</clause>
|
267
|
-
</
|
268
|
-
</
|
269
|
-
|
270
|
-
INPUT
|
295
|
+
</sections>
|
296
|
+
</iso-standard>
|
297
|
+
INPUT
|
271
298
|
|
272
299
|
word = File.read("test.doc", encoding: "UTF-8")
|
273
300
|
.sub(/^.*An empty word intro page\./m, "")
|
274
301
|
.sub(%r{</div>.*$}m, "</div>")
|
275
302
|
|
276
|
-
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
|
277
|
-
|
278
|
-
<
|
279
|
-
<
|
280
|
-
<span
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
<span
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
<span
|
300
|
-
|
301
|
-
|
303
|
+
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}"))
|
304
|
+
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
305
|
+
<div>
|
306
|
+
<p class="MsoToc1">
|
307
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
308
|
+
<span style="mso-element:field-begin"/>
|
309
|
+
<span style='mso-spacerun:yes'> </span>
|
310
|
+
TOC \o "1-3" \h \z \t "Heading 1;1;ANNEX;1;Biblio Title;1;Foreword
|
311
|
+
Title;1;Intro Title;1"
|
312
|
+
<span style="mso-element:field-separator"/></span>
|
313
|
+
<span class="MsoHyperlink">
|
314
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
315
|
+
<a href="#_Toc">1 Clause 4
|
316
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
317
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
318
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
319
|
+
<span style="mso-element:field-begin"/>
|
320
|
+
</span>
|
321
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
322
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
323
|
+
<span style="mso-element:field-separator"/>
|
324
|
+
</span>
|
325
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
326
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
327
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
328
|
+
<span style="mso-element:field-end"/>
|
329
|
+
</span>
|
330
|
+
</a>
|
331
|
+
</span>
|
302
332
|
</span>
|
303
|
-
</
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
<span
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
</
|
323
|
-
</
|
333
|
+
</p>
|
334
|
+
<p class="MsoToc2">
|
335
|
+
<span class="MsoHyperlink">
|
336
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
337
|
+
<a href="#_Toc">1.1 Introduction to this
|
338
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
339
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
340
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
341
|
+
<span style="mso-element:field-begin"/>
|
342
|
+
</span>
|
343
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
344
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
345
|
+
<span style="mso-element:field-separator"/>
|
346
|
+
</span>
|
347
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
348
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
349
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
350
|
+
<span style="mso-element:field-end"/>
|
351
|
+
</span>
|
352
|
+
</a>
|
353
|
+
</span>
|
324
354
|
</span>
|
325
|
-
</
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
<span
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
</
|
345
|
-
</
|
355
|
+
</p>
|
356
|
+
<p class="MsoToc2">
|
357
|
+
<span class="MsoHyperlink">
|
358
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
359
|
+
<a href="#_Toc">1.2 Clause 4.2
|
360
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
361
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
362
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
363
|
+
<span style="mso-element:field-begin"/>
|
364
|
+
</span>
|
365
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
366
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
367
|
+
<span style="mso-element:field-separator"/>
|
368
|
+
</span>
|
369
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
370
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
371
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
372
|
+
<span style="mso-element:field-end"/>
|
373
|
+
</span>
|
374
|
+
</a>
|
375
|
+
</span>
|
346
376
|
</span>
|
347
|
-
</
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
</
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
OUTPUT
|
377
|
+
</p>
|
378
|
+
<p class="MsoToc1">
|
379
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
380
|
+
<span style="mso-element:field-end"/>
|
381
|
+
</span>
|
382
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
383
|
+
<p class="MsoNormal"> </p>
|
384
|
+
</span>
|
385
|
+
</p>
|
386
|
+
<p class="MsoNormal"> </p>
|
387
|
+
</div>
|
388
|
+
OUTPUT
|
360
389
|
end
|
361
390
|
|
362
391
|
it "reorders footnote numbers" do
|
@@ -390,10 +419,13 @@ RSpec.describe IsoDoc do
|
|
390
419
|
</iso-standard>
|
391
420
|
INPUT
|
392
421
|
|
393
|
-
IsoDoc::Iso::HtmlConvert
|
422
|
+
IsoDoc::Iso::HtmlConvert
|
423
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
424
|
+
.convert("test", input, false)
|
394
425
|
|
395
426
|
html = File.read("test.html", encoding: "UTF-8")
|
396
|
-
.sub(/^.*<main class="main-section">/m,
|
427
|
+
.sub(/^.*<main class="main-section">/m,
|
428
|
+
'<main xmlns:epub="epub" class="main-section">')
|
397
429
|
.sub(%r{</main>.*$}m, "</main>")
|
398
430
|
|
399
431
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -436,11 +468,15 @@ RSpec.describe IsoDoc do
|
|
436
468
|
</main>
|
437
469
|
OUTPUT
|
438
470
|
|
439
|
-
IsoDoc::Iso::WordConvert
|
471
|
+
IsoDoc::Iso::WordConvert
|
472
|
+
.new(WORD_HTML_CSS_WORDINTRO.dup)
|
473
|
+
.convert("test", input, false)
|
440
474
|
|
441
475
|
html = File.read("test.doc", encoding: "UTF-8")
|
442
|
-
.sub(/^.*<div class="WordSection3"/m,
|
443
|
-
|
476
|
+
.sub(/^.*<div class="WordSection3"/m,
|
477
|
+
'<body xmlns:epub="epub"><div class="WordSection3"')
|
478
|
+
.sub(%r{</body>.*$}m, "</body>")
|
479
|
+
.gsub(/mso-bookmark:_Ref\d+/, "mso-bookmark:_Ref")
|
444
480
|
|
445
481
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
446
482
|
<body xmlns:epub="epub">
|
@@ -529,75 +565,77 @@ RSpec.describe IsoDoc do
|
|
529
565
|
end
|
530
566
|
|
531
567
|
it "processes IsoXML terms for HTML" do
|
532
|
-
IsoDoc::Iso::HtmlConvert
|
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
|
-
|
599
|
-
|
600
|
-
|
568
|
+
IsoDoc::Iso::HtmlConvert
|
569
|
+
.new(WORD_HTML_CSS.dup)
|
570
|
+
.convert("test", <<~"INPUT", false)
|
571
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
572
|
+
<sections>
|
573
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
574
|
+
<title>Terms and Definitions</title>
|
575
|
+
<term id="paddy1">
|
576
|
+
<name>1.1</name>
|
577
|
+
<preferred>paddy</preferred>
|
578
|
+
<domain>rice</domain>
|
579
|
+
<definition>
|
580
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
581
|
+
</definition>
|
582
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
583
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
584
|
+
<ul>
|
585
|
+
<li>A</li>
|
586
|
+
</ul>
|
587
|
+
</termexample>
|
588
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
589
|
+
<ul>
|
590
|
+
<li>A</li>
|
591
|
+
</ul>
|
592
|
+
</termexample>
|
593
|
+
<termsource status="modified">
|
594
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
595
|
+
<locality type="clause">
|
596
|
+
<referenceFrom>3.1</referenceFrom>
|
597
|
+
</locality>
|
598
|
+
</origin>
|
599
|
+
<modification>
|
600
|
+
<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>
|
601
|
+
</modification>
|
602
|
+
</termsource>
|
603
|
+
</term>
|
604
|
+
<term id="paddy">
|
605
|
+
<name>1.2</name>
|
606
|
+
<preferred>paddy</preferred>
|
607
|
+
<admitted>paddy rice</admitted>
|
608
|
+
<admitted>rough rice</admitted>
|
609
|
+
<deprecates>cargo rice</deprecates>
|
610
|
+
<definition>
|
611
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
612
|
+
</definition>
|
613
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
614
|
+
<ul>
|
615
|
+
<li>A</li>
|
616
|
+
</ul>
|
617
|
+
</termexample>
|
618
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
619
|
+
<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>
|
620
|
+
</termnote>
|
621
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
622
|
+
<ul>
|
623
|
+
<li>A</li>
|
624
|
+
</ul>
|
625
|
+
<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>
|
626
|
+
</termnote>
|
627
|
+
<termsource status="identical">
|
628
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
629
|
+
<locality type="clause">
|
630
|
+
<referenceFrom>3.1</referenceFrom>
|
631
|
+
</locality>
|
632
|
+
</origin>
|
633
|
+
</termsource>
|
634
|
+
</term>
|
635
|
+
</terms>
|
636
|
+
</sections>
|
637
|
+
</iso-standard>
|
638
|
+
INPUT
|
601
639
|
expect(File.exist?("test.html")).to be true
|
602
640
|
html = File.read("test.html", encoding: "UTF-8")
|
603
641
|
expect(html).to match(%r{<h2 class="TermNum" id="paddy1">1\.1</h2>})
|
@@ -605,18 +643,20 @@ RSpec.describe IsoDoc do
|
|
605
643
|
end
|
606
644
|
|
607
645
|
it "inserts default paragraph between two tables for Word" do
|
608
|
-
IsoDoc::Iso::WordConvert
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
646
|
+
IsoDoc::Iso::WordConvert
|
647
|
+
.new(WORD_HTML_CSS.dup)
|
648
|
+
.convert("test", <<~"INPUT", false)
|
649
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
650
|
+
<annex id="P" inline-header="false" obligation="normative">
|
651
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851c">
|
652
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c968">'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
653
|
+
</example>
|
654
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851d">
|
655
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c969">'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
656
|
+
</example>
|
657
|
+
</annex>
|
658
|
+
</iso-standard>
|
659
|
+
INPUT
|
620
660
|
word = File.read("test.doc", encoding: "UTF-8")
|
621
661
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
622
662
|
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
@@ -628,14 +668,14 @@ RSpec.describe IsoDoc do
|
|
628
668
|
</p>
|
629
669
|
<div class="Section3">
|
630
670
|
<a id="P" name="P"/>
|
631
|
-
<div class="
|
671
|
+
<div class="Example">
|
632
672
|
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851c" name="_63112cbc-cde0-435f-9553-e0b8c4f5851c"/>
|
633
|
-
<p class="
|
673
|
+
<p class="Example">
|
634
674
|
<span style="mso-tab-count:1"> </span>'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
635
675
|
</div>
|
636
|
-
<div class="
|
676
|
+
<div class="Example">
|
637
677
|
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851d" name="_63112cbc-cde0-435f-9553-e0b8c4f5851d"/>
|
638
|
-
<p class="
|
678
|
+
<p class="Example">
|
639
679
|
<span style="mso-tab-count:1"> </span>'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
640
680
|
</div>
|
641
681
|
</div>
|
@@ -644,24 +684,26 @@ RSpec.describe IsoDoc do
|
|
644
684
|
end
|
645
685
|
|
646
686
|
it "processes figure keys (Word)" do
|
647
|
-
IsoDoc::Iso::WordConvert
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
<
|
653
|
-
|
654
|
-
<
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
687
|
+
IsoDoc::Iso::WordConvert
|
688
|
+
.new(WORD_HTML_CSS.dup)
|
689
|
+
.convert("test", <<~"INPUT", false)
|
690
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
691
|
+
<annex id="P" inline-header="false" obligation="normative">
|
692
|
+
<figure id="samplecode">
|
693
|
+
<p>Hello</p>
|
694
|
+
<p>Key</p>
|
695
|
+
<dl>
|
696
|
+
<dt>
|
697
|
+
<p>A</p>
|
698
|
+
</dt>
|
699
|
+
<dd>
|
700
|
+
<p>B</p>
|
701
|
+
</dd>
|
702
|
+
</dl>
|
703
|
+
</figure>
|
704
|
+
</annex>
|
705
|
+
</iso-standard>
|
706
|
+
INPUT
|
665
707
|
word = File.read("test.doc", encoding: "UTF-8")
|
666
708
|
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
667
709
|
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
@@ -694,7 +736,6 @@ RSpec.describe IsoDoc do
|
|
694
736
|
</tr>
|
695
737
|
</table>
|
696
738
|
</div>
|
697
|
-
<p class="FigureTitle" style="text-align:center;"/>
|
698
739
|
</div>
|
699
740
|
</div>
|
700
741
|
</div>
|
@@ -797,17 +838,22 @@ RSpec.describe IsoDoc do
|
|
797
838
|
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
798
839
|
.to be_equivalent_to xmlpp(presxml)
|
799
840
|
|
800
|
-
IsoDoc::Iso::HtmlConvert
|
841
|
+
IsoDoc::Iso::HtmlConvert
|
842
|
+
.new(WORD_HTML_CSS.dup)
|
843
|
+
.convert("test", presxml, false)
|
801
844
|
|
802
845
|
word = File.read("test.html", encoding: "UTF-8")
|
803
846
|
expect((word)).to include '<h1 class="IntroTitle">Warning for Stuff</h1>'
|
804
847
|
expect((word)).to include "I am the Walrus."
|
805
848
|
|
806
|
-
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup)
|
849
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup)
|
850
|
+
.convert("test", presxml, false)
|
807
851
|
word = File.read("test.doc", encoding: "UTF-8")
|
808
852
|
expect(xmlpp(word
|
809
|
-
.sub(%r{^.*<div class="boilerplate-copyright">}m,
|
810
|
-
|
853
|
+
.sub(%r{^.*<div class="boilerplate-copyright">}m,
|
854
|
+
'<div class="boilerplate-copyright">')
|
855
|
+
.sub(%r{</div>.*$}m, "</div></div>")))
|
856
|
+
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
811
857
|
<div class="boilerplate-copyright">
|
812
858
|
<div>
|
813
859
|
<p class="zzCopyright">
|
@@ -839,125 +885,129 @@ RSpec.describe IsoDoc do
|
|
839
885
|
</div>
|
840
886
|
</div>
|
841
887
|
OUTPUT
|
842
|
-
expect(word).to include '<p class="zzWarning">This document is not
|
888
|
+
expect(word).to include '<p class="zzWarning">This document is not '\
|
889
|
+
"an ISO International Standard"
|
843
890
|
end
|
844
891
|
|
845
892
|
it "populates Word ToC" do
|
846
|
-
IsoDoc::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup)
|
847
|
-
|
848
|
-
<
|
849
|
-
<
|
850
|
-
<
|
851
|
-
|
852
|
-
<
|
853
|
-
<
|
854
|
-
|
855
|
-
|
856
|
-
<
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
<
|
861
|
-
|
862
|
-
<
|
863
|
-
<
|
864
|
-
|
865
|
-
|
866
|
-
<
|
893
|
+
IsoDoc::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup)
|
894
|
+
.convert("test", <<~"INPUT", false)
|
895
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
896
|
+
<sections>
|
897
|
+
<clause id="A" inline-header="false" obligation="normative">
|
898
|
+
<title>Clause 4</title>
|
899
|
+
<clause id="N" inline-header="false" obligation="normative">
|
900
|
+
<title>Introduction
|
901
|
+
<bookmark id="Q"/>
|
902
|
+
to this
|
903
|
+
<fn reference="1">
|
904
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
905
|
+
</title>
|
906
|
+
</clause>
|
907
|
+
<clause id="O" inline-header="false" obligation="normative">
|
908
|
+
<title>Clause 4.2</title>
|
909
|
+
<p>A
|
910
|
+
<fn reference="1">
|
911
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
912
|
+
</p>
|
913
|
+
<clause id="P" inline-header="false" obligation="normative">
|
914
|
+
<title>Clause 4.2.1</title>
|
915
|
+
</clause>
|
867
916
|
</clause>
|
868
917
|
</clause>
|
869
|
-
</
|
870
|
-
</
|
871
|
-
|
872
|
-
INPUT
|
918
|
+
</sections>
|
919
|
+
</iso-standard>
|
920
|
+
INPUT
|
873
921
|
word = File.read("test.doc")
|
874
|
-
.sub(/^.*<div class="WordSection2">/m,
|
922
|
+
.sub(/^.*<div class="WordSection2">/m,
|
923
|
+
'<div class="WordSection2">')
|
875
924
|
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
876
925
|
|
877
|
-
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
|
878
|
-
|
879
|
-
<
|
880
|
-
<
|
881
|
-
<span
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
<span
|
888
|
-
<
|
889
|
-
<
|
890
|
-
<span
|
891
|
-
|
892
|
-
<span
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
<span
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
<span
|
902
|
-
|
903
|
-
|
926
|
+
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc")))
|
927
|
+
.to be_equivalent_to xmlpp(<<~'OUTPUT')
|
928
|
+
<div class="WordSection2">An empty word intro page.
|
929
|
+
<p class="MsoToc1">
|
930
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
931
|
+
<span style="mso-element:field-begin"/>
|
932
|
+
<span style="mso-spacerun:yes"> </span>
|
933
|
+
TOC
|
934
|
+
\o "1-2" \h \z \u
|
935
|
+
<span style="mso-element:field-separator"/></span>
|
936
|
+
<span class="MsoHyperlink">
|
937
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
938
|
+
<a href="#_Toc">Clause 4
|
939
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
940
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
941
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
942
|
+
<span style="mso-element:field-begin"/>
|
943
|
+
</span>
|
944
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
945
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
946
|
+
<span style="mso-element:field-separator"/>
|
947
|
+
</span>
|
948
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
949
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
950
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
951
|
+
<span style="mso-element:field-end"/>
|
952
|
+
</span>
|
953
|
+
</a>
|
954
|
+
</span>
|
904
955
|
</span>
|
905
|
-
</
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
<span
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
</
|
925
|
-
</
|
956
|
+
</p>
|
957
|
+
<p class="MsoToc2">
|
958
|
+
<span class="MsoHyperlink">
|
959
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
960
|
+
<a href="#_Toc">Introduction to this
|
961
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
962
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
963
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
964
|
+
<span style="mso-element:field-begin"/>
|
965
|
+
</span>
|
966
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
967
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
968
|
+
<span style="mso-element:field-separator"/>
|
969
|
+
</span>
|
970
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
971
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
972
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
973
|
+
<span style="mso-element:field-end"/>
|
974
|
+
</span>
|
975
|
+
</a>
|
976
|
+
</span>
|
926
977
|
</span>
|
927
|
-
</
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
<span
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
</
|
947
|
-
</
|
978
|
+
</p>
|
979
|
+
<p class="MsoToc2">
|
980
|
+
<span class="MsoHyperlink">
|
981
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
982
|
+
<a href="#_Toc">Clause 4.2
|
983
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
984
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
985
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
986
|
+
<span style="mso-element:field-begin"/>
|
987
|
+
</span>
|
988
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
989
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
990
|
+
<span style="mso-element:field-separator"/>
|
991
|
+
</span>
|
992
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
993
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
994
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
995
|
+
<span style="mso-element:field-end"/>
|
996
|
+
</span>
|
997
|
+
</a>
|
998
|
+
</span>
|
948
999
|
</span>
|
949
|
-
</
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
</
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
OUTPUT
|
1000
|
+
</p>
|
1001
|
+
<p class="MsoToc1">
|
1002
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
1003
|
+
<span style="mso-element:field-end"/>
|
1004
|
+
</span>
|
1005
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
1006
|
+
<p class="MsoNormal"> </p>
|
1007
|
+
</span>
|
1008
|
+
</p>
|
1009
|
+
<p class="MsoNormal"> </p>
|
1010
|
+
</div>
|
1011
|
+
OUTPUT
|
962
1012
|
end
|
963
1013
|
end
|