metanorma-iso 1.7.0 → 1.8.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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +11 -41
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -2
- data/lib/asciidoctor/iso/base.rb +12 -12
- data/lib/asciidoctor/iso/biblio.rng +4 -6
- data/lib/asciidoctor/iso/cleanup.rb +1 -1
- data/lib/asciidoctor/iso/front.rb +1 -1
- data/lib/asciidoctor/iso/front_id.rb +30 -25
- data/lib/asciidoctor/iso/isodoc.rng +235 -3
- data/lib/asciidoctor/iso/isostandard-amd.rng +3 -0
- data/lib/asciidoctor/iso/isostandard.rng +17 -97
- data/lib/asciidoctor/iso/validate.rb +1 -0
- data/lib/asciidoctor/iso/validate_title.rb +21 -13
- data/lib/isodoc/iso/base_convert.rb +11 -0
- 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/i18n-en.yaml +4 -0
- data/lib/isodoc/iso/i18n-fr.yaml +4 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
- data/lib/isodoc/iso/index.rb +140 -0
- data/lib/isodoc/iso/iso.amendment.xsl +1010 -324
- data/lib/isodoc/iso/iso.international-standard.xsl +1010 -324
- data/lib/isodoc/iso/presentation_xml_convert.rb +32 -25
- data/lib/isodoc/iso/word_convert.rb +0 -1
- data/lib/isodoc/iso/xref.rb +13 -5
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +8 -8
- data/spec/asciidoctor/amd_spec.rb +696 -0
- data/spec/asciidoctor/base_spec.rb +704 -0
- data/spec/asciidoctor/blocks_spec.rb +527 -0
- data/spec/asciidoctor/cleanup_spec.rb +1134 -0
- data/spec/asciidoctor/inline_spec.rb +195 -0
- data/spec/asciidoctor/lists_spec.rb +197 -0
- data/spec/asciidoctor/refs_spec.rb +375 -0
- data/spec/asciidoctor/section_spec.rb +393 -0
- data/spec/asciidoctor/table_spec.rb +329 -0
- data/spec/asciidoctor/validate_spec.rb +1572 -0
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +338 -314
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +837 -657
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +821 -519
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +186 -189
- metadata +65 -67
- data/.rubocop.ribose.yml +0 -66
- data/lib/isodoc/iso/html/scripts.html +0 -178
- data/spec/asciidoctor-iso/amd_spec.rb +0 -694
- data/spec/asciidoctor-iso/base_spec.rb +0 -713
- data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
- data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
- data/spec/asciidoctor-iso/inline_spec.rb +0 -170
- data/spec/asciidoctor-iso/lists_spec.rb +0 -190
- data/spec/asciidoctor-iso/refs_spec.rb +0 -317
- data/spec/asciidoctor-iso/section_spec.rb +0 -362
- data/spec/asciidoctor-iso/table_spec.rb +0 -313
- data/spec/asciidoctor-iso/validate_spec.rb +0 -1619
- data/spec/assets/xref_error.adoc +0 -7
@@ -1,71 +1,96 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
require "fileutils"
|
3
3
|
|
4
|
-
|
4
|
+
WORD_HTML_CSS = {
|
5
|
+
wordstylesheet: "spec/assets/word.css",
|
6
|
+
htmlstylesheet: "spec/assets/html.css",
|
7
|
+
}.freeze
|
8
|
+
|
9
|
+
WORD_HTML_CSS_SUBDIR = {
|
10
|
+
wordstylesheet: "word.css",
|
11
|
+
htmlstylesheet: "html.css",
|
12
|
+
}.freeze
|
13
|
+
|
14
|
+
WORD_HTML_CSS_HEADER_HTML = {
|
15
|
+
wordstylesheet: "spec/assets/word.css",
|
16
|
+
htmlstylesheet: "spec/assets/html.css",
|
17
|
+
header: "spec/assets/header.html",
|
18
|
+
}.freeze
|
19
|
+
|
20
|
+
WORD_HTML_CSS_WORDINTRO = {
|
21
|
+
wordstylesheet: "spec/assets/word.css",
|
22
|
+
htmlstylesheet: "spec/assets/html.css",
|
23
|
+
wordintropage: "spec/assets/wordintro.html",
|
24
|
+
}.freeze
|
5
25
|
|
26
|
+
RSpec.describe IsoDoc do
|
6
27
|
it "generates file based on string input" do
|
7
|
-
|
8
|
-
|
9
|
-
IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css", filename: "test"}).convert("test", <<~"INPUT", false)
|
10
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
28
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS.merge(filename: "test")).convert("test", <<~"INPUT", false)
|
29
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
11
30
|
<bibdata>
|
12
|
-
|
13
|
-
<title
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
31
|
+
<title>
|
32
|
+
<title format="text/plain" language="en" type="title-intro">Cereals and pulses</title>
|
33
|
+
<title format="text/plain" language="en" type="title-main">Specifications and test methods</title>
|
34
|
+
<title format="text/plain" language="en" type="title-part">Rice</title>
|
35
|
+
</title>
|
36
|
+
</bibdata>
|
37
|
+
<preface>
|
38
|
+
<foreword>
|
39
|
+
<note>
|
40
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
41
|
+
</note>
|
42
|
+
</foreword>
|
43
|
+
</preface>
|
44
|
+
</iso-standard>
|
24
45
|
INPUT
|
25
46
|
expect(File.exist?("test.html")).to be true
|
26
47
|
html = File.read("test.html", encoding: "UTF-8")
|
27
|
-
expect(html).to match(
|
48
|
+
expect(html).to match(
|
49
|
+
%r{<title>Cereals and pulses — Specifications and test methods — Rice</title>}
|
50
|
+
)
|
28
51
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
29
52
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
30
53
|
end
|
31
54
|
|
32
55
|
it "generates HTML output docs with null configuration" do
|
33
|
-
|
34
|
-
|
35
|
-
IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
|
36
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
56
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
57
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
37
58
|
<bibdata>
|
38
|
-
|
39
|
-
<title
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
59
|
+
<title>
|
60
|
+
<title format="text/plain" language="en" type="title-intro">Cereals and pulses</title>
|
61
|
+
<title format="text/plain" language="en" type="title-main">Specifications and test methods</title>
|
62
|
+
<title format="text/plain" language="en" type="title-part">Rice</title>
|
63
|
+
</title>
|
64
|
+
</bibdata>
|
65
|
+
<preface>
|
66
|
+
<foreword>
|
67
|
+
<note>
|
68
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
69
|
+
</note>
|
70
|
+
</foreword>
|
71
|
+
</preface>
|
72
|
+
</iso-standard>
|
50
73
|
INPUT
|
51
74
|
expect(File.exist?("test.html")).to be true
|
52
75
|
html = File.read("test.html", encoding: "UTF-8")
|
53
|
-
expect(html).to match(
|
76
|
+
expect(html).to match(
|
77
|
+
%r{<title>Cereals and pulses — Specifications and test methods — Rice</title>}
|
78
|
+
)
|
54
79
|
expect(html).to match(%r{cdnjs\.cloudflare\.com/ajax/libs/mathjax/})
|
55
80
|
expect(html).to match(/delimiters: \[\['\(#\(', '\)#\)'\]\]/)
|
56
81
|
end
|
57
82
|
|
58
83
|
it "generates Word output docs with null configuration" do
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</
|
67
|
-
|
68
|
-
|
84
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
85
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
86
|
+
<preface>
|
87
|
+
<foreword>
|
88
|
+
<note>
|
89
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
90
|
+
</note>
|
91
|
+
</foreword>
|
92
|
+
</preface>
|
93
|
+
</iso-standard>
|
69
94
|
INPUT
|
70
95
|
expect(File.exist?("test.doc")).to be true
|
71
96
|
word = File.read("test.doc", encoding: "UTF-8")
|
@@ -73,9 +98,7 @@ RSpec.describe IsoDoc do
|
|
73
98
|
end
|
74
99
|
|
75
100
|
it "generates HTML output docs with null configuration from file" do
|
76
|
-
|
77
|
-
FileUtils.rm_f "spec/assets/iso.html"
|
78
|
-
IsoDoc::Iso::HtmlConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
|
101
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS_SUBDIR.dup).convert("spec/assets/iso.xml", nil, false)
|
79
102
|
expect(File.exist?("spec/assets/iso.html")).to be true
|
80
103
|
html = File.read("spec/assets/iso.html", encoding: "UTF-8")
|
81
104
|
expect(html).to match(/<style>/)
|
@@ -84,403 +107,496 @@ RSpec.describe IsoDoc do
|
|
84
107
|
end
|
85
108
|
|
86
109
|
it "generates Word output docs with null configuration from file" do
|
87
|
-
|
88
|
-
IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("spec/assets/iso.xml", nil, false)
|
110
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS_SUBDIR.dup).convert("spec/assets/iso.xml", nil, false)
|
89
111
|
expect(File.exist?("spec/assets/iso.doc")).to be true
|
90
112
|
word = File.read("spec/assets/iso.doc", encoding: "UTF-8")
|
91
113
|
expect(word).to match(/<w:WordDocument>/)
|
92
114
|
expect(word).to match(/<style>/)
|
93
115
|
end
|
94
116
|
|
95
|
-
|
96
|
-
|
97
|
-
IsoDoc::Iso::PdfConvert.new(
|
117
|
+
it "generates Pdf output docs with null configuration from file" do
|
118
|
+
mock_pdf
|
119
|
+
IsoDoc::Iso::PdfConvert.new(WORD_HTML_CSS.dup).convert("spec/assets/iso.xml", nil, false)
|
98
120
|
expect(File.exist?("spec/assets/iso.pdf")).to be true
|
99
121
|
end
|
100
122
|
|
101
123
|
it "converts annex subheadings to h2Annex class for Word" do
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
124
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
125
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
126
|
+
<annex id="P" inline-header="false" obligation="normative">
|
127
|
+
<title>Annex</title>
|
128
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
129
|
+
<title>A.1
|
130
|
+
<tab/>
|
131
|
+
Annex A.1</title>
|
132
|
+
</clause>
|
133
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
134
|
+
<title>Appendix 1
|
135
|
+
<tab/>
|
136
|
+
An Appendix</title>
|
137
|
+
</appendix>
|
138
|
+
</annex>
|
139
|
+
</iso-standard>
|
116
140
|
INPUT
|
117
|
-
|
118
|
-
|
141
|
+
|
142
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
143
|
+
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
144
|
+
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
145
|
+
|
119
146
|
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
147
|
+
<div class="WordSection3">
|
148
|
+
<p class="zzSTDTitle1"/>
|
149
|
+
<p class="MsoNormal">
|
150
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
151
|
+
</p>
|
152
|
+
<div class="Section3">
|
153
|
+
<a id="P" name="P"/>
|
154
|
+
<h1 class="Annex">Annex</h1>
|
155
|
+
<div>
|
156
|
+
<a id="Q" name="Q"/>
|
157
|
+
<p class="h2Annex">A.1
|
158
|
+
<span style="mso-tab-count:1"> </span>
|
159
|
+
Annex A.1</p>
|
160
|
+
</div>
|
161
|
+
<div>
|
162
|
+
<a id="Q2" name="Q2"/>
|
163
|
+
<p class="h2Annex">Appendix 1
|
164
|
+
<span style="mso-tab-count:1"> </span>
|
165
|
+
An Appendix</p>
|
166
|
+
</div>
|
167
|
+
</div>
|
168
|
+
</div>
|
133
169
|
OUTPUT
|
134
170
|
end
|
135
171
|
|
136
172
|
it "populates Word template with terms reference labels" do
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<term id="paddy1">
|
145
|
-
<name>1.1</name>
|
146
|
-
<preferred>paddy</preferred>
|
147
|
-
<definition
|
148
|
-
<
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</
|
154
|
-
|
155
|
-
|
156
|
-
</
|
157
|
-
</
|
158
|
-
|
173
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
174
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
175
|
+
<sections>
|
176
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
177
|
+
<title>1
|
178
|
+
<tab/>
|
179
|
+
Terms and Definitions</title>
|
180
|
+
<term id="paddy1">
|
181
|
+
<name>1.1</name>
|
182
|
+
<preferred>paddy</preferred>
|
183
|
+
<definition>
|
184
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
185
|
+
</definition>
|
186
|
+
<termsource status="modified">
|
187
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
188
|
+
<locality type="clause">
|
189
|
+
<referenceFrom>3.1</referenceFrom>
|
190
|
+
</locality>ISO 7301:2011, 3.1</origin>
|
191
|
+
<modification>
|
192
|
+
<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>
|
193
|
+
</modification>
|
194
|
+
</termsource>
|
195
|
+
</term>
|
196
|
+
</terms>
|
197
|
+
</sections>
|
198
|
+
</iso-standard>
|
159
199
|
INPUT
|
160
|
-
|
161
|
-
|
200
|
+
|
201
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
202
|
+
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
203
|
+
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
204
|
+
|
162
205
|
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
206
|
+
<div class="WordSection3">
|
207
|
+
<p class="zzSTDTitle1"/>
|
208
|
+
<div>
|
209
|
+
<a id="_terms_and_definitions" name="_terms_and_definitions"/>
|
210
|
+
<h1>1
|
211
|
+
<span style="mso-tab-count:1"> </span>
|
212
|
+
Terms and Definitions</h1>
|
213
|
+
<p class="TermNum">
|
214
|
+
<a id="paddy1" name="paddy1"/>1.1</p>
|
215
|
+
<p class="Terms" style="text-align:left;">paddy</p>
|
216
|
+
<p class="MsoNormal">
|
217
|
+
<a id="_eb29b35e-123e-4d1c-b50b-2714d41e747f" name="_eb29b35e-123e-4d1c-b50b-2714d41e747f"/>rice retaining its husk after threshing</p>
|
218
|
+
<p class="MsoNormal">[SOURCE:
|
219
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
220
|
+
, modified — The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
|
221
|
+
</div>
|
222
|
+
</div>
|
170
223
|
OUTPUT
|
171
224
|
end
|
172
225
|
|
173
226
|
it "populates Word header" do
|
174
|
-
|
175
|
-
|
176
|
-
<
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
</docidentifier>
|
227
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS_HEADER_HTML.dup).convert("test", <<~"INPUT", false)
|
228
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
229
|
+
<bibdata type="article">
|
230
|
+
<docidentifier>
|
231
|
+
<project-number part="1">1000</project-number>
|
232
|
+
</docidentifier>
|
181
233
|
</bibdata>
|
182
|
-
</iso-standard>
|
183
|
-
|
234
|
+
</iso-standard>
|
184
235
|
INPUT
|
185
|
-
word = File.read("test.doc", encoding: "UTF-8")
|
186
|
-
|
187
|
-
#expect(word).to include(%{Content-Location: file:///C:/Doc/test_files/header.html\nContent-Transfer-Encoding: base64\nContent-Type: text/html charset="utf-8" })
|
188
|
-
expect(word).to include(%{Content-Location: file:///C:/Doc/test_files/header.html})
|
236
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
237
|
+
expect(word).to include('Content-Disposition: inline; filename="header.html"')
|
189
238
|
end
|
190
239
|
|
191
240
|
it "populates Word ToC" do
|
192
|
-
|
193
|
-
|
194
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
241
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup).convert("test", <<~"INPUT", false)
|
242
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
195
243
|
<sections>
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
244
|
+
<clause id="A" inline-header="false" obligation="normative">
|
245
|
+
<title>1
|
246
|
+
<tab/>
|
247
|
+
Clause 4</title>
|
248
|
+
<clause id="N" inline-header="false" obligation="normative">
|
249
|
+
<title>1.1
|
250
|
+
<tab/>
|
251
|
+
Introduction
|
252
|
+
<bookmark id="Q"/>
|
253
|
+
to this
|
254
|
+
<fn reference="1">
|
255
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
256
|
+
</title>
|
257
|
+
</clause>
|
258
|
+
<clause id="O" inline-header="false" obligation="normative">
|
259
|
+
<title>1.2
|
260
|
+
<tab/>
|
261
|
+
Clause 4.2</title>
|
262
|
+
<p>A
|
263
|
+
<fn reference="1">
|
264
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
265
|
+
</p>
|
266
|
+
</clause>
|
267
|
+
</clause>
|
208
268
|
</sections>
|
209
|
-
|
210
|
-
|
269
|
+
</iso-standard>
|
211
270
|
INPUT
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
271
|
+
|
272
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
273
|
+
.sub(/^.*An empty word intro page\./m, "")
|
274
|
+
.sub(%r{</div>.*$}m, "</div>")
|
275
|
+
|
276
|
+
expect(xmlpp("<div>#{word.gsub(/_Toc\d\d+/, '_Toc')}")).to be_equivalent_to xmlpp(<<~'OUTPUT')
|
277
|
+
<div>
|
278
|
+
<p class="MsoToc1">
|
279
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
280
|
+
<span style="mso-element:field-begin"/>
|
281
|
+
<span style="mso-spacerun:yes"> </span>TOC
|
282
|
+
\o "1-3" \h \z \u
|
283
|
+
<span style="mso-element:field-separator"/></span>
|
284
|
+
<span class="MsoHyperlink">
|
285
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
286
|
+
<a href="#_Toc">1 Clause 4
|
287
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
288
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
289
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
290
|
+
<span style="mso-element:field-begin"/>
|
291
|
+
</span>
|
292
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
293
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
294
|
+
<span style="mso-element:field-separator"/>
|
295
|
+
</span>
|
296
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
297
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
298
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
299
|
+
<span style="mso-element:field-end"/>
|
300
|
+
</span>
|
301
|
+
</a>
|
302
|
+
</span>
|
303
|
+
</span>
|
304
|
+
</p>
|
305
|
+
<p class="MsoToc2">
|
306
|
+
<span class="MsoHyperlink">
|
307
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
308
|
+
<a href="#_Toc">1.1 Introduction to this
|
309
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
310
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
311
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
312
|
+
<span style="mso-element:field-begin"/>
|
313
|
+
</span>
|
314
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
315
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
316
|
+
<span style="mso-element:field-separator"/>
|
317
|
+
</span>
|
318
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
319
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
320
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
321
|
+
<span style="mso-element:field-end"/>
|
322
|
+
</span>
|
323
|
+
</a>
|
324
|
+
</span>
|
325
|
+
</span>
|
326
|
+
</p>
|
327
|
+
<p class="MsoToc2">
|
328
|
+
<span class="MsoHyperlink">
|
329
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
330
|
+
<a href="#_Toc">1.2 Clause 4.2
|
331
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
332
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
333
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
334
|
+
<span style="mso-element:field-begin"/>
|
335
|
+
</span>
|
336
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
337
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
338
|
+
<span style="mso-element:field-separator"/>
|
339
|
+
</span>
|
340
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
341
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
342
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
343
|
+
<span style="mso-element:field-end"/>
|
344
|
+
</span>
|
345
|
+
</a>
|
346
|
+
</span>
|
347
|
+
</span>
|
348
|
+
</p>
|
349
|
+
<p class="MsoToc1">
|
350
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
351
|
+
<span style="mso-element:field-end"/>
|
352
|
+
</span>
|
353
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
354
|
+
<p class="MsoNormal"> </p>
|
355
|
+
</span>
|
356
|
+
</p>
|
357
|
+
<p class="MsoNormal"> </p>
|
358
|
+
</div>
|
266
359
|
OUTPUT
|
267
360
|
end
|
268
361
|
|
269
362
|
it "reorders footnote numbers" do
|
270
|
-
FileUtils.rm_f "test.html"
|
271
363
|
input = <<~INPUT
|
272
|
-
|
364
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
273
365
|
<sections>
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
</fn
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
</
|
287
|
-
|
366
|
+
<clause id="A" inline-header="false" obligation="normative">
|
367
|
+
<title>1
|
368
|
+
<tab/>
|
369
|
+
Clause 4</title>
|
370
|
+
<fn reference="3">
|
371
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">This is a footnote.</p>
|
372
|
+
</fn>
|
373
|
+
<clause id="N" inline-header="false" obligation="normative">
|
374
|
+
<title>1.1 <tab/>
|
375
|
+
Introduction to this
|
376
|
+
<fn reference="2">
|
377
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
378
|
+
</title>
|
379
|
+
</clause>
|
380
|
+
<clause id="O" inline-header="false" obligation="normative">
|
381
|
+
<title>1.2 <tab/>
|
382
|
+
Clause 4.2</title>
|
383
|
+
<p>A
|
384
|
+
<fn reference="1">
|
385
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
386
|
+
</p>
|
387
|
+
</clause>
|
388
|
+
</clause>
|
288
389
|
</sections>
|
289
|
-
|
390
|
+
</iso-standard>
|
290
391
|
INPUT
|
291
|
-
|
292
|
-
|
293
|
-
|
392
|
+
|
393
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS_WORDINTRO.dup).convert("test", input, false)
|
394
|
+
|
395
|
+
html = File.read("test.html", encoding: "UTF-8")
|
396
|
+
.sub(/^.*<main class="main-section">/m, '<main xmlns:epub="epub" class="main-section">')
|
397
|
+
.sub(%r{</main>.*$}m, "</main>")
|
398
|
+
|
294
399
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
400
|
+
<main class="main-section" xmlns:epub="epub">
|
401
|
+
<button id="myBtn" onclick="topFunction()" title="Go to top">Top</button>
|
402
|
+
<p class="zzSTDTitle1"/>
|
403
|
+
<div id="A">
|
404
|
+
<h1 id="toc0">1   Clause 4</h1>
|
405
|
+
<a class="FootnoteRef" href="#fn:3" id="fnref:1">
|
406
|
+
<sup>1)</sup>
|
407
|
+
</a>
|
408
|
+
<div id="N">
|
409
|
+
<h2 id="toc1">1.1   Introduction to this
|
410
|
+
<a class="FootnoteRef" href="#fn:2" id="fnref:2">
|
411
|
+
<sup>2)</sup></a>
|
412
|
+
</h2>
|
413
|
+
</div>
|
414
|
+
<div id="O">
|
415
|
+
<h2 id="toc2">1.2   Clause 4.2</h2>
|
416
|
+
<p>A
|
417
|
+
<a class="FootnoteRef" href="#fn:2">
|
418
|
+
<sup>2)</sup></a>
|
419
|
+
</p>
|
420
|
+
</div>
|
421
|
+
</div>
|
422
|
+
<aside class="footnote" id="fn:3">
|
423
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">
|
424
|
+
<a class="FootnoteRef" href="#fn:3">
|
425
|
+
<sup>1)</sup>
|
426
|
+
</a>This is a footnote.</p>
|
427
|
+
<a href="#fnref:1">↩</a>
|
428
|
+
</aside>
|
429
|
+
<aside class="footnote" id="fn:2">
|
430
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">
|
431
|
+
<a class="FootnoteRef" href="#fn:2">
|
432
|
+
<sup>2)</sup>
|
433
|
+
</a>Formerly denoted as 15 % (m/m).</p>
|
434
|
+
<a href="#fnref:2">↩</a>
|
435
|
+
</aside>
|
436
|
+
</main>
|
321
437
|
OUTPUT
|
322
438
|
|
323
|
-
|
324
|
-
|
325
|
-
html = File.read("test.doc", encoding: "UTF-8")
|
326
|
-
sub(
|
439
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup).convert("test", input, false)
|
440
|
+
|
441
|
+
html = File.read("test.doc", encoding: "UTF-8")
|
442
|
+
.sub(/^.*<div class="WordSection3"/m, '<body xmlns:epub="epub"><div class="WordSection3"')
|
443
|
+
.sub(%r{</body>.*$}m, "</body>").gsub(/mso-bookmark:_Ref\d+/, "mso-bookmark:_Ref")
|
444
|
+
|
327
445
|
expect(xmlpp(html)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
<div style='mso-element:footnote' id='ftn3'>
|
411
|
-
<p class='MsoFootnoteText'>
|
412
|
-
<a name='_ff27c067-2785-4551-96cf-0a73530ff1e6' id='_ff27c067-2785-4551-96cf-0a73530ff1e6'/>
|
413
|
-
<a style='mso-footnote-id:ftn3' href='#_ftn3' name='_ftnref3' title='' id='_ftnref3'>
|
414
|
-
<span class='MsoFootnoteReference'>
|
415
|
-
<span style='mso-special-character:footnote'/>
|
416
|
-
</span>
|
417
|
-
<span class='MsoFootnoteReference'>)</span>
|
418
|
-
</a>
|
419
|
-
Formerly denoted as 15 % (m/m).
|
420
|
-
</p>
|
421
|
-
</div>
|
422
|
-
</div>
|
423
|
-
</body>
|
446
|
+
<body xmlns:epub="epub">
|
447
|
+
<div class="WordSection3">
|
448
|
+
<p class="zzSTDTitle1"/>
|
449
|
+
<div>
|
450
|
+
<a id="A" name="A"/>
|
451
|
+
<h1>1
|
452
|
+
<span style="mso-tab-count:1"> </span>
|
453
|
+
Clause 4</h1>
|
454
|
+
<span style="mso-bookmark:_Ref">
|
455
|
+
<a class="FootnoteRef" epub:type="footnote" href="#_ftn1" id="_ftnref1" name="_ftnref1" style="mso-footnote-id:ftn1" title="">
|
456
|
+
<span class="MsoFootnoteReference">
|
457
|
+
<span style="mso-special-character:footnote"/>
|
458
|
+
</span>
|
459
|
+
<span class="MsoFootnoteReference">)</span>
|
460
|
+
</a>
|
461
|
+
</span>
|
462
|
+
<div>
|
463
|
+
<a id="N" name="N"/>
|
464
|
+
<h2>1.1
|
465
|
+
<span style="mso-tab-count:1"> </span>
|
466
|
+
Introduction to this
|
467
|
+
<span style="mso-bookmark:_Ref">
|
468
|
+
<a class="FootnoteRef" epub:type="footnote" href="#_ftn2" id="_ftnref2" name="_ftnref2" style="mso-footnote-id:ftn2" title="">
|
469
|
+
<span class="MsoFootnoteReference">
|
470
|
+
<span style="mso-special-character:footnote"/></span>
|
471
|
+
<span class="MsoFootnoteReference">)</span>
|
472
|
+
</a>
|
473
|
+
</span>
|
474
|
+
</h2>
|
475
|
+
</div>
|
476
|
+
<div>
|
477
|
+
<a id="O" name="O"/>
|
478
|
+
<h2>1.2
|
479
|
+
<span style="mso-tab-count:1"> </span>
|
480
|
+
Clause 4.2</h2>
|
481
|
+
<p class="MsoNormal">A
|
482
|
+
<span style="mso-bookmark:_Ref">
|
483
|
+
<a class="FootnoteRef" epub:type="footnote" href="#_ftn3" id="_ftnref3" name="_ftnref3" style="mso-footnote-id:ftn3" title="">
|
484
|
+
<span class="MsoFootnoteReference">
|
485
|
+
<span style="mso-special-character:footnote"/></span>
|
486
|
+
<span class="MsoFootnoteReference">)</span>
|
487
|
+
</a>
|
488
|
+
</span>
|
489
|
+
</p>
|
490
|
+
</div>
|
491
|
+
</div>
|
492
|
+
</div>
|
493
|
+
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
494
|
+
<div class="colophon"/>
|
495
|
+
<div style="mso-element:footnote-list">
|
496
|
+
<div id="ftn1" style="mso-element:footnote">
|
497
|
+
<p class="MsoFootnoteText">
|
498
|
+
<a id="_ff27c067-2785-4551-96cf-0a73530ff1e6" name="_ff27c067-2785-4551-96cf-0a73530ff1e6"/>
|
499
|
+
<a href="#_ftn1" id="_ftnref1" name="_ftnref1" style="mso-footnote-id:ftn1" title="">
|
500
|
+
<span class="MsoFootnoteReference">
|
501
|
+
<span style="mso-special-character:footnote"/>
|
502
|
+
</span>
|
503
|
+
<span class="MsoFootnoteReference">)</span>
|
504
|
+
</a>This is a footnote.</p>
|
505
|
+
</div>
|
506
|
+
<div id="ftn2" style="mso-element:footnote">
|
507
|
+
<p class="MsoFootnoteText">
|
508
|
+
<a id="_ff27c067-2785-4551-96cf-0a73530ff1e6" name="_ff27c067-2785-4551-96cf-0a73530ff1e6"/>
|
509
|
+
<a href="#_ftn2" id="_ftnref2" name="_ftnref2" style="mso-footnote-id:ftn2" title="">
|
510
|
+
<span class="MsoFootnoteReference">
|
511
|
+
<span style="mso-special-character:footnote"/>
|
512
|
+
</span>
|
513
|
+
<span class="MsoFootnoteReference">)</span>
|
514
|
+
</a>Formerly denoted as 15 % (m/m).</p>
|
515
|
+
</div>
|
516
|
+
<div id="ftn3" style="mso-element:footnote">
|
517
|
+
<p class="MsoFootnoteText">
|
518
|
+
<a id="_ff27c067-2785-4551-96cf-0a73530ff1e6" name="_ff27c067-2785-4551-96cf-0a73530ff1e6"/>
|
519
|
+
<a href="#_ftn3" id="_ftnref3" name="_ftnref3" style="mso-footnote-id:ftn3" title="">
|
520
|
+
<span class="MsoFootnoteReference">
|
521
|
+
<span style="mso-special-character:footnote"/>
|
522
|
+
</span>
|
523
|
+
<span class="MsoFootnoteReference">)</span>
|
524
|
+
</a>Formerly denoted as 15 % (m/m).</p>
|
525
|
+
</div>
|
526
|
+
</div>
|
527
|
+
</body>
|
424
528
|
OUTPUT
|
425
529
|
end
|
426
530
|
|
427
|
-
|
428
531
|
it "processes IsoXML terms for HTML" do
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
<
|
437
|
-
<
|
438
|
-
<
|
439
|
-
<
|
440
|
-
|
441
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
</termexample>
|
447
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
</termexample>
|
452
|
-
|
453
|
-
<
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
<
|
464
|
-
<
|
465
|
-
<
|
466
|
-
<
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
</
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
<
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
<
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
</
|
483
|
-
</
|
532
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
533
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
534
|
+
<sections>
|
535
|
+
<terms id="_terms_and_definitions" obligation="normative">
|
536
|
+
<title>Terms and Definitions</title>
|
537
|
+
<term id="paddy1">
|
538
|
+
<name>1.1</name>
|
539
|
+
<preferred>paddy</preferred>
|
540
|
+
<domain>rice</domain>
|
541
|
+
<definition>
|
542
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
543
|
+
</definition>
|
544
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
545
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
546
|
+
<ul>
|
547
|
+
<li>A</li>
|
548
|
+
</ul>
|
549
|
+
</termexample>
|
550
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
551
|
+
<ul>
|
552
|
+
<li>A</li>
|
553
|
+
</ul>
|
554
|
+
</termexample>
|
555
|
+
<termsource status="modified">
|
556
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
557
|
+
<locality type="clause">
|
558
|
+
<referenceFrom>3.1</referenceFrom>
|
559
|
+
</locality>
|
560
|
+
</origin>
|
561
|
+
<modification>
|
562
|
+
<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>
|
563
|
+
</modification>
|
564
|
+
</termsource>
|
565
|
+
</term>
|
566
|
+
<term id="paddy">
|
567
|
+
<name>1.2</name>
|
568
|
+
<preferred>paddy</preferred>
|
569
|
+
<admitted>paddy rice</admitted>
|
570
|
+
<admitted>rough rice</admitted>
|
571
|
+
<deprecates>cargo rice</deprecates>
|
572
|
+
<definition>
|
573
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
574
|
+
</definition>
|
575
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
576
|
+
<ul>
|
577
|
+
<li>A</li>
|
578
|
+
</ul>
|
579
|
+
</termexample>
|
580
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
581
|
+
<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>
|
582
|
+
</termnote>
|
583
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
584
|
+
<ul>
|
585
|
+
<li>A</li>
|
586
|
+
</ul>
|
587
|
+
<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>
|
588
|
+
</termnote>
|
589
|
+
<termsource status="identical">
|
590
|
+
<origin bibitemid="ISO7301" citeas="ISO 7301:2011" type="inline">
|
591
|
+
<locality type="clause">
|
592
|
+
<referenceFrom>3.1</referenceFrom>
|
593
|
+
</locality>
|
594
|
+
</origin>
|
595
|
+
</termsource>
|
596
|
+
</term>
|
597
|
+
</terms>
|
598
|
+
</sections>
|
599
|
+
</iso-standard>
|
484
600
|
INPUT
|
485
601
|
expect(File.exist?("test.html")).to be true
|
486
602
|
html = File.read("test.html", encoding: "UTF-8")
|
@@ -488,296 +604,360 @@ RSpec.describe IsoDoc do
|
|
488
604
|
expect(html).to match(%r{<h2 class="TermNum" id="paddy">1\.2</h2>})
|
489
605
|
end
|
490
606
|
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
</
|
503
|
-
</annex>
|
504
|
-
</iso-standard>
|
607
|
+
it "inserts default paragraph between two tables for Word" do
|
608
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
609
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
610
|
+
<annex id="P" inline-header="false" obligation="normative">
|
611
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851c">
|
612
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c968">'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
613
|
+
</example>
|
614
|
+
<example id="_63112cbc-cde0-435f-9553-e0b8c4f5851d">
|
615
|
+
<p id="_158d4efa-b1c9-4aec-b325-756de8e4c969">'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
616
|
+
</example>
|
617
|
+
</annex>
|
618
|
+
</iso-standard>
|
505
619
|
INPUT
|
506
|
-
word = File.read("test.doc", encoding: "UTF-8")
|
507
|
-
sub(
|
620
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
621
|
+
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
622
|
+
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
508
623
|
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
624
|
+
<div class="WordSection3">
|
625
|
+
<p class="zzSTDTitle1"/>
|
626
|
+
<p class="MsoNormal">
|
627
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
628
|
+
</p>
|
629
|
+
<div class="Section3">
|
630
|
+
<a id="P" name="P"/>
|
631
|
+
<div class="example">
|
632
|
+
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851c" name="_63112cbc-cde0-435f-9553-e0b8c4f5851c"/>
|
633
|
+
<p class="example">
|
634
|
+
<span style="mso-tab-count:1"> </span>'1M', '01M', and '0001M' all describe the calendar month January.</p>
|
635
|
+
</div>
|
636
|
+
<div class="example">
|
637
|
+
<a id="_63112cbc-cde0-435f-9553-e0b8c4f5851d" name="_63112cbc-cde0-435f-9553-e0b8c4f5851d"/>
|
638
|
+
<p class="example">
|
639
|
+
<span style="mso-tab-count:1"> </span>'2M', '02M', and '0002M' all describe the calendar month February.</p>
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
</div>
|
523
643
|
OUTPUT
|
524
644
|
end
|
525
645
|
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
IsoDoc::Iso::WordConvert.new({wordstylesheet: "spec/assets/word.css", htmlstylesheet: "spec/assets/html.css"}).convert("test", <<~"INPUT", false)
|
530
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
646
|
+
it "processes figure keys (Word)" do
|
647
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", <<~"INPUT", false)
|
648
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
531
649
|
<annex id="P" inline-header="false" obligation="normative">
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
650
|
+
<figure id="samplecode">
|
651
|
+
<p>Hello</p>
|
652
|
+
<p>Key</p>
|
653
|
+
<dl>
|
654
|
+
<dt>
|
655
|
+
<p>A</p>
|
656
|
+
</dt>
|
657
|
+
<dd>
|
658
|
+
<p>B</p>
|
659
|
+
</dd>
|
660
|
+
</dl>
|
661
|
+
</figure>
|
662
|
+
</annex>
|
663
|
+
</iso-standard>
|
542
664
|
INPUT
|
543
|
-
word = File.read("test.doc", encoding: "UTF-8")
|
544
|
-
sub(
|
665
|
+
word = File.read("test.doc", encoding: "UTF-8")
|
666
|
+
.sub(/^.*<div class="WordSection3">/m, '<div class="WordSection3">')
|
667
|
+
.sub(%r{<br[^>]*>\s*<div class="colophon".*$}m, "")
|
545
668
|
expect(xmlpp(word)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
669
|
+
<div class="WordSection3">
|
670
|
+
<p class="zzSTDTitle1"/>
|
671
|
+
<p class="MsoNormal">
|
672
|
+
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
673
|
+
</p>
|
674
|
+
<div class="Section3">
|
675
|
+
<a id="P" name="P"/>
|
676
|
+
<div class="figure">
|
677
|
+
<a id="samplecode" name="samplecode"/>
|
678
|
+
<p class="MsoNormal">Hello</p>
|
679
|
+
<p class="MsoNormal">Key</p>
|
680
|
+
<p class="MsoNormal" style="page-break-after:avoid;">
|
681
|
+
<b>Key</b>
|
682
|
+
</p>
|
683
|
+
<div class="figdl" style="page-break-after:avoid;">
|
684
|
+
<table class="figdl">
|
685
|
+
<tr>
|
686
|
+
<td align="left" valign="top">
|
687
|
+
<p align="left" class="MsoNormal" style="margin-left:0pt;text-align:left;">
|
688
|
+
<p class="MsoNormal">A</p>
|
689
|
+
</p>
|
690
|
+
</td>
|
691
|
+
<td valign="top">
|
692
|
+
<p class="MsoNormal">B</p>
|
693
|
+
</td>
|
694
|
+
</tr>
|
695
|
+
</table>
|
696
|
+
</div>
|
697
|
+
<p class="FigureTitle" style="text-align:center;"/>
|
698
|
+
</div>
|
699
|
+
</div>
|
700
|
+
</div>
|
560
701
|
OUTPUT
|
561
702
|
end
|
562
703
|
|
563
|
-
|
564
|
-
|
565
|
-
|
704
|
+
it "processes boilerplate" do
|
705
|
+
input = <<~INPUT
|
706
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
566
707
|
<bibdata type="standard">
|
567
|
-
|
708
|
+
<status>
|
709
|
+
<stage>30</stage>
|
710
|
+
</status>
|
568
711
|
</bibdata>
|
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
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
relevant patent rights of which they are aware and to provide supporting
|
605
|
-
documentation.</p>
|
606
|
-
</clause>
|
607
|
-
</license-statement>
|
608
|
-
|
609
|
-
</boilerplate>
|
610
|
-
</iso-standard>
|
712
|
+
<boilerplate>
|
713
|
+
<copyright-statement>
|
714
|
+
<clause>
|
715
|
+
<p id="boilerplate-year">© ISO 2019, Published in Switzerland</p>
|
716
|
+
<p id="boilerplate-message">I am the Walrus.</p>
|
717
|
+
<p id="boilerplate-name">ISO copyright office</p>
|
718
|
+
<p align="left" id="boilerplate-address">ISO copyright office
|
719
|
+
<br/>
|
720
|
+
Ch. de Blandonnet 8 ?~@? CP 401
|
721
|
+
<br/>
|
722
|
+
CH-1214 Vernier, Geneva, Switzerland
|
723
|
+
<br/>
|
724
|
+
Tel. + 41 22 749 01 11
|
725
|
+
<br/>
|
726
|
+
Fax + 41 22 749 09 47
|
727
|
+
<br/>
|
728
|
+
copyright@iso.org
|
729
|
+
<br/>
|
730
|
+
www.iso.org</p>
|
731
|
+
</clause>
|
732
|
+
</copyright-statement>
|
733
|
+
<license-statement>
|
734
|
+
<clause>
|
735
|
+
<title>Warning for Stuff</title>
|
736
|
+
<p>This document is not an ISO International Standard. It is distributed for review and
|
737
|
+
comment. It is subject to change without notice and may not be referred to as
|
738
|
+
an International Standard.</p>
|
739
|
+
<p>Recipients
|
740
|
+
of this draft are invited to submit, with their comments, notification of any
|
741
|
+
relevant patent rights of which they are aware and to provide supporting
|
742
|
+
documentation.</p>
|
743
|
+
</clause>
|
744
|
+
</license-statement>
|
745
|
+
</boilerplate>
|
746
|
+
</iso-standard>
|
611
747
|
INPUT
|
612
748
|
|
613
749
|
presxml = <<~OUTPUT
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
</boilerplate>
|
659
|
-
</iso-standard>
|
750
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
751
|
+
<bibdata type="standard">
|
752
|
+
<status>
|
753
|
+
<stage language="">30</stage>
|
754
|
+
</status>
|
755
|
+
</bibdata>
|
756
|
+
<boilerplate>
|
757
|
+
<copyright-statement>
|
758
|
+
<clause inline-header="true">
|
759
|
+
<p id="boilerplate-year">© ISO 2019, Published in Switzerland
|
760
|
+
</p>
|
761
|
+
<p id="boilerplate-message">I am the Walrus.
|
762
|
+
</p>
|
763
|
+
<p id="boilerplate-name">ISO copyright office</p>
|
764
|
+
<p align="left" id="boilerplate-address">ISO copyright office
|
765
|
+
<br/>
|
766
|
+
Ch. de Blandonnet 8 ?~@? CP 401
|
767
|
+
<br/>
|
768
|
+
CH-1214 Vernier, Geneva, Switzerland
|
769
|
+
<br/>
|
770
|
+
Tel. + 41 22 749 01 11
|
771
|
+
<br/>
|
772
|
+
Fax + 41 22 749 09 47
|
773
|
+
<br/>
|
774
|
+
copyright@iso.org
|
775
|
+
<br/>
|
776
|
+
www.iso.org</p>
|
777
|
+
</clause>
|
778
|
+
</copyright-statement>
|
779
|
+
<license-statement>
|
780
|
+
<clause>
|
781
|
+
<title depth="1">Warning for Stuff</title>
|
782
|
+
<p>This document is not an ISO International Standard. It is distributed for review and
|
783
|
+
comment. It is subject to change without notice and may not be referred to as
|
784
|
+
an International Standard.</p>
|
785
|
+
<p>Recipients
|
786
|
+
of this draft are invited to submit, with their comments, notification of any
|
787
|
+
relevant patent rights of which they are aware and to provide supporting
|
788
|
+
documentation.</p>
|
789
|
+
</clause>
|
790
|
+
</license-statement>
|
791
|
+
</boilerplate>
|
792
|
+
</iso-standard>
|
660
793
|
OUTPUT
|
661
794
|
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
795
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new(WORD_HTML_CSS.dup)
|
796
|
+
.convert("test", input, true))
|
797
|
+
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
798
|
+
.to be_equivalent_to xmlpp(presxml)
|
799
|
+
|
800
|
+
IsoDoc::Iso::HtmlConvert.new(WORD_HTML_CSS.dup).convert("test", presxml, false)
|
801
|
+
|
666
802
|
word = File.read("test.html", encoding: "UTF-8")
|
667
803
|
expect((word)).to include '<h1 class="IntroTitle">Warning for Stuff</h1>'
|
668
804
|
expect((word)).to include "I am the Walrus."
|
669
|
-
|
805
|
+
|
806
|
+
IsoDoc::Iso::WordConvert.new(WORD_HTML_CSS.dup).convert("test", presxml, false)
|
670
807
|
word = File.read("test.doc", encoding: "UTF-8")
|
671
|
-
expect(xmlpp(word
|
672
|
-
<div class=
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
<p style='text-align:left;' align='left' class='zzAddress'>
|
687
|
-
<a name='boilerplate-address' id='boilerplate-address'/>
|
688
|
-
ISO copyright office
|
689
|
-
<br/>
|
808
|
+
expect(xmlpp(word
|
809
|
+
.sub(%r{^.*<div class="boilerplate-copyright">}m, '<div class="boilerplate-copyright">')
|
810
|
+
.sub(%r{</div>.*$}m, "</div></div>"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
811
|
+
<div class="boilerplate-copyright">
|
812
|
+
<div>
|
813
|
+
<p class="zzCopyright">
|
814
|
+
<a id="boilerplate-year" name="boilerplate-year"/>© ISO 2019, Published in Switzerland#{' '}</p>
|
815
|
+
<p class="zzCopyright1">
|
816
|
+
<a id="boilerplate-message" name="boilerplate-message"/>I am the Walrus.#{' '}</p>
|
817
|
+
<p class="zzCopyright">
|
818
|
+
<a id="boilerplate-name" name="boilerplate-name"/>ISO copyright office</p>
|
819
|
+
<p align="left" class="zzAddress" style="text-align:left;">
|
820
|
+
<a id="boilerplate-address" name="boilerplate-address"/>ISO copyright office
|
821
|
+
|
822
|
+
<br/>
|
690
823
|
Ch. de Blandonnet 8 ?~@? CP 401
|
691
|
-
|
824
|
+
|
825
|
+
<br/>
|
692
826
|
CH-1214 Vernier, Geneva, Switzerland
|
693
|
-
|
827
|
+
|
828
|
+
<br/>
|
694
829
|
Tel. + 41 22 749 01 11
|
695
|
-
|
830
|
+
|
831
|
+
<br/>
|
696
832
|
Fax + 41 22 749 09 47
|
697
|
-
|
833
|
+
|
834
|
+
<br/>
|
698
835
|
copyright@iso.org
|
699
|
-
<br/>
|
700
|
-
www.iso.org
|
701
|
-
</p>
|
702
|
-
</div>
|
703
|
-
</div>
|
704
|
-
OUTPUT
|
705
|
-
expect(word).to include '<p class="zzWarning">This document is not an ISO International Standard'
|
706
|
-
end
|
707
836
|
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
837
|
+
<br/>
|
838
|
+
www.iso.org#{' '}</p>
|
839
|
+
</div>
|
840
|
+
</div>
|
841
|
+
OUTPUT
|
842
|
+
expect(word).to include '<p class="zzWarning">This document is not an ISO International Standard'
|
843
|
+
end
|
844
|
+
|
845
|
+
it "populates Word ToC" do
|
846
|
+
IsoDoc::WordConvert.new(WORD_HTML_CSS_WORDINTRO.dup).convert("test", <<~"INPUT", false)
|
847
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
712
848
|
<sections>
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
</
|
723
|
-
<clause id="
|
724
|
-
<title>Clause 4.2
|
725
|
-
|
726
|
-
|
849
|
+
<clause id="A" inline-header="false" obligation="normative">
|
850
|
+
<title>Clause 4</title>
|
851
|
+
<clause id="N" inline-header="false" obligation="normative">
|
852
|
+
<title>Introduction
|
853
|
+
<bookmark id="Q"/>
|
854
|
+
to this
|
855
|
+
<fn reference="1">
|
856
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
857
|
+
</title>
|
858
|
+
</clause>
|
859
|
+
<clause id="O" inline-header="false" obligation="normative">
|
860
|
+
<title>Clause 4.2</title>
|
861
|
+
<p>A
|
862
|
+
<fn reference="1">
|
863
|
+
<p id="_ff27c067-2785-4551-96cf-0a73530ff1e6">Formerly denoted as 15 % (m/m).</p></fn>
|
864
|
+
</p>
|
865
|
+
<clause id="P" inline-header="false" obligation="normative">
|
866
|
+
<title>Clause 4.2.1</title>
|
867
|
+
</clause>
|
868
|
+
</clause>
|
869
|
+
</clause>
|
727
870
|
</sections>
|
728
|
-
|
871
|
+
</iso-standard>
|
729
872
|
INPUT
|
730
|
-
word = File.read("test.doc")
|
731
|
-
sub(
|
873
|
+
word = File.read("test.doc")
|
874
|
+
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
|
875
|
+
.sub(%r{<p class="MsoNormal">\s*<br clear="all" class="section"/>\s*</p>\s*<div class="WordSection3">.*$}m, "")
|
876
|
+
|
732
877
|
expect(xmlpp(word.gsub(/_Toc\d\d+/, "_Toc"))).to be_equivalent_to xmlpp(<<~'OUTPUT')
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
<span
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
878
|
+
<div class="WordSection2">An empty word intro page.
|
879
|
+
<p class="MsoToc1">
|
880
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
881
|
+
<span style="mso-element:field-begin"/>
|
882
|
+
<span style="mso-spacerun:yes"> </span>
|
883
|
+
TOC
|
884
|
+
\o "1-2" \h \z \u
|
885
|
+
<span style="mso-element:field-separator"/></span>
|
886
|
+
<span class="MsoHyperlink">
|
887
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
888
|
+
<a href="#_Toc">Clause 4
|
889
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
890
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
891
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
892
|
+
<span style="mso-element:field-begin"/>
|
893
|
+
</span>
|
894
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
895
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
896
|
+
<span style="mso-element:field-separator"/>
|
897
|
+
</span>
|
898
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
899
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
900
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
901
|
+
<span style="mso-element:field-end"/>
|
902
|
+
</span>
|
903
|
+
</a>
|
904
|
+
</span>
|
905
|
+
</span>
|
906
|
+
</p>
|
907
|
+
<p class="MsoToc2">
|
908
|
+
<span class="MsoHyperlink">
|
909
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
910
|
+
<a href="#_Toc">Introduction to this
|
911
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
912
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
913
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
914
|
+
<span style="mso-element:field-begin"/>
|
915
|
+
</span>
|
916
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
917
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
918
|
+
<span style="mso-element:field-separator"/>
|
919
|
+
</span>
|
920
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
921
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
922
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
923
|
+
<span style="mso-element:field-end"/>
|
924
|
+
</span>
|
925
|
+
</a>
|
926
|
+
</span>
|
927
|
+
</span>
|
928
|
+
</p>
|
929
|
+
<p class="MsoToc2">
|
930
|
+
<span class="MsoHyperlink">
|
931
|
+
<span lang="EN-GB" style="mso-no-proof:yes" xml:lang="EN-GB">
|
932
|
+
<a href="#_Toc">Clause 4.2
|
933
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
934
|
+
<span style="mso-tab-count:1 dotted">. </span></span>
|
935
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
936
|
+
<span style="mso-element:field-begin"/>
|
937
|
+
</span>
|
938
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">PAGEREF _Toc \h </span>
|
939
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
940
|
+
<span style="mso-element:field-separator"/>
|
941
|
+
</span>
|
942
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">1</span>
|
943
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB"/>
|
944
|
+
<span class="MsoTocTextSpan" lang="EN-GB" xml:lang="EN-GB">
|
945
|
+
<span style="mso-element:field-end"/>
|
946
|
+
</span>
|
947
|
+
</a>
|
948
|
+
</span>
|
949
|
+
</span>
|
950
|
+
</p>
|
951
|
+
<p class="MsoToc1">
|
952
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
953
|
+
<span style="mso-element:field-end"/>
|
954
|
+
</span>
|
955
|
+
<span lang="EN-GB" xml:lang="EN-GB">
|
956
|
+
<p class="MsoNormal"> </p>
|
957
|
+
</span>
|
958
|
+
</p>
|
959
|
+
<p class="MsoNormal"> </p>
|
960
|
+
</div>
|
780
961
|
OUTPUT
|
781
962
|
end
|
782
|
-
|
783
963
|
end
|