isodoc 2.1.0.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/isodoc.gemspec +6 -3
- data/lib/isodoc/base_style/blocks.scss +7 -0
- data/lib/isodoc/class_utils.rb +1 -1
- data/lib/isodoc/function/blocks.rb +1 -1
- data/lib/isodoc/function/cleanup.rb +1 -1
- data/lib/isodoc/function/inline.rb +4 -2
- data/lib/isodoc/function/lists.rb +24 -9
- data/lib/isodoc/function/table.rb +1 -1
- data/lib/isodoc/function/to_word_html.rb +3 -2
- data/lib/isodoc/function/utils.rb +18 -8
- data/lib/isodoc/gem_tasks.rb +19 -10
- data/lib/isodoc/html_function/html.rb +2 -2
- data/lib/isodoc/i18n.rb +19 -0
- data/lib/isodoc/metadata.rb +2 -2
- data/lib/isodoc/presentation_function/block.rb +3 -3
- data/lib/isodoc/presentation_function/image.rb +1 -1
- data/lib/isodoc/presentation_function/inline.rb +13 -6
- data/lib/isodoc/presentation_function/section.rb +3 -1
- data/lib/isodoc/presentation_function/xrefs.rb +22 -6
- data/lib/isodoc/presentation_xml_convert.rb +1 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/word_function/body.rb +9 -6
- data/lib/isodoc/word_function/postprocess.rb +1 -1
- data/lib/isodoc/word_function/postprocess_cover.rb +5 -5
- data/lib/isodoc/xref/xref_gen.rb +4 -4
- metadata +5 -66
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.hound.yml +0 -5
- data/.oss-guides.rubocop.yml +0 -1077
- data/.rubocop.yml +0 -10
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.scss +0 -20
- data/spec/assets/html_override.css +0 -1
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -41
- data/spec/assets/iso.xml +0 -8
- data/spec/assets/odf.emf +0 -0
- data/spec/assets/odf.svg +0 -1
- data/spec/assets/odf1.svg +0 -4
- data/spec/assets/outputtest/a.xml +0 -66
- data/spec/assets/outputtest/iso.international-standard.xsl +0 -3011
- data/spec/assets/rice_image1 +0 -0
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/scripts_override.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/word_override.css +0 -1
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/isodoc/blocks_spec.rb +0 -2934
- data/spec/isodoc/cleanup_spec.rb +0 -1056
- data/spec/isodoc/footnotes_spec.rb +0 -264
- data/spec/isodoc/form_spec.rb +0 -160
- data/spec/isodoc/i18n_spec.rb +0 -1201
- data/spec/isodoc/inline_spec.rb +0 -2301
- data/spec/isodoc/lists_spec.rb +0 -469
- data/spec/isodoc/metadata_spec.rb +0 -401
- data/spec/isodoc/postproc_spec.rb +0 -2941
- data/spec/isodoc/presentation_xml_spec.rb +0 -1476
- data/spec/isodoc/ref_spec.rb +0 -955
- data/spec/isodoc/section_spec.rb +0 -2123
- data/spec/isodoc/table_spec.rb +0 -588
- data/spec/isodoc/terms_spec.rb +0 -712
- data/spec/isodoc/utils_spec.rb +0 -57
- data/spec/isodoc/xref_numbering_spec.rb +0 -378
- data/spec/isodoc/xref_spec.rb +0 -1837
- data/spec/isodoc/xslfo_convert_spec.rb +0 -103
- data/spec/spec_helper.rb +0 -81
data/spec/isodoc/xref_spec.rb
DELETED
@@ -1,1837 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
RSpec.describe IsoDoc do
|
4
|
-
it "cross-references external documents" do
|
5
|
-
input = <<~INPUT
|
6
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
-
<preface>
|
8
|
-
<foreword>
|
9
|
-
<p>
|
10
|
-
<xref target="a#b"/>
|
11
|
-
</p>
|
12
|
-
</foreword>
|
13
|
-
</preface>
|
14
|
-
</iso-standard
|
15
|
-
INPUT
|
16
|
-
presxml = <<~OUTPUT
|
17
|
-
<?xml version='1.0'?>
|
18
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
19
|
-
<preface>
|
20
|
-
<foreword displayorder='1'>
|
21
|
-
<p>
|
22
|
-
<xref target='a#b'>a#b</xref>
|
23
|
-
</p>
|
24
|
-
</foreword>
|
25
|
-
</preface>
|
26
|
-
</iso-standard>
|
27
|
-
OUTPUT
|
28
|
-
html = <<~OUTPUT
|
29
|
-
#{HTML_HDR}
|
30
|
-
<br/>
|
31
|
-
<div>
|
32
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
33
|
-
<p>
|
34
|
-
<a href="a.html#b">a#b</a>
|
35
|
-
</p>
|
36
|
-
</div>
|
37
|
-
<p class="zzSTDTitle1"/>
|
38
|
-
</div>
|
39
|
-
</body>
|
40
|
-
</html>
|
41
|
-
OUTPUT
|
42
|
-
doc = <<~OUTPUT
|
43
|
-
<div class="WordSection2">
|
44
|
-
<p><br clear="all" style="mso-special-character:line-break;page-break-before:always"/></p>
|
45
|
-
<div>
|
46
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
47
|
-
<p>
|
48
|
-
<a href="a.doc#b">a#b</a>
|
49
|
-
</p>
|
50
|
-
</div></div>
|
51
|
-
OUTPUT
|
52
|
-
expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
|
53
|
-
.convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
|
54
|
-
expect(xmlpp(IsoDoc::HtmlConvert.new({})
|
55
|
-
.convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
56
|
-
expect(xmlpp(IsoDoc::WordConvert.new({})
|
57
|
-
.convert("test", presxml, true)
|
58
|
-
.sub(/^.*<div class="WordSection2">/m, '<div class="WordSection2">')
|
59
|
-
.sub(%r{</div>.*$}m, "</div></div>"))).to be_equivalent_to xmlpp(doc)
|
60
|
-
end
|
61
|
-
|
62
|
-
it "warns of missing crossreference" do
|
63
|
-
i = <<~INPUT
|
64
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
65
|
-
<preface>
|
66
|
-
<foreword>
|
67
|
-
<p>
|
68
|
-
<xref target="N1"/>
|
69
|
-
</preface>
|
70
|
-
</iso-standard>
|
71
|
-
INPUT
|
72
|
-
expect { IsoDoc::PresentationXMLConvert.new({}).convert("test", i, true) }
|
73
|
-
.to output(/No label has been processed for ID N1/).to_stderr
|
74
|
-
end
|
75
|
-
|
76
|
-
it "does not warn of missing crossreference if text is supplied" do
|
77
|
-
i = <<~INPUT
|
78
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
79
|
-
<preface>
|
80
|
-
<foreword>
|
81
|
-
<p>
|
82
|
-
<xref target="N1">abc</xref>
|
83
|
-
</preface>
|
84
|
-
</iso-standard>
|
85
|
-
INPUT
|
86
|
-
expect { IsoDoc::HtmlConvert.new({}).convert("test", i, true) }
|
87
|
-
.not_to output(/No label has been processed for ID N1/).to_stderr
|
88
|
-
end
|
89
|
-
|
90
|
-
it "cross-references notes" do
|
91
|
-
input = <<~INPUT
|
92
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
93
|
-
<preface>
|
94
|
-
<foreword>
|
95
|
-
<p>
|
96
|
-
<xref target="N1"/>
|
97
|
-
<xref target="N2"/>
|
98
|
-
<xref target="N"/>
|
99
|
-
<xref target="note1"/>
|
100
|
-
<xref target="note2"/>
|
101
|
-
<xref target="AN"/>
|
102
|
-
<xref target="Anote1"/>
|
103
|
-
<xref target="Anote2"/>
|
104
|
-
</p>
|
105
|
-
</foreword>
|
106
|
-
<introduction id="intro">
|
107
|
-
<note id="N1">
|
108
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83e">These results are based on a study carried out on three different types of kernel.</p>
|
109
|
-
</note>
|
110
|
-
<clause id="xyz"><title>Preparatory</title>
|
111
|
-
<note id="N2">
|
112
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83d">These results are based on a study carried out on three different types of kernel.</p>
|
113
|
-
</note>
|
114
|
-
</clause>
|
115
|
-
</introduction>
|
116
|
-
</preface>
|
117
|
-
<sections>
|
118
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
119
|
-
<note id="N">
|
120
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
121
|
-
</note>
|
122
|
-
<p><xref target="N"/></p>
|
123
|
-
</clause>
|
124
|
-
<terms id="terms"/>
|
125
|
-
<clause id="widgets"><title>Widgets</title>
|
126
|
-
<clause id="widgets1">
|
127
|
-
<note id="note1">
|
128
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
129
|
-
</note>
|
130
|
-
<note id="note2">
|
131
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
132
|
-
</note>
|
133
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
134
|
-
</clause>
|
135
|
-
</clause>
|
136
|
-
</sections>
|
137
|
-
<annex id="annex1">
|
138
|
-
<clause id="annex1a">
|
139
|
-
<note id="AN">
|
140
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
141
|
-
</note>
|
142
|
-
</clause>
|
143
|
-
<clause id="annex1b">
|
144
|
-
<note id="Anote1">
|
145
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
146
|
-
</note>
|
147
|
-
<note id="Anote2">
|
148
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
149
|
-
</note>
|
150
|
-
</clause>
|
151
|
-
</annex>
|
152
|
-
</iso-standard>
|
153
|
-
INPUT
|
154
|
-
output = <<~OUTPUT
|
155
|
-
<foreword displayorder='1'>
|
156
|
-
<p>
|
157
|
-
<xref target='N1'>Introduction, Note</xref>
|
158
|
-
<xref target='N2'>Preparatory, Note</xref>
|
159
|
-
<xref target='N'>Clause 1, Note</xref>
|
160
|
-
<xref target='note1'>Clause 3.1, Note 1</xref>
|
161
|
-
<xref target='note2'>Clause 3.1, Note 2</xref>
|
162
|
-
<xref target='AN'>Annex A.1, Note</xref>
|
163
|
-
<xref target='Anote1'>Annex A.2, Note 1</xref>
|
164
|
-
<xref target='Anote2'>Annex A.2, Note 2</xref>
|
165
|
-
</p>
|
166
|
-
</foreword>
|
167
|
-
OUTPUT
|
168
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
169
|
-
.convert("test", input, true))
|
170
|
-
.at("//xmlns:foreword").to_xml))
|
171
|
-
.to be_equivalent_to xmlpp(output)
|
172
|
-
end
|
173
|
-
|
174
|
-
it "cross-references figures" do
|
175
|
-
input = <<~INPUT
|
176
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
177
|
-
<preface>
|
178
|
-
<foreword id="fwd">
|
179
|
-
<p>
|
180
|
-
<xref target="N1"/>
|
181
|
-
<xref target="N2"/>
|
182
|
-
<xref target="N"/>
|
183
|
-
<xref target="note1"/>
|
184
|
-
<xref target="note3"/>
|
185
|
-
<xref target="note4"/>
|
186
|
-
<xref target="note2"/>
|
187
|
-
<xref target="note51"/>
|
188
|
-
<xref target="AN"/>
|
189
|
-
<xref target="Anote1"/>
|
190
|
-
<xref target="Anote2"/>
|
191
|
-
<xref target="Anote3"/>
|
192
|
-
</p>
|
193
|
-
</foreword>
|
194
|
-
<introduction id="intro">
|
195
|
-
<figure id="N1">
|
196
|
-
<name>Split-it-right sample divider</name>
|
197
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
198
|
-
</figure>
|
199
|
-
<clause id="xyz"><title>Preparatory</title>
|
200
|
-
<figure id="N2" unnumbered="true">
|
201
|
-
<name>Split-it-right sample divider</name>
|
202
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
203
|
-
</figure>
|
204
|
-
</clause>
|
205
|
-
</introduction>
|
206
|
-
</preface>
|
207
|
-
<sections>
|
208
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
209
|
-
<figure id="N">
|
210
|
-
<name>Split-it-right sample divider</name>
|
211
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
212
|
-
</figure>
|
213
|
-
<p><xref target="N"/></p>
|
214
|
-
</clause>
|
215
|
-
<terms id="terms"/>
|
216
|
-
<clause id="widgets"><title>Widgets</title>
|
217
|
-
<clause id="widgets1">
|
218
|
-
<figure id="note1">
|
219
|
-
<name>Split-it-right sample divider</name>
|
220
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
221
|
-
</figure>
|
222
|
-
<figure id="note3" class="pseudocode">
|
223
|
-
<p>pseudocode</p>
|
224
|
-
</figure>
|
225
|
-
<sourcecode id="note4"><name>Source! Code!</name>
|
226
|
-
A B C
|
227
|
-
</sourcecode>
|
228
|
-
<example id="note5">
|
229
|
-
<sourcecode id="note51">
|
230
|
-
A B C
|
231
|
-
</sourcecode>
|
232
|
-
</example>
|
233
|
-
<figure id="note2">
|
234
|
-
<name>Split-it-right sample divider</name>
|
235
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
236
|
-
</figure>
|
237
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
238
|
-
</clause>
|
239
|
-
</clause>
|
240
|
-
</sections>
|
241
|
-
<annex id="annex1">
|
242
|
-
<clause id="annex1a">
|
243
|
-
<figure id="AN">
|
244
|
-
<name>Split-it-right sample divider</name>
|
245
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
246
|
-
</figure>
|
247
|
-
</clause>
|
248
|
-
<clause id="annex1b">
|
249
|
-
<figure id="Anote1" unnumbered="true">
|
250
|
-
<name>Split-it-right sample divider</name>
|
251
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
252
|
-
</figure>
|
253
|
-
<figure id="Anote2">
|
254
|
-
<name>Split-it-right sample divider</name>
|
255
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
256
|
-
</figure>
|
257
|
-
<sourcecode id="Anote3"><name>Source! Code!</name>
|
258
|
-
A B C
|
259
|
-
</sourcecode>
|
260
|
-
</clause>
|
261
|
-
</annex>
|
262
|
-
</iso-standard>
|
263
|
-
INPUT
|
264
|
-
output = <<~OUTPUT
|
265
|
-
<foreword id='fwd' displayorder="1">
|
266
|
-
<p>
|
267
|
-
<xref target='N1'>Figure 1</xref>
|
268
|
-
<xref target='N2'>Figure (??)</xref>
|
269
|
-
<xref target='N'>Figure 2</xref>
|
270
|
-
<xref target='note1'>Figure 3</xref>
|
271
|
-
<xref target='note3'>Figure 4</xref>
|
272
|
-
<xref target='note4'>Figure 5</xref>
|
273
|
-
<xref target='note2'>Figure 6</xref>
|
274
|
-
<xref target='note51'>[note51]</xref>
|
275
|
-
<xref target='AN'>Figure A.1</xref>
|
276
|
-
<xref target='Anote1'>Figure (??)</xref>
|
277
|
-
<xref target='Anote2'>Figure A.2</xref>
|
278
|
-
<xref target='Anote3'>Figure A.3</xref>
|
279
|
-
</p>
|
280
|
-
</foreword>
|
281
|
-
OUTPUT
|
282
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
283
|
-
.convert("test", input, true))
|
284
|
-
.at("//xmlns:foreword").to_xml))
|
285
|
-
.to be_equivalent_to xmlpp(output)
|
286
|
-
end
|
287
|
-
|
288
|
-
it "cross-references subfigures" do
|
289
|
-
input = <<~INPUT
|
290
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
291
|
-
<preface>
|
292
|
-
<foreword id="fwd">
|
293
|
-
<p>
|
294
|
-
<xref target="N"/>
|
295
|
-
<xref target="note1"/>
|
296
|
-
<xref target="note2"/>
|
297
|
-
<xref target="AN"/>
|
298
|
-
<xref target="Anote1"/>
|
299
|
-
<xref target="Anote2"/>
|
300
|
-
</p>
|
301
|
-
</foreword>
|
302
|
-
</preface>
|
303
|
-
<sections>
|
304
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
305
|
-
</clause>
|
306
|
-
<terms id="terms"/>
|
307
|
-
<clause id="widgets"><title>Widgets</title>
|
308
|
-
<clause id="widgets1">
|
309
|
-
<figure id="N">
|
310
|
-
<figure id="note1">
|
311
|
-
<name>Split-it-right sample divider</name>
|
312
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
313
|
-
</figure>
|
314
|
-
<figure id="note2">
|
315
|
-
<name>Split-it-right sample divider</name>
|
316
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
317
|
-
</figure>
|
318
|
-
</figure>
|
319
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
320
|
-
</clause>
|
321
|
-
</clause>
|
322
|
-
</sections>
|
323
|
-
<annex id="annex1">
|
324
|
-
<clause id="annex1a">
|
325
|
-
</clause>
|
326
|
-
<clause id="annex1b">
|
327
|
-
<figure id="AN">
|
328
|
-
<figure id="Anote1">
|
329
|
-
<name>Split-it-right sample divider</name>
|
330
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
331
|
-
</figure>
|
332
|
-
<figure id="Anote2">
|
333
|
-
<name>Split-it-right sample divider</name>
|
334
|
-
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
335
|
-
</figure>
|
336
|
-
</figure>
|
337
|
-
</clause>
|
338
|
-
</annex>
|
339
|
-
</iso-standard>
|
340
|
-
INPUT
|
341
|
-
output = <<~OUTPUT
|
342
|
-
<foreword id='fwd' displayorder="1">
|
343
|
-
<p>
|
344
|
-
<xref target='N'>Figure 1</xref>
|
345
|
-
<xref target='note1'>Figure 1-1</xref>
|
346
|
-
<xref target='note2'>Figure 1-2</xref>
|
347
|
-
<xref target='AN'>Figure A.1</xref>
|
348
|
-
<xref target='Anote1'>Figure A.1-1</xref>
|
349
|
-
<xref target='Anote2'>Figure A.1-2</xref>
|
350
|
-
</p>
|
351
|
-
</foreword>
|
352
|
-
OUTPUT
|
353
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
354
|
-
.convert("test", input, true))
|
355
|
-
.at("//xmlns:foreword").to_xml))
|
356
|
-
.to be_equivalent_to xmlpp(output)
|
357
|
-
end
|
358
|
-
|
359
|
-
it "cross-references examples" do
|
360
|
-
input = <<~INPUT
|
361
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
362
|
-
<preface>
|
363
|
-
<foreword>
|
364
|
-
<p>
|
365
|
-
<xref target="N1"/>
|
366
|
-
<xref target="N2"/>
|
367
|
-
<xref target="N"/>
|
368
|
-
<xref target="note1"/>
|
369
|
-
<xref target="note2"/>
|
370
|
-
<xref target="AN"/>
|
371
|
-
<xref target="Anote1"/>
|
372
|
-
<xref target="Anote2"/>
|
373
|
-
</p>
|
374
|
-
</foreword>
|
375
|
-
<introduction id="intro">
|
376
|
-
<example id="N1">
|
377
|
-
<p>Hello</p>
|
378
|
-
</example>
|
379
|
-
<clause id="xyz"><title>Preparatory</title>
|
380
|
-
<example id="N2" unnumbered="true">
|
381
|
-
<p>Hello</p>
|
382
|
-
</example>
|
383
|
-
</clause>
|
384
|
-
</introduction>
|
385
|
-
</preface>
|
386
|
-
<sections>
|
387
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
388
|
-
<example id="N">
|
389
|
-
<p>Hello</p>
|
390
|
-
</example>
|
391
|
-
<p><xref target="N"/></p>
|
392
|
-
</clause>
|
393
|
-
<terms id="terms"/>
|
394
|
-
<clause id="widgets"><title>Widgets</title>
|
395
|
-
<clause id="widgets1">
|
396
|
-
<example id="note1">
|
397
|
-
<p>Hello</p>
|
398
|
-
</example>
|
399
|
-
<example id="note2" unnumbered="true">
|
400
|
-
<p>Hello</p>
|
401
|
-
</example>
|
402
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
403
|
-
</clause>
|
404
|
-
</clause>
|
405
|
-
</sections>
|
406
|
-
<annex id="annex1">
|
407
|
-
<clause id="annex1a">
|
408
|
-
<example id="AN">
|
409
|
-
<p>Hello</p>
|
410
|
-
</example>
|
411
|
-
</clause>
|
412
|
-
<clause id="annex1b">
|
413
|
-
<example id="Anote1" unnumbered="true">
|
414
|
-
<p>Hello</p>
|
415
|
-
</example>
|
416
|
-
<example id="Anote2">
|
417
|
-
<p>Hello</p>
|
418
|
-
</example>
|
419
|
-
</clause>
|
420
|
-
</annex>
|
421
|
-
</iso-standard>
|
422
|
-
INPUT
|
423
|
-
output = <<~OUTPUT
|
424
|
-
<foreword displayorder='1'>
|
425
|
-
<p>
|
426
|
-
<xref target='N1'>Introduction, Example</xref>
|
427
|
-
<xref target='N2'>Preparatory, Example (??)</xref>
|
428
|
-
<xref target='N'>Clause 1, Example</xref>
|
429
|
-
<xref target='note1'>Clause 3.1, Example 1</xref>
|
430
|
-
<xref target='note2'>Clause 3.1, Example (??)</xref>
|
431
|
-
<xref target='AN'>Annex A.1, Example</xref>
|
432
|
-
<xref target='Anote1'>Annex A.2, Example (??)</xref>
|
433
|
-
<xref target='Anote2'>Annex A.2, Example 1</xref>
|
434
|
-
</p>
|
435
|
-
</foreword>
|
436
|
-
OUTPUT
|
437
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
438
|
-
.convert("test", input, true))
|
439
|
-
.at("//xmlns:foreword").to_xml))
|
440
|
-
.to be_equivalent_to xmlpp(output)
|
441
|
-
end
|
442
|
-
|
443
|
-
it "cross-references formulae" do
|
444
|
-
input = <<~INPUT
|
445
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
446
|
-
<preface>
|
447
|
-
<foreword>
|
448
|
-
<p>
|
449
|
-
<xref target="N1"/>
|
450
|
-
<xref target="N2"/>
|
451
|
-
<xref target="N"/>
|
452
|
-
<xref target="note1"/>
|
453
|
-
<xref target="note2"/>
|
454
|
-
<xref target="AN"/>
|
455
|
-
<xref target="Anote1"/>
|
456
|
-
<xref target="Anote2"/>
|
457
|
-
</p>
|
458
|
-
</foreword>
|
459
|
-
<introduction id="intro">
|
460
|
-
<formula id="N1">
|
461
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
462
|
-
</formula>
|
463
|
-
<clause id="xyz"><title>Preparatory</title>
|
464
|
-
<formula id="N2" unnumbered="true">
|
465
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
466
|
-
</formula>
|
467
|
-
</clause>
|
468
|
-
</introduction>
|
469
|
-
</preface>
|
470
|
-
<sections>
|
471
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
472
|
-
<formula id="N">
|
473
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
474
|
-
</formula>
|
475
|
-
<p><xref target="N"/></p>
|
476
|
-
</clause>
|
477
|
-
<terms id="terms"/>
|
478
|
-
<clause id="widgets"><title>Widgets</title>
|
479
|
-
<clause id="widgets1">
|
480
|
-
<formula id="note1">
|
481
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
482
|
-
</formula>
|
483
|
-
<formula id="note2">
|
484
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
485
|
-
</formula>
|
486
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
487
|
-
</clause>
|
488
|
-
</clause>
|
489
|
-
</sections>
|
490
|
-
<annex id="annex1">
|
491
|
-
<clause id="annex1a">
|
492
|
-
<formula id="AN">
|
493
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
494
|
-
</formula>
|
495
|
-
</clause>
|
496
|
-
<clause id="annex1b">
|
497
|
-
<formula id="Anote1" unnumbered="true">
|
498
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
499
|
-
</formula>
|
500
|
-
<formula id="Anote2">
|
501
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
502
|
-
</formula>
|
503
|
-
</clause>
|
504
|
-
</annex>
|
505
|
-
</iso-standard>
|
506
|
-
INPUT
|
507
|
-
output = <<~OUTPUT
|
508
|
-
<foreword displayorder='1'>
|
509
|
-
<p>
|
510
|
-
<xref target='N1'>Introduction, Formula (1)</xref>
|
511
|
-
<xref target='N2'>Preparatory, Formula ((??))</xref>
|
512
|
-
<xref target='N'>Clause 1, Formula (2)</xref>
|
513
|
-
<xref target='note1'>Clause 3.1, Formula (3)</xref>
|
514
|
-
<xref target='note2'>Clause 3.1, Formula (4)</xref>
|
515
|
-
<xref target='AN'>Formula (A.1)</xref>
|
516
|
-
<xref target='Anote1'>Formula ((??))</xref>
|
517
|
-
<xref target='Anote2'>Formula (A.2)</xref>
|
518
|
-
</p>
|
519
|
-
</foreword>
|
520
|
-
OUTPUT
|
521
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
522
|
-
.convert("test", input, true))
|
523
|
-
.at("//xmlns:foreword").to_xml))
|
524
|
-
.to be_equivalent_to xmlpp(output)
|
525
|
-
end
|
526
|
-
|
527
|
-
it "cross-references requirements" do
|
528
|
-
input = <<~INPUT
|
529
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
530
|
-
<preface>
|
531
|
-
<foreword>
|
532
|
-
<p>
|
533
|
-
<xref target="N1"/>
|
534
|
-
<xref target="N2"/>
|
535
|
-
<xref target="N"/>
|
536
|
-
<xref target="note1"/>
|
537
|
-
<xref target="note2"/>
|
538
|
-
<xref target="AN"/>
|
539
|
-
<xref target="Anote1"/>
|
540
|
-
<xref target="Anote2"/>
|
541
|
-
</p>
|
542
|
-
</foreword>
|
543
|
-
<introduction id="intro">
|
544
|
-
<requirement id="N1">
|
545
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
546
|
-
</requirement>
|
547
|
-
<clause id="xyz"><title>Preparatory</title>
|
548
|
-
<requirement id="N2" unnumbered="true">
|
549
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
550
|
-
</requirement>
|
551
|
-
</clause>
|
552
|
-
</introduction>
|
553
|
-
</preface>
|
554
|
-
<sections>
|
555
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
556
|
-
<requirement id="N">
|
557
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
558
|
-
</requirement>
|
559
|
-
<p><xref target="N"/></p>
|
560
|
-
</clause>
|
561
|
-
<terms id="terms"/>
|
562
|
-
<clause id="widgets"><title>Widgets</title>
|
563
|
-
<clause id="widgets1">
|
564
|
-
<requirement id="note1">
|
565
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
566
|
-
</requirement>
|
567
|
-
<requirement id="note2">
|
568
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
569
|
-
</requirement>
|
570
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
571
|
-
</clause>
|
572
|
-
</clause>
|
573
|
-
</sections>
|
574
|
-
<annex id="annex1">
|
575
|
-
<clause id="annex1a">
|
576
|
-
<requirement id="AN">
|
577
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
578
|
-
</requirement>
|
579
|
-
</clause>
|
580
|
-
<clause id="annex1b">
|
581
|
-
<requirement id="Anote1" unnumbered="true">
|
582
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
583
|
-
</requirement>
|
584
|
-
<requirement id="Anote2">
|
585
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
586
|
-
</requirement>
|
587
|
-
</clause>
|
588
|
-
</annex>
|
589
|
-
</iso-standard>
|
590
|
-
INPUT
|
591
|
-
output = <<~OUTPUT
|
592
|
-
<foreword displayorder='1'>
|
593
|
-
<p>
|
594
|
-
<xref target='N1'>Introduction, Requirement 1</xref>
|
595
|
-
<xref target='N2'>Preparatory, Requirement (??)</xref>
|
596
|
-
<xref target='N'>Clause 1, Requirement 2</xref>
|
597
|
-
<xref target='note1'>Clause 3.1, Requirement 3</xref>
|
598
|
-
<xref target='note2'>Clause 3.1, Requirement 4</xref>
|
599
|
-
<xref target='AN'>Requirement A.1</xref>
|
600
|
-
<xref target='Anote1'>Requirement (??)</xref>
|
601
|
-
<xref target='Anote2'>Requirement A.2</xref>
|
602
|
-
</p>
|
603
|
-
</foreword>
|
604
|
-
OUTPUT
|
605
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
606
|
-
.convert("test", input, true))
|
607
|
-
.at("//xmlns:foreword").to_xml))
|
608
|
-
.to be_equivalent_to xmlpp(output)
|
609
|
-
end
|
610
|
-
|
611
|
-
it "cross-references recommendations" do
|
612
|
-
input = <<~INPUT
|
613
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
614
|
-
<preface>
|
615
|
-
<foreword>
|
616
|
-
<p>
|
617
|
-
<xref target="N1"/>
|
618
|
-
<xref target="N2"/>
|
619
|
-
<xref target="N"/>
|
620
|
-
<xref target="note1"/>
|
621
|
-
<xref target="note2"/>
|
622
|
-
<xref target="AN"/>
|
623
|
-
<xref target="Anote1"/>
|
624
|
-
<xref target="Anote2"/>
|
625
|
-
</p>
|
626
|
-
</foreword>
|
627
|
-
<introduction id="intro">
|
628
|
-
<recommendation id="N1">
|
629
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
630
|
-
</recommendation>
|
631
|
-
<clause id="xyz"><title>Preparatory</title>
|
632
|
-
<recommendation id="N2" unnumbered="true">
|
633
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
634
|
-
</recommendation>
|
635
|
-
</clause>
|
636
|
-
</introduction>
|
637
|
-
</preface>
|
638
|
-
<sections>
|
639
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
640
|
-
<recommendation id="N">
|
641
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
642
|
-
</recommendation>
|
643
|
-
<p><xref target="N"/></p>
|
644
|
-
</clause>
|
645
|
-
<terms id="terms"/>
|
646
|
-
<clause id="widgets"><title>Widgets</title>
|
647
|
-
<clause id="widgets1">
|
648
|
-
<recommendation id="note1">
|
649
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
650
|
-
</recommendation>
|
651
|
-
<recommendation id="note2">
|
652
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
653
|
-
</recommendation>
|
654
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
655
|
-
</clause>
|
656
|
-
</clause>
|
657
|
-
</sections>
|
658
|
-
<annex id="annex1">
|
659
|
-
<clause id="annex1a">
|
660
|
-
<recommendation id="AN">
|
661
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
662
|
-
</recommendation>
|
663
|
-
</clause>
|
664
|
-
<clause id="annex1b">
|
665
|
-
<recommendation id="Anote1" unnumbered="true">
|
666
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
667
|
-
</recommendation>
|
668
|
-
<recommendation id="Anote2">
|
669
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
670
|
-
</recommendation>
|
671
|
-
</clause>
|
672
|
-
</annex>
|
673
|
-
</iso-standard>
|
674
|
-
INPUT
|
675
|
-
output = <<~OUTPUT
|
676
|
-
<foreword displayorder='1'>
|
677
|
-
<p>
|
678
|
-
<xref target='N1'>Introduction, Recommendation 1</xref>
|
679
|
-
<xref target='N2'>Preparatory, Recommendation (??)</xref>
|
680
|
-
<xref target='N'>Clause 1, Recommendation 2</xref>
|
681
|
-
<xref target='note1'>Clause 3.1, Recommendation 3</xref>
|
682
|
-
<xref target='note2'>Clause 3.1, Recommendation 4</xref>
|
683
|
-
<xref target='AN'>Recommendation A.1</xref>
|
684
|
-
<xref target='Anote1'>Recommendation (??)</xref>
|
685
|
-
<xref target='Anote2'>Recommendation A.2</xref>
|
686
|
-
</p>
|
687
|
-
</foreword>
|
688
|
-
OUTPUT
|
689
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
690
|
-
.convert("test", input, true))
|
691
|
-
.at("//xmlns:foreword").to_xml))
|
692
|
-
.to be_equivalent_to xmlpp(output)
|
693
|
-
end
|
694
|
-
|
695
|
-
it "cross-references permissions" do
|
696
|
-
input = <<~INPUT
|
697
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
698
|
-
<preface>
|
699
|
-
<foreword>
|
700
|
-
<p>
|
701
|
-
<xref target="N1"/>
|
702
|
-
<xref target="N2"/>
|
703
|
-
<xref target="N"/>
|
704
|
-
<xref target="note1"/>
|
705
|
-
<xref target="note2"/>
|
706
|
-
<xref target="AN"/>
|
707
|
-
<xref target="Anote1"/>
|
708
|
-
<xref target="Anote2"/>
|
709
|
-
</p>
|
710
|
-
</foreword>
|
711
|
-
<introduction id="intro">
|
712
|
-
<permission id="N1">
|
713
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
714
|
-
</permission>
|
715
|
-
<clause id="xyz"><title>Preparatory</title>
|
716
|
-
<permission id="N2" unnumbered="true">
|
717
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
718
|
-
</permission>
|
719
|
-
</clause>
|
720
|
-
</introduction>
|
721
|
-
</preface>
|
722
|
-
<sections>
|
723
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
724
|
-
<permission id="N">
|
725
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
726
|
-
</permission>
|
727
|
-
<p><xref target="N"/></p>
|
728
|
-
</clause>
|
729
|
-
<terms id="terms"/>
|
730
|
-
<clause id="widgets"><title>Widgets</title>
|
731
|
-
<clause id="widgets1">
|
732
|
-
<permission id="note1">
|
733
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
734
|
-
</permission>
|
735
|
-
<permission id="note2">
|
736
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
737
|
-
</permission>
|
738
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
739
|
-
</clause>
|
740
|
-
</clause>
|
741
|
-
</sections>
|
742
|
-
<annex id="annex1">
|
743
|
-
<clause id="annex1a">
|
744
|
-
<permission id="AN">
|
745
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
746
|
-
</permission>
|
747
|
-
</clause>
|
748
|
-
<clause id="annex1b">
|
749
|
-
<permission id="Anote1" unnumbered="true">
|
750
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
751
|
-
</permission>
|
752
|
-
<permission id="Anote2">
|
753
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
754
|
-
</permission>
|
755
|
-
</clause>
|
756
|
-
</annex>
|
757
|
-
</iso-standard>
|
758
|
-
INPUT
|
759
|
-
output = <<~OUTPUT
|
760
|
-
<foreword displayorder='1'>
|
761
|
-
<p>
|
762
|
-
<xref target='N1'>Introduction, Permission 1</xref>
|
763
|
-
<xref target='N2'>Preparatory, Permission (??)</xref>
|
764
|
-
<xref target='N'>Clause 1, Permission 2</xref>
|
765
|
-
<xref target='note1'>Clause 3.1, Permission 3</xref>
|
766
|
-
<xref target='note2'>Clause 3.1, Permission 4</xref>
|
767
|
-
<xref target='AN'>Permission A.1</xref>
|
768
|
-
<xref target='Anote1'>Permission (??)</xref>
|
769
|
-
<xref target='Anote2'>Permission A.2</xref>
|
770
|
-
</p>
|
771
|
-
</foreword>
|
772
|
-
OUTPUT
|
773
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
774
|
-
.convert("test", input, true))
|
775
|
-
.at("//xmlns:foreword").to_xml))
|
776
|
-
.to be_equivalent_to xmlpp(output)
|
777
|
-
end
|
778
|
-
|
779
|
-
it "labels and cross-references nested requirements" do
|
780
|
-
input = <<~INPUT
|
781
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
782
|
-
<preface>
|
783
|
-
<foreword>
|
784
|
-
<p>
|
785
|
-
<xref target="N1"/>
|
786
|
-
<xref target="N2"/>
|
787
|
-
<xref target="N"/>
|
788
|
-
<xref target="Q1"/>
|
789
|
-
<xref target="R1"/>
|
790
|
-
<xref target="AN1"/>
|
791
|
-
<xref target="AN2"/>
|
792
|
-
<xref target="AN"/>
|
793
|
-
<xref target="AQ1"/>
|
794
|
-
<xref target="AR1"/>
|
795
|
-
</p>
|
796
|
-
</foreword>
|
797
|
-
</preface>
|
798
|
-
<sections>
|
799
|
-
<clause id="xyz"><title>Preparatory</title>
|
800
|
-
<permission id="N1">
|
801
|
-
<permission id="N2">
|
802
|
-
<permission id="N">
|
803
|
-
</permission>
|
804
|
-
</permission>
|
805
|
-
<requirement id="Q1">
|
806
|
-
</requirement>
|
807
|
-
<recommendation id="R1">
|
808
|
-
</recommendation>
|
809
|
-
</permission>
|
810
|
-
</clause>
|
811
|
-
</sections>
|
812
|
-
<annex id="Axyz"><title>Preparatory</title>
|
813
|
-
<permission id="AN1">
|
814
|
-
<permission id="AN2">
|
815
|
-
<permission id="AN">
|
816
|
-
</permission>
|
817
|
-
</permission>
|
818
|
-
<requirement id="AQ1">
|
819
|
-
</requirement>
|
820
|
-
<recommendation id="AR1">
|
821
|
-
</recommendation>
|
822
|
-
</permission>
|
823
|
-
</annex>
|
824
|
-
</iso-standard>
|
825
|
-
INPUT
|
826
|
-
output = <<~OUTPUT
|
827
|
-
<foreword displayorder='1'>
|
828
|
-
<p>
|
829
|
-
<xref target='N1'>Clause 1, Permission 1</xref>
|
830
|
-
<xref target='N2'>Clause 1, Permission 1-1</xref>
|
831
|
-
<xref target='N'>Clause 1, Permission 1-1-1</xref>
|
832
|
-
<xref target='Q1'>Clause 1, Requirement 1-1</xref>
|
833
|
-
<xref target='R1'>Clause 1, Recommendation 1-1</xref>
|
834
|
-
<xref target='AN1'>Permission A.1</xref>
|
835
|
-
<xref target='AN2'>Permission A.1-1</xref>
|
836
|
-
<xref target='AN'>Permission A.1-1-1</xref>
|
837
|
-
<xref target='AQ1'>Requirement A.1-1</xref>
|
838
|
-
<xref target='AR1'>Recommendation A.1-1</xref>
|
839
|
-
</p>
|
840
|
-
</foreword>
|
841
|
-
OUTPUT
|
842
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
843
|
-
.convert("test", input, true))
|
844
|
-
.at("//xmlns:foreword").to_xml))
|
845
|
-
.to be_equivalent_to xmlpp(output)
|
846
|
-
end
|
847
|
-
|
848
|
-
it "cross-references tables" do
|
849
|
-
input = <<~INPUT
|
850
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
851
|
-
<preface>
|
852
|
-
<foreword>
|
853
|
-
<p>
|
854
|
-
<xref target="N1"/>
|
855
|
-
<xref target="N2"/>
|
856
|
-
<xref target="N"/>
|
857
|
-
<xref target="note1"/>
|
858
|
-
<xref target="note2"/>
|
859
|
-
<xref target="AN"/>
|
860
|
-
<xref target="Anote1"/>
|
861
|
-
<xref target="Anote2"/>
|
862
|
-
</p>
|
863
|
-
</foreword>
|
864
|
-
<introduction id="intro">
|
865
|
-
<table id="N1">
|
866
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
867
|
-
<tbody>
|
868
|
-
<tr>
|
869
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
870
|
-
<td align="center">13</td>
|
871
|
-
<td align="center">11</td>
|
872
|
-
</tr>
|
873
|
-
</tbody>
|
874
|
-
</table>
|
875
|
-
<clause id="xyz"><title>Preparatory</title>
|
876
|
-
<table id="N2" unnumbered="true">
|
877
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
878
|
-
<tbody>
|
879
|
-
<tr>
|
880
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
881
|
-
<td align="center">13</td>
|
882
|
-
<td align="center">11</td>
|
883
|
-
</tr>
|
884
|
-
</tbody>
|
885
|
-
</table>
|
886
|
-
</clause>
|
887
|
-
</introduction>
|
888
|
-
</preface>
|
889
|
-
<sections>
|
890
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
891
|
-
<table id="N">
|
892
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
893
|
-
<tbody>
|
894
|
-
<tr>
|
895
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
896
|
-
<td align="center">13</td>
|
897
|
-
<td align="center">11</td>
|
898
|
-
</tr>
|
899
|
-
</tbody>
|
900
|
-
</table>
|
901
|
-
<p><xref target="N"/></p>
|
902
|
-
</clause>
|
903
|
-
<terms id="terms"/>
|
904
|
-
<clause id="widgets"><title>Widgets</title>
|
905
|
-
<clause id="widgets1">
|
906
|
-
<table id="note1">
|
907
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
908
|
-
<tbody>
|
909
|
-
<tr>
|
910
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
911
|
-
<td align="center">13</td>
|
912
|
-
<td align="center">11</td>
|
913
|
-
</tr>
|
914
|
-
</tbody>
|
915
|
-
</table>
|
916
|
-
<table id="note2">
|
917
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
918
|
-
<tbody>
|
919
|
-
<tr>
|
920
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
921
|
-
<td align="center">13</td>
|
922
|
-
<td align="center">11</td>
|
923
|
-
</tr>
|
924
|
-
</tbody>
|
925
|
-
</table>
|
926
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
927
|
-
</clause>
|
928
|
-
</clause>
|
929
|
-
</sections>
|
930
|
-
<annex id="annex1">
|
931
|
-
<clause id="annex1a">
|
932
|
-
<table id="AN">
|
933
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
934
|
-
<tbody>
|
935
|
-
<tr>
|
936
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
937
|
-
<td align="center">13</td>
|
938
|
-
<td align="center">11</td>
|
939
|
-
</tr>
|
940
|
-
</tbody>
|
941
|
-
</table>
|
942
|
-
</clause>
|
943
|
-
<clause id="annex1b">
|
944
|
-
<table id="Anote1" unnumbered="true">
|
945
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
946
|
-
<tbody>
|
947
|
-
<tr>
|
948
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
949
|
-
<td align="center">13</td>
|
950
|
-
<td align="center">11</td>
|
951
|
-
</tr>
|
952
|
-
</tbody>
|
953
|
-
</table>
|
954
|
-
<table id="Anote2">
|
955
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
956
|
-
<tbody>
|
957
|
-
<tr>
|
958
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
959
|
-
<td align="center">13</td>
|
960
|
-
<td align="center">11</td>
|
961
|
-
</tr>
|
962
|
-
</tbody>
|
963
|
-
</table>
|
964
|
-
</clause>
|
965
|
-
</annex>
|
966
|
-
</iso-standard>
|
967
|
-
INPUT
|
968
|
-
output = <<~OUTPUT
|
969
|
-
<foreword displayorder='1'>
|
970
|
-
<p>
|
971
|
-
<xref target='N1'>Table 1</xref>
|
972
|
-
<xref target='N2'>Table (??)</xref>
|
973
|
-
<xref target='N'>Table 2</xref>
|
974
|
-
<xref target='note1'>Table 3</xref>
|
975
|
-
<xref target='note2'>Table 4</xref>
|
976
|
-
<xref target='AN'>Table A.1</xref>
|
977
|
-
<xref target='Anote1'>Table (??)</xref>
|
978
|
-
<xref target='Anote2'>Table A.2</xref>
|
979
|
-
</p>
|
980
|
-
</foreword>
|
981
|
-
OUTPUT
|
982
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
983
|
-
.convert("test", input, true))
|
984
|
-
.at("//xmlns:foreword").to_xml))
|
985
|
-
.to be_equivalent_to xmlpp(output)
|
986
|
-
end
|
987
|
-
|
988
|
-
it "cross-references term notes" do
|
989
|
-
input = <<~INPUT
|
990
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
991
|
-
<preface>
|
992
|
-
<foreword>
|
993
|
-
<p>
|
994
|
-
<xref target="note1"/>
|
995
|
-
<xref target="note2"/>
|
996
|
-
<xref target="note3"/>
|
997
|
-
</p>
|
998
|
-
</foreword>
|
999
|
-
</preface>
|
1000
|
-
<sections>
|
1001
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1002
|
-
</clause>
|
1003
|
-
<terms id="terms">
|
1004
|
-
<term id="_waxy_rice"><preferred><expression><name>waxy rice</name></expression></preferred>
|
1005
|
-
<termnote id="note1">
|
1006
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1007
|
-
</termnote></term>
|
1008
|
-
<term id="_nonwaxy_rice"><preferred><expression><name>nonwaxy rice</name></expression></preferred>
|
1009
|
-
<termnote id="note2">
|
1010
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1011
|
-
</termnote>
|
1012
|
-
<termnote id="note3">
|
1013
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1014
|
-
</termnote></term>
|
1015
|
-
</terms>
|
1016
|
-
</iso-standard>
|
1017
|
-
INPUT
|
1018
|
-
output = <<~OUTPUT
|
1019
|
-
<foreword displayorder="1">
|
1020
|
-
<p>
|
1021
|
-
<xref target='note1'>Clause 2.1, Note 1</xref>
|
1022
|
-
<xref target='note2'>Clause 2.2, Note 1</xref>
|
1023
|
-
<xref target='note3'>Clause 2.2, Note 2</xref>
|
1024
|
-
</p>
|
1025
|
-
</foreword>
|
1026
|
-
OUTPUT
|
1027
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1028
|
-
.convert("test", input, true))
|
1029
|
-
.at("//xmlns:foreword").to_xml))
|
1030
|
-
.to be_equivalent_to xmlpp(output)
|
1031
|
-
end
|
1032
|
-
|
1033
|
-
it "cross-references nested term notes" do
|
1034
|
-
input = <<~INPUT
|
1035
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1036
|
-
<preface>
|
1037
|
-
<foreword>
|
1038
|
-
<p>
|
1039
|
-
<xref target="note1"/>
|
1040
|
-
<xref target="note2"/>
|
1041
|
-
<xref target="note3"/>
|
1042
|
-
</p>
|
1043
|
-
</foreword>
|
1044
|
-
</preface>
|
1045
|
-
<sections>
|
1046
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1047
|
-
</clause>
|
1048
|
-
<terms id="terms">
|
1049
|
-
<term id="_waxy_rice"><preferred><expression><name>waxy rice</name></expression></preferred>
|
1050
|
-
<termnote id="note1">
|
1051
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1052
|
-
</termnote>
|
1053
|
-
<term id="_nonwaxy_rice"><preferred><expression><name>nonwaxy rice</name></expression></preferred>
|
1054
|
-
<termnote id="note2">
|
1055
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1056
|
-
</termnote>
|
1057
|
-
<termnote id="note3">
|
1058
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1059
|
-
</termnote></term></term>
|
1060
|
-
</terms>
|
1061
|
-
</iso-standard>
|
1062
|
-
INPUT
|
1063
|
-
output = <<~OUTPUT
|
1064
|
-
<foreword displayorder='1'>
|
1065
|
-
<p>
|
1066
|
-
<xref target='note1'>Clause 2.1, Note 1</xref>
|
1067
|
-
<xref target='note2'>Clause 2.1.1, Note 1</xref>
|
1068
|
-
<xref target='note3'>Clause 2.1.1, Note 2</xref>
|
1069
|
-
</p>
|
1070
|
-
</foreword>
|
1071
|
-
OUTPUT
|
1072
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1073
|
-
.convert("test", input, true))
|
1074
|
-
.at("//xmlns:foreword").to_xml))
|
1075
|
-
.to be_equivalent_to xmlpp(output)
|
1076
|
-
end
|
1077
|
-
|
1078
|
-
it "cross-references term examples" do
|
1079
|
-
input = <<~INPUT
|
1080
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1081
|
-
<preface>
|
1082
|
-
<foreword>
|
1083
|
-
<p>
|
1084
|
-
<xref target="note1"/>
|
1085
|
-
<xref target="note2"/>
|
1086
|
-
<xref target="note3"/>
|
1087
|
-
</p>
|
1088
|
-
</foreword>
|
1089
|
-
</preface>
|
1090
|
-
<sections>
|
1091
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1092
|
-
</clause>
|
1093
|
-
<terms id="terms">
|
1094
|
-
<term id="_waxy_rice"><preferred><expression><name>waxy rice</name></expression></preferred>
|
1095
|
-
<termexample id="note1">
|
1096
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1097
|
-
</termexample></term>
|
1098
|
-
<term id="_nonwaxy_rice"><preferred><expression><name>nonwaxy rice</name></expression></preferred>
|
1099
|
-
<termexample id="note2">
|
1100
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1101
|
-
</termexample>
|
1102
|
-
<termexample id="note3">
|
1103
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1104
|
-
</termexample></term>
|
1105
|
-
</terms>
|
1106
|
-
</iso-standard>
|
1107
|
-
INPUT
|
1108
|
-
output = <<~OUTPUT
|
1109
|
-
<foreword displayorder="1">
|
1110
|
-
<p>
|
1111
|
-
<xref target='note1'>Clause 2.1, Example</xref>
|
1112
|
-
<xref target='note2'>Clause 2.2, Example 1</xref>
|
1113
|
-
<xref target='note3'>Clause 2.2, Example 2</xref>
|
1114
|
-
</p>
|
1115
|
-
</foreword>
|
1116
|
-
OUTPUT
|
1117
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1118
|
-
.convert("test", input, true))
|
1119
|
-
.at("//xmlns:foreword").to_xml))
|
1120
|
-
.to be_equivalent_to xmlpp(output)
|
1121
|
-
end
|
1122
|
-
|
1123
|
-
it "cross-references nested term examples" do
|
1124
|
-
input = <<~INPUT
|
1125
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1126
|
-
<preface>
|
1127
|
-
<foreword>
|
1128
|
-
<p>
|
1129
|
-
<xref target="note1"/>
|
1130
|
-
<xref target="note2"/>
|
1131
|
-
<xref target="note3"/>
|
1132
|
-
</p>
|
1133
|
-
</foreword>
|
1134
|
-
</preface>
|
1135
|
-
<sections>
|
1136
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1137
|
-
</clause>
|
1138
|
-
<terms id="terms">
|
1139
|
-
<term id="_waxy_rice"><preferred><expression><name>waxy rice</name></expression></preferred>
|
1140
|
-
<termexample id="note1">
|
1141
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1142
|
-
</termexample>
|
1143
|
-
<term id="_nonwaxy_rice"><preferred><expression><name>nonwaxy rice</name></expression></preferred>
|
1144
|
-
<termexample id="note2">
|
1145
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1146
|
-
</termexample>
|
1147
|
-
<termexample id="note3">
|
1148
|
-
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
1149
|
-
</termexample></term></term>
|
1150
|
-
</terms>
|
1151
|
-
</iso-standard>
|
1152
|
-
INPUT
|
1153
|
-
output = <<~OUTPUT
|
1154
|
-
<foreword displayorder='1'>
|
1155
|
-
<p>
|
1156
|
-
<xref target='note1'>Clause 2.1, Example</xref>
|
1157
|
-
<xref target='note2'>Clause 2.1.1, Example 1</xref>
|
1158
|
-
<xref target='note3'>Clause 2.1.1, Example 2</xref>
|
1159
|
-
</p>
|
1160
|
-
</foreword>
|
1161
|
-
OUTPUT
|
1162
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1163
|
-
.convert("test", input, true))
|
1164
|
-
.at("//xmlns:foreword").to_xml))
|
1165
|
-
.to be_equivalent_to xmlpp(output)
|
1166
|
-
end
|
1167
|
-
|
1168
|
-
it "cross-references sections" do
|
1169
|
-
input = <<~INPUT
|
1170
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1171
|
-
<preface>
|
1172
|
-
<foreword obligation="informative">
|
1173
|
-
<title>Foreword</title>
|
1174
|
-
<p id="A">This is a preamble
|
1175
|
-
<xref target="C"/>
|
1176
|
-
<xref target="C1"/>
|
1177
|
-
<xref target="D"/>
|
1178
|
-
<xref target="H"/>
|
1179
|
-
<xref target="I"/>
|
1180
|
-
<xref target="J"/>
|
1181
|
-
<xref target="K"/>
|
1182
|
-
<xref target="L"/>
|
1183
|
-
<xref target="M"/>
|
1184
|
-
<xref target="N"/>
|
1185
|
-
<xref target="O"/>
|
1186
|
-
<xref target="P"/>
|
1187
|
-
<xref target="Q"/>
|
1188
|
-
<xref target="Q1"/>
|
1189
|
-
<xref target="QQ"/>
|
1190
|
-
<xref target="QQ1"/>
|
1191
|
-
<xref target="QQ2"/>
|
1192
|
-
<xref target="R"/>
|
1193
|
-
<xref target="S"/>
|
1194
|
-
</p>
|
1195
|
-
</foreword>
|
1196
|
-
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
1197
|
-
<title>Introduction Subsection</title>
|
1198
|
-
</clause>
|
1199
|
-
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
1200
|
-
</introduction></preface><sections>
|
1201
|
-
<clause id="D" obligation="normative" type="scope">
|
1202
|
-
<title>Scope</title>
|
1203
|
-
<p id="E">Text</p>
|
1204
|
-
</clause>
|
1205
|
-
|
1206
|
-
<terms id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
|
1207
|
-
<title>Normal Terms</title>
|
1208
|
-
<term id="J">
|
1209
|
-
<preferred><expression><name>Term2</name></expression></preferred>
|
1210
|
-
</term>
|
1211
|
-
</terms>
|
1212
|
-
<definitions id="K">
|
1213
|
-
<dl>
|
1214
|
-
<dt>Symbol</dt>
|
1215
|
-
<dd>Definition</dd>
|
1216
|
-
</dl>
|
1217
|
-
</definitions>
|
1218
|
-
</terms>
|
1219
|
-
<definitions id="L">
|
1220
|
-
<dl>
|
1221
|
-
<dt>Symbol</dt>
|
1222
|
-
<dd>Definition</dd>
|
1223
|
-
</dl>
|
1224
|
-
</definitions>
|
1225
|
-
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
1226
|
-
<title>Introduction</title>
|
1227
|
-
</clause>
|
1228
|
-
<clause id="O" inline-header="false" obligation="normative">
|
1229
|
-
<title>Clause 4.2</title>
|
1230
|
-
</clause></clause>
|
1231
|
-
|
1232
|
-
</sections><annex id="P" inline-header="false" obligation="normative">
|
1233
|
-
<title>Annex</title>
|
1234
|
-
<clause id="Q" inline-header="false" obligation="normative">
|
1235
|
-
<title>Annex A.1</title>
|
1236
|
-
<clause id="Q1" inline-header="false" obligation="normative">
|
1237
|
-
<title>Annex A.1a</title>
|
1238
|
-
</clause>
|
1239
|
-
</clause>
|
1240
|
-
</annex>
|
1241
|
-
<annex id="QQ">
|
1242
|
-
<terms id="QQ1">
|
1243
|
-
<term id="QQ2"/>
|
1244
|
-
</terms>
|
1245
|
-
</annex>
|
1246
|
-
<bibliography><references id="R" obligation="informative" normative="true">
|
1247
|
-
<title>Normative References</title>
|
1248
|
-
</references><clause id="S" obligation="informative">
|
1249
|
-
<title>Bibliography</title>
|
1250
|
-
<references id="T" obligation="informative" normative="false">
|
1251
|
-
<title>Bibliography Subsection</title>
|
1252
|
-
</references>
|
1253
|
-
</clause>
|
1254
|
-
</bibliography>
|
1255
|
-
</iso-standard>
|
1256
|
-
INPUT
|
1257
|
-
output = <<~OUTPUT
|
1258
|
-
<foreword obligation='informative' displayorder='1'>
|
1259
|
-
<title>Foreword</title>
|
1260
|
-
<p id='A'>
|
1261
|
-
This is a preamble
|
1262
|
-
<xref target='C'>Introduction Subsection</xref>
|
1263
|
-
<xref target='C1'>Introduction, 2</xref>
|
1264
|
-
<xref target='D'>Clause 1</xref>
|
1265
|
-
<xref target='H'>Clause 3</xref>
|
1266
|
-
<xref target='I'>Clause 3.1</xref>
|
1267
|
-
<xref target='J'>Clause 3.1.1</xref>
|
1268
|
-
<xref target='K'>Clause 3.2</xref>
|
1269
|
-
<xref target='L'>Clause 4</xref>
|
1270
|
-
<xref target='M'>Clause 5</xref>
|
1271
|
-
<xref target='N'>Clause 5.1</xref>
|
1272
|
-
<xref target='O'>Clause 5.2</xref>
|
1273
|
-
<xref target='P'>Annex A</xref>
|
1274
|
-
<xref target='Q'>Annex A.1</xref>
|
1275
|
-
<xref target='Q1'>Annex A.1.1</xref>
|
1276
|
-
<xref target='QQ'>Annex B</xref>
|
1277
|
-
<xref target='QQ1'>Annex B</xref>
|
1278
|
-
<xref target='QQ2'>Annex B.1</xref>
|
1279
|
-
<xref target='R'>Clause 2</xref>
|
1280
|
-
<xref target='S'>Bibliography</xref>
|
1281
|
-
</p>
|
1282
|
-
</foreword>
|
1283
|
-
OUTPUT
|
1284
|
-
expect(xmlpp(Nokogiri.XML(IsoDoc::PresentationXMLConvert.new({})
|
1285
|
-
.convert("test", input, true))
|
1286
|
-
.at("//xmlns:foreword").to_xml))
|
1287
|
-
.to be_equivalent_to xmlpp(output)
|
1288
|
-
end
|
1289
|
-
|
1290
|
-
it "cross-references lists" do
|
1291
|
-
input = <<~INPUT
|
1292
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1293
|
-
<preface>
|
1294
|
-
<foreword>
|
1295
|
-
<p>
|
1296
|
-
<xref target="N1"/>
|
1297
|
-
<xref target="N2"/>
|
1298
|
-
<xref target="N"/>
|
1299
|
-
<xref target="note1"/>
|
1300
|
-
<xref target="note2"/>
|
1301
|
-
<xref target="AN"/>
|
1302
|
-
<xref target="Anote1"/>
|
1303
|
-
<xref target="Anote2"/>
|
1304
|
-
</p>
|
1305
|
-
</foreword>
|
1306
|
-
<introduction id="intro">
|
1307
|
-
<ol id="N1">
|
1308
|
-
<li><p>A</p></li>
|
1309
|
-
</ol>
|
1310
|
-
<clause id="xyz"><title>Preparatory</title>
|
1311
|
-
<ol id="N2">
|
1312
|
-
<li><p>A</p></li>
|
1313
|
-
</ol>
|
1314
|
-
</clause>
|
1315
|
-
</introduction>
|
1316
|
-
</preface>
|
1317
|
-
<sections>
|
1318
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1319
|
-
<ol id="N">
|
1320
|
-
<li><p>A</p></li>
|
1321
|
-
</ol>
|
1322
|
-
</clause>
|
1323
|
-
<terms id="terms"/>
|
1324
|
-
<clause id="widgets"><title>Widgets</title>
|
1325
|
-
<clause id="widgets1">
|
1326
|
-
<ol id="note1">
|
1327
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1328
|
-
</ol>
|
1329
|
-
<ol id="note2">
|
1330
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1331
|
-
</ol>
|
1332
|
-
</clause>
|
1333
|
-
</clause>
|
1334
|
-
</sections>
|
1335
|
-
<annex id="annex1">
|
1336
|
-
<clause id="annex1a">
|
1337
|
-
<ol id="AN">
|
1338
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1339
|
-
</ol>
|
1340
|
-
</clause>
|
1341
|
-
<clause id="annex1b">
|
1342
|
-
<ol id="Anote1">
|
1343
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1344
|
-
</ol>
|
1345
|
-
<ol id="Anote2">
|
1346
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1347
|
-
</ol>
|
1348
|
-
</clause>
|
1349
|
-
</annex>
|
1350
|
-
</iso-standard>
|
1351
|
-
INPUT
|
1352
|
-
output = <<~OUTPUT
|
1353
|
-
<foreword displayorder='1'>
|
1354
|
-
<p>
|
1355
|
-
<xref target='N1'>Introduction, List</xref>
|
1356
|
-
<xref target='N2'>Preparatory, List</xref>
|
1357
|
-
<xref target='N'>Clause 1, List</xref>
|
1358
|
-
<xref target='note1'>Clause 3.1, List 1</xref>
|
1359
|
-
<xref target='note2'>Clause 3.1, List 2</xref>
|
1360
|
-
<xref target='AN'>Annex A.1, List</xref>
|
1361
|
-
<xref target='Anote1'>Annex A.2, List 1</xref>
|
1362
|
-
<xref target='Anote2'>Annex A.2, List 2</xref>
|
1363
|
-
</p>
|
1364
|
-
</foreword>
|
1365
|
-
OUTPUT
|
1366
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1367
|
-
.convert("test", input, true))
|
1368
|
-
.at("//xmlns:foreword").to_xml))
|
1369
|
-
.to be_equivalent_to xmlpp(output)
|
1370
|
-
end
|
1371
|
-
|
1372
|
-
it "cross-references list items" do
|
1373
|
-
input = <<~INPUT
|
1374
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1375
|
-
<preface>
|
1376
|
-
<foreword>
|
1377
|
-
<p>
|
1378
|
-
<xref target="N1"/>
|
1379
|
-
<xref target="N11"/>
|
1380
|
-
<xref target="N12"/>
|
1381
|
-
<xref target="N2"/>
|
1382
|
-
<xref target="N"/>
|
1383
|
-
<xref target="note1"/>
|
1384
|
-
<xref target="note2"/>
|
1385
|
-
<xref target="AN"/>
|
1386
|
-
<xref target="Anote1"/>
|
1387
|
-
<xref target="Anote2"/>
|
1388
|
-
</p>
|
1389
|
-
</foreword>
|
1390
|
-
<introduction id="intro">
|
1391
|
-
<ol id="N01">
|
1392
|
-
<li id="N1"><p>A</p>
|
1393
|
-
<ol id="N011">
|
1394
|
-
<li id="N11"><p>A</p>
|
1395
|
-
<ol id="N012">
|
1396
|
-
<li id="N12"><p>A</p>
|
1397
|
-
</li>
|
1398
|
-
</ol></li></ol></li></ol>
|
1399
|
-
<clause id="xyz"><title>Preparatory</title>
|
1400
|
-
<ol id="N02" type="arabic">
|
1401
|
-
<li id="N2"><p>A</p></li>
|
1402
|
-
</ol>
|
1403
|
-
</clause>
|
1404
|
-
</introduction>
|
1405
|
-
</preface>
|
1406
|
-
<sections>
|
1407
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1408
|
-
<ol id="N0" type="roman">
|
1409
|
-
<li id="N"><p>A</p></li>
|
1410
|
-
</ol>
|
1411
|
-
</clause>
|
1412
|
-
<terms id="terms"/>
|
1413
|
-
<clause id="widgets"><title>Widgets</title>
|
1414
|
-
<clause id="widgets1">
|
1415
|
-
<ol id="note1l" type="alphabet">
|
1416
|
-
<li id="note1"><p>A</p></li>
|
1417
|
-
</ol>
|
1418
|
-
<ol id="note2l" type="roman_upper">
|
1419
|
-
<li id="note2"><p>A</p></li>
|
1420
|
-
</ol>
|
1421
|
-
</clause>
|
1422
|
-
</clause>
|
1423
|
-
</sections>
|
1424
|
-
<annex id="annex1">
|
1425
|
-
<clause id="annex1a">
|
1426
|
-
<ol id="ANl" type="alphabet_upper">
|
1427
|
-
<li id="AN"><p>A</p></li>
|
1428
|
-
</ol>
|
1429
|
-
</clause>
|
1430
|
-
<clause id="annex1b">
|
1431
|
-
<ol id="Anote1l" type="roman" start="4">
|
1432
|
-
<li id="Anote1"><p>A</p></li>
|
1433
|
-
</ol>
|
1434
|
-
<ol id="Anote2l">
|
1435
|
-
<li id="Anote2"><p>A</p></li>
|
1436
|
-
</ol>
|
1437
|
-
</clause>
|
1438
|
-
</annex>
|
1439
|
-
</iso-standard>
|
1440
|
-
INPUT
|
1441
|
-
output = <<~OUTPUT
|
1442
|
-
<foreword displayorder='1'>
|
1443
|
-
<p>
|
1444
|
-
<xref target='N1'>Introduction, a)</xref>
|
1445
|
-
<xref target='N11'>Introduction, a.1)</xref>
|
1446
|
-
<xref target='N12'>Introduction, a.1.i)</xref>
|
1447
|
-
<xref target='N2'>Preparatory, 1)</xref>
|
1448
|
-
<xref target='N'>Clause 1, i)</xref>
|
1449
|
-
<xref target='note1'>Clause 3.1, List 1 a)</xref>
|
1450
|
-
<xref target='note2'>Clause 3.1, List 2 I)</xref>
|
1451
|
-
<xref target='AN'>Annex A.1, A)</xref>
|
1452
|
-
<xref target='Anote1'>Annex A.2, List 1 iv)</xref>
|
1453
|
-
<xref target='Anote2'>Annex A.2, List 2 a)</xref>
|
1454
|
-
</p>
|
1455
|
-
</foreword>
|
1456
|
-
OUTPUT
|
1457
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1458
|
-
.convert("test", input, true))
|
1459
|
-
.at("//xmlns:foreword").to_xml))
|
1460
|
-
.to be_equivalent_to xmlpp(output)
|
1461
|
-
end
|
1462
|
-
|
1463
|
-
it "cross-references nested list items" do
|
1464
|
-
input = <<~INPUT
|
1465
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1466
|
-
<preface>
|
1467
|
-
<foreword>
|
1468
|
-
<p>
|
1469
|
-
<xref target="N"/>
|
1470
|
-
<xref target="note1"/>
|
1471
|
-
<xref target="note2"/>
|
1472
|
-
<xref target="AN"/>
|
1473
|
-
<xref target="Anote1"/>
|
1474
|
-
<xref target="Anote2"/>
|
1475
|
-
</p>
|
1476
|
-
</foreword>
|
1477
|
-
</preface>
|
1478
|
-
<sections>
|
1479
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1480
|
-
<ol id="N1">
|
1481
|
-
<li id="N"><p>A</p>
|
1482
|
-
<ol>
|
1483
|
-
<li id="note1"><p>A</p>
|
1484
|
-
<ol>
|
1485
|
-
<li id="note2"><p>A</p>
|
1486
|
-
<ol>
|
1487
|
-
<li id="AN"><p>A</p>
|
1488
|
-
<ol>
|
1489
|
-
<li id="Anote1"><p>A</p>
|
1490
|
-
<ol>
|
1491
|
-
<li id="Anote2"><p>A</p></li>
|
1492
|
-
</ol></li>
|
1493
|
-
</ol></li>
|
1494
|
-
</ol></li>
|
1495
|
-
</ol></li>
|
1496
|
-
</ol></li>
|
1497
|
-
</ol>
|
1498
|
-
</clause>
|
1499
|
-
</sections>
|
1500
|
-
</iso-standard>
|
1501
|
-
INPUT
|
1502
|
-
output = <<~OUTPUT
|
1503
|
-
<foreword displayorder="1">
|
1504
|
-
<p>
|
1505
|
-
<xref target='N'>Clause 1, a)</xref>
|
1506
|
-
<xref target='note1'>Clause 1, a.1)</xref>
|
1507
|
-
<xref target='note2'>Clause 1, a.1.i)</xref>
|
1508
|
-
<xref target='AN'>Clause 1, a.1.i.A)</xref>
|
1509
|
-
<xref target='Anote1'>Clause 1, a.1.i.A.I)</xref>
|
1510
|
-
<xref target='Anote2'>Clause 1, a.1.i.A.I.a)</xref>
|
1511
|
-
</p>
|
1512
|
-
</foreword>
|
1513
|
-
OUTPUT
|
1514
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1515
|
-
.convert("test", input, true))
|
1516
|
-
.at("//xmlns:foreword").to_xml))
|
1517
|
-
.to be_equivalent_to xmlpp(output)
|
1518
|
-
end
|
1519
|
-
|
1520
|
-
it "cross-references definition lists" do
|
1521
|
-
input = <<~INPUT
|
1522
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1523
|
-
<preface>
|
1524
|
-
<foreword>
|
1525
|
-
<p>
|
1526
|
-
<xref target="N1"/>
|
1527
|
-
<xref target="N2"/>
|
1528
|
-
<xref target="N"/>
|
1529
|
-
<xref target="note1"/>
|
1530
|
-
<xref target="note2"/>
|
1531
|
-
<xref target="AN"/>
|
1532
|
-
<xref target="Anote1"/>
|
1533
|
-
<xref target="Anote2"/>
|
1534
|
-
</p>
|
1535
|
-
</foreword>
|
1536
|
-
<introduction id="intro">
|
1537
|
-
<dl id="N1">
|
1538
|
-
<li><p>A</p></li>
|
1539
|
-
</dl>
|
1540
|
-
<clause id="xyz"><title>Preparatory</title>
|
1541
|
-
<dl id="N2">
|
1542
|
-
<li><p>A</p></li>
|
1543
|
-
</dl>
|
1544
|
-
</clause>
|
1545
|
-
</introduction>
|
1546
|
-
</preface>
|
1547
|
-
<sections>
|
1548
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1549
|
-
<dl id="N">
|
1550
|
-
<li><p>A</p></li>
|
1551
|
-
</dl>
|
1552
|
-
</clause>
|
1553
|
-
<terms id="terms"/>
|
1554
|
-
<clause id="widgets"><title>Widgets</title>
|
1555
|
-
<clause id="widgets1">
|
1556
|
-
<dl id="note1">
|
1557
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1558
|
-
</dl>
|
1559
|
-
<dl id="note2">
|
1560
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1561
|
-
</dl>
|
1562
|
-
</clause>
|
1563
|
-
</clause>
|
1564
|
-
</sections>
|
1565
|
-
<annex id="annex1">
|
1566
|
-
<clause id="annex1a">
|
1567
|
-
<dl id="AN">
|
1568
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1569
|
-
</dl>
|
1570
|
-
</clause>
|
1571
|
-
<clause id="annex1b">
|
1572
|
-
<dl id="Anote1">
|
1573
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1574
|
-
</dl>
|
1575
|
-
<dl id="Anote2">
|
1576
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1577
|
-
</dl>
|
1578
|
-
</clause>
|
1579
|
-
</annex>
|
1580
|
-
</iso-standard>
|
1581
|
-
INPUT
|
1582
|
-
output = <<~OUTPUT
|
1583
|
-
<foreword displayorder='1'>
|
1584
|
-
<p>
|
1585
|
-
<xref target='N1'>Introduction, Definition List</xref>
|
1586
|
-
<xref target='N2'>Preparatory, Definition List</xref>
|
1587
|
-
<xref target='N'>Clause 1, Definition List</xref>
|
1588
|
-
<xref target='note1'>Clause 3.1, Definition List 1</xref>
|
1589
|
-
<xref target='note2'>Clause 3.1, Definition List 2</xref>
|
1590
|
-
<xref target='AN'>Annex A.1, Definition List</xref>
|
1591
|
-
<xref target='Anote1'>Annex A.2, Definition List 1</xref>
|
1592
|
-
<xref target='Anote2'>Annex A.2, Definition List 2</xref>
|
1593
|
-
</p>
|
1594
|
-
</foreword>
|
1595
|
-
OUTPUT
|
1596
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1597
|
-
.convert("test", input, true))
|
1598
|
-
.at("//xmlns:foreword").to_xml))
|
1599
|
-
.to be_equivalent_to xmlpp(output)
|
1600
|
-
end
|
1601
|
-
|
1602
|
-
it "cross-references definition list terms" do
|
1603
|
-
input = <<~INPUT
|
1604
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1605
|
-
<preface>
|
1606
|
-
<foreword>
|
1607
|
-
<p>
|
1608
|
-
<xref target="N1"/>
|
1609
|
-
<xref target="N2"/>
|
1610
|
-
<xref target="N"/>
|
1611
|
-
<xref target="note1"/>
|
1612
|
-
<xref target="note2"/>
|
1613
|
-
<xref target="AN"/>
|
1614
|
-
<xref target="Anote1"/>
|
1615
|
-
<xref target="Anote2"/>
|
1616
|
-
</p>
|
1617
|
-
</foreword>
|
1618
|
-
<introduction id="intro">
|
1619
|
-
<dl id="N01">
|
1620
|
-
<dt id="N1"><p>A</p></dt>
|
1621
|
-
</dl>
|
1622
|
-
<clause id="xyz"><title>Preparatory</title>
|
1623
|
-
<dl id="N02" type="arabic">
|
1624
|
-
<dt id="N2"><p>A</p></dt>
|
1625
|
-
</dl>
|
1626
|
-
</clause>
|
1627
|
-
</introduction>
|
1628
|
-
</preface>
|
1629
|
-
<sections>
|
1630
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1631
|
-
<dl id="N0" type="roman">
|
1632
|
-
<dt id="N"><p>A</p></dt>
|
1633
|
-
</dl>
|
1634
|
-
</clause>
|
1635
|
-
<terms id="terms"/>
|
1636
|
-
<clause id="widgets"><title>Widgets</title>
|
1637
|
-
<clause id="widgets1">
|
1638
|
-
<dl id="note1l" type="alphabet">
|
1639
|
-
<dt id="note1"><p>A</p></dt>
|
1640
|
-
</dl>
|
1641
|
-
<dl id="note2l" type="roman_upper">
|
1642
|
-
<dt id="note2"><p>A</p></dt>
|
1643
|
-
</dl>
|
1644
|
-
</clause>
|
1645
|
-
</clause>
|
1646
|
-
</sections>
|
1647
|
-
<annex id="annex1">
|
1648
|
-
<clause id="annex1a">
|
1649
|
-
<dl id="ANl" type="alphabet_upper">
|
1650
|
-
<dt id="AN"><p>A</p></dt>
|
1651
|
-
</dl>
|
1652
|
-
</clause>
|
1653
|
-
<clause id="annex1b">
|
1654
|
-
<dl id="Anote1l" type="roman" start="4">
|
1655
|
-
<dt id="Anote1"><p>A</p></dt>
|
1656
|
-
</dl>
|
1657
|
-
<dl id="Anote2l">
|
1658
|
-
<dt id="Anote2"><p>A</p></dt>
|
1659
|
-
</dl>
|
1660
|
-
</clause>
|
1661
|
-
</annex>
|
1662
|
-
</iso-standard>
|
1663
|
-
INPUT
|
1664
|
-
output = <<~OUTPUT
|
1665
|
-
<foreword displayorder='1'>
|
1666
|
-
<p>
|
1667
|
-
<xref target='N1'>Introduction, Definition List: A</xref>
|
1668
|
-
<xref target='N2'>Preparatory, Definition List: A</xref>
|
1669
|
-
<xref target='N'>Clause 1, Definition List: A</xref>
|
1670
|
-
<xref target='note1'>Clause 3.1, Definition List 1: A</xref>
|
1671
|
-
<xref target='note2'>Clause 3.1, Definition List 2: A</xref>
|
1672
|
-
<xref target='AN'>Annex A.1, Definition List: A</xref>
|
1673
|
-
<xref target='Anote1'>Annex A.2, Definition List 1: A</xref>
|
1674
|
-
<xref target='Anote2'>Annex A.2, Definition List 2: A</xref>
|
1675
|
-
</p>
|
1676
|
-
</foreword>
|
1677
|
-
OUTPUT
|
1678
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1679
|
-
.convert("test", input, true))
|
1680
|
-
.at("//xmlns:foreword").to_xml))
|
1681
|
-
.to be_equivalent_to xmlpp(output)
|
1682
|
-
end
|
1683
|
-
|
1684
|
-
it "cross-references definition list terms that are stem expressions" do
|
1685
|
-
input = <<~INPUT
|
1686
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1687
|
-
<preface>
|
1688
|
-
<foreword>
|
1689
|
-
<p>
|
1690
|
-
<xref target="N1"/>
|
1691
|
-
</p>
|
1692
|
-
</foreword>
|
1693
|
-
<introduction id="intro">
|
1694
|
-
<dl id="N01">
|
1695
|
-
<dt id="N1"><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mover accent="true"><mrow><mi>e</mi></mrow><mo>^</mo></mover></mrow><mrow><mi>r</mi></mrow></msub></math></stem>
|
1696
|
-
<index><primary>
|
1697
|
-
<stem type="MathML">
|
1698
|
-
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
1699
|
-
<msub>
|
1700
|
-
<mrow>
|
1701
|
-
<mover accent="true">
|
1702
|
-
<mrow>
|
1703
|
-
<mi>e</mi>
|
1704
|
-
</mrow>
|
1705
|
-
<mo>^</mo>
|
1706
|
-
</mover>
|
1707
|
-
</mrow>
|
1708
|
-
<mrow>
|
1709
|
-
<mi>r</mi>
|
1710
|
-
</mrow>
|
1711
|
-
</msub>
|
1712
|
-
</math>
|
1713
|
-
</stem>
|
1714
|
-
</primary></index></dt><dd>
|
1715
|
-
<p id="_543e0447-dfc6-477e-00cb-1738d6853190"><stem type="MathML"><math xmlns="http://www.w3.org/1998/Math/MathML"><mi>r</mi></math></stem>-direction</p>
|
1716
|
-
</dd>
|
1717
|
-
</dl>
|
1718
|
-
</clause>
|
1719
|
-
</annex>
|
1720
|
-
</iso-standard>
|
1721
|
-
INPUT
|
1722
|
-
output = <<~OUTPUT
|
1723
|
-
<foreword displayorder='1'>
|
1724
|
-
<p>
|
1725
|
-
<xref target='N1'>
|
1726
|
-
Introduction, Definition List:
|
1727
|
-
<stem type='MathML'>
|
1728
|
-
<math xmlns='http://www.w3.org/1998/Math/MathML'>
|
1729
|
-
<msub>
|
1730
|
-
<mrow>
|
1731
|
-
<mover accent='true'>
|
1732
|
-
<mrow>
|
1733
|
-
<mi>e</mi>
|
1734
|
-
</mrow>
|
1735
|
-
<mo>^</mo>
|
1736
|
-
</mover>
|
1737
|
-
</mrow>
|
1738
|
-
<mrow>
|
1739
|
-
<mi>r</mi>
|
1740
|
-
</mrow>
|
1741
|
-
</msub>
|
1742
|
-
</math>
|
1743
|
-
<!-- (hat e)_((r)) -->
|
1744
|
-
</stem>
|
1745
|
-
</xref>
|
1746
|
-
</p>
|
1747
|
-
</foreword>
|
1748
|
-
OUTPUT
|
1749
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1750
|
-
.convert("test", input, true))
|
1751
|
-
.at("//xmlns:foreword").to_xml))
|
1752
|
-
.to be_equivalent_to xmlpp(output)
|
1753
|
-
end
|
1754
|
-
|
1755
|
-
it "cross-references bookmarks" do
|
1756
|
-
input = <<~INPUT
|
1757
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1758
|
-
<preface>
|
1759
|
-
<foreword>
|
1760
|
-
<p>
|
1761
|
-
<xref target="N1"/>
|
1762
|
-
<xref target="N2"/>
|
1763
|
-
<xref target="N"/>
|
1764
|
-
<xref target="note1"/>
|
1765
|
-
<xref target="note2"/>
|
1766
|
-
<xref target="AN"/>
|
1767
|
-
<xref target="Anote1"/>
|
1768
|
-
<xref target="Anote2"/>
|
1769
|
-
</p>
|
1770
|
-
</foreword>
|
1771
|
-
<introduction id="intro">
|
1772
|
-
<p id="N01">
|
1773
|
-
<bookmark id="N1"/>
|
1774
|
-
</p>
|
1775
|
-
<clause id="xyz"><title>Preparatory</title>
|
1776
|
-
<p id="N02" type="arabic">
|
1777
|
-
<bookmark id="N2"/>
|
1778
|
-
</p>
|
1779
|
-
</clause>
|
1780
|
-
</introduction>
|
1781
|
-
</preface>
|
1782
|
-
<sections>
|
1783
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1784
|
-
<p id="N0" type="roman">
|
1785
|
-
<bookmark id="N"/>
|
1786
|
-
</p>
|
1787
|
-
</clause>
|
1788
|
-
<terms id="terms"/>
|
1789
|
-
<clause id="widgets"><title>Widgets</title>
|
1790
|
-
<clause id="widgets1">
|
1791
|
-
<note id="note0"/>
|
1792
|
-
<note id="note1l" type="alphabet">
|
1793
|
-
<bookmark id="note1"/>
|
1794
|
-
</note>
|
1795
|
-
<p id="note2l" type="roman_upper">
|
1796
|
-
<bookmark id="note2"/>
|
1797
|
-
</p>
|
1798
|
-
</clause>
|
1799
|
-
</clause>
|
1800
|
-
</sections>
|
1801
|
-
<annex id="annex1">
|
1802
|
-
<clause id="annex1a">
|
1803
|
-
<p id="ANl" type="alphabet_upper">
|
1804
|
-
<bookmark id="AN"/>
|
1805
|
-
</p>
|
1806
|
-
</clause>
|
1807
|
-
<clause id="annex1b">
|
1808
|
-
<figure id="Anote1l" type="roman" start="4">
|
1809
|
-
<bookmark id="Anote1"/>
|
1810
|
-
</figure>
|
1811
|
-
<p id="Anote2l">
|
1812
|
-
<bookmark id="Anote2"/>
|
1813
|
-
</p>
|
1814
|
-
</clause>
|
1815
|
-
</annex>
|
1816
|
-
</iso-standard>
|
1817
|
-
INPUT
|
1818
|
-
output = <<~OUTPUT
|
1819
|
-
<foreword displayorder='1'>
|
1820
|
-
<p>
|
1821
|
-
<xref target='N1'>Introduction</xref>
|
1822
|
-
<xref target='N2'>Preparatory</xref>
|
1823
|
-
<xref target='N'>Clause 1</xref>
|
1824
|
-
<xref target='note1'>Note 2</xref>
|
1825
|
-
<xref target='note2'>Clause 3.1</xref>
|
1826
|
-
<xref target='AN'>Annex A.1</xref>
|
1827
|
-
<xref target='Anote1'>Figure A.1</xref>
|
1828
|
-
<xref target='Anote2'>Annex A.2</xref>
|
1829
|
-
</p>
|
1830
|
-
</foreword>
|
1831
|
-
OUTPUT
|
1832
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::PresentationXMLConvert.new({})
|
1833
|
-
.convert("test", input, true))
|
1834
|
-
.at("//xmlns:foreword").to_xml))
|
1835
|
-
.to be_equivalent_to xmlpp(output)
|
1836
|
-
end
|
1837
|
-
end
|