metanorma-iso 2.2.1 → 2.2.3
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/lib/isodoc/iso/html/header-dis.html +111 -29
- data/lib/isodoc/iso/html/isodoc-dis.css +65 -64
- data/lib/isodoc/iso/html/isodoc-dis.scss +65 -64
- data/lib/isodoc/iso/html/style-human.css +2 -3
- data/lib/isodoc/iso/html/style-human.scss +0 -1
- data/lib/isodoc/iso/html/style-iso.css +2 -3
- data/lib/isodoc/iso/html/style-iso.scss +0 -1
- data/lib/isodoc/iso/html/wordstyle-dis.css +10 -4
- data/lib/isodoc/iso/html/wordstyle-dis.scss +10 -4
- data/lib/isodoc/iso/i18n-en.yaml +13 -8
- data/lib/isodoc/iso/i18n-fr.yaml +9 -3
- data/lib/isodoc/iso/i18n-ru.yaml +9 -2
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +1 -2
- data/lib/isodoc/iso/iso.amendment.xsl +226 -40
- data/lib/isodoc/iso/iso.international-standard.xsl +226 -40
- data/lib/isodoc/iso/presentation_bibdata.rb +13 -9
- data/lib/isodoc/iso/presentation_xml_convert.rb +5 -3
- data/lib/isodoc/iso/presentation_xref.rb +10 -7
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +6 -4
- data/lib/isodoc/iso/word_dis_cleanup.rb +24 -3
- data/lib/isodoc/iso/word_dis_convert.rb +4 -1
- data/lib/metanorma/iso/base.rb +2 -1
- data/lib/metanorma/iso/basicdoc.rng +0 -27
- data/lib/metanorma/iso/biblio-standoc.rng +164 -0
- data/lib/metanorma/iso/biblio.rng +50 -18
- data/lib/metanorma/iso/isodoc.rng +68 -206
- data/lib/metanorma/iso/isostandard-amd.rng +3 -54
- data/lib/metanorma/iso/isostandard-compile.rng +7 -0
- data/lib/metanorma/iso/isostandard.rng +1 -195
- data/lib/metanorma/iso/relaton-iso.rng +225 -0
- data/lib/metanorma/iso/validate.rb +6 -6
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/metanorma/requirements/modspec.rb +22 -38
- data/metanorma-iso.gemspec +5 -2
- metadata +7 -86
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/.github/workflows/ubuntu.yml +0 -41
- data/Rakefile +0 -8
- data/bin/rspec +0 -17
- data/spec/assets/header.html +0 -7
- data/spec/assets/html.css +0 -2
- data/spec/assets/htmlcover.html +0 -4
- data/spec/assets/htmlintro.html +0 -5
- data/spec/assets/i18n.yaml +0 -2
- data/spec/assets/iso.adoc +0 -10
- data/spec/assets/iso.headless.html +0 -33
- data/spec/assets/iso.xml +0 -71
- data/spec/assets/rice_image1.png +0 -0
- data/spec/assets/scripts.html +0 -3
- data/spec/assets/std.css +0 -2
- data/spec/assets/word.css +0 -2
- data/spec/assets/wordcover.html +0 -3
- data/spec/assets/wordintro.html +0 -4
- data/spec/examples/103_01_02.html +0 -247
- data/spec/examples/english.yaml +0 -69
- data/spec/examples/iso_123_.xml +0 -45
- data/spec/examples/iso_123_all_parts.xml +0 -45
- data/spec/examples/iso_123_no_year_note.xml +0 -46
- data/spec/examples/iso_124_.xml +0 -41
- data/spec/examples/iso_216_.xml +0 -47
- data/spec/examples/iso_iec_12382_.xml +0 -48
- data/spec/examples/rice.adoc +0 -714
- data/spec/examples/rice.preview.html +0 -1870
- data/spec/examples/rice.sh +0 -4
- data/spec/examples/rice_img/1000-1_ed2amd3fig1a.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig1b.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig3.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig4.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3fig5_f.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figA2.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab1.png +0 -0
- data/spec/examples/rice_img/1000-1_ed2amd3figTab2.png +0 -0
- data/spec/examples/rice_img/1001_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/ISO_1213_1.png +0 -0
- data/spec/examples/rice_img/SL1000-1_ed2amd3fig1.png +0 -0
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
- data/spec/isodoc/amd_spec.rb +0 -986
- data/spec/isodoc/blocks_spec.rb +0 -1174
- data/spec/isodoc/i18n_spec.rb +0 -1579
- data/spec/isodoc/inline_spec.rb +0 -1060
- data/spec/isodoc/iso_spec.rb +0 -255
- data/spec/isodoc/metadata_spec.rb +0 -701
- data/spec/isodoc/postproc_spec.rb +0 -1089
- data/spec/isodoc/ref_spec.rb +0 -439
- data/spec/isodoc/section_spec.rb +0 -998
- data/spec/isodoc/table_spec.rb +0 -420
- data/spec/isodoc/terms_spec.rb +0 -314
- data/spec/isodoc/word_dis_spec.rb +0 -2064
- data/spec/isodoc/xref_spec.rb +0 -1747
- data/spec/metanorma/amd_spec.rb +0 -724
- data/spec/metanorma/base_spec.rb +0 -1384
- data/spec/metanorma/blank_spec.rb +0 -38
- data/spec/metanorma/blocks_spec.rb +0 -624
- data/spec/metanorma/cleanup_spec.rb +0 -1645
- data/spec/metanorma/inline_spec.rb +0 -203
- data/spec/metanorma/lists_spec.rb +0 -197
- data/spec/metanorma/macros_spec.rb +0 -99
- data/spec/metanorma/processor_spec.rb +0 -161
- data/spec/metanorma/refs_spec.rb +0 -672
- data/spec/metanorma/section_spec.rb +0 -492
- data/spec/metanorma/table_spec.rb +0 -329
- data/spec/metanorma/validate_spec.rb +0 -2153
- data/spec/relaton/render_spec.rb +0 -568
- data/spec/requirements/requirement_components_spec.rb +0 -622
- data/spec/requirements/requirements_spec.rb +0 -1681
- data/spec/requirements/xref_spec.rb +0 -1211
- data/spec/spec_helper.rb +0 -313
- data/spec/vcr_cassettes/docrels.yml +0 -385
- data/spec/vcr_cassettes/withdrawn_iso.yml +0 -295
@@ -1,1211 +0,0 @@
|
|
1
|
-
require "spec_helper"
|
2
|
-
|
3
|
-
RSpec.describe Metanorma::Requirements::Iso::Modspec do
|
4
|
-
it "cross-references requirements" do
|
5
|
-
input = <<~INPUT
|
6
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
-
<preface>
|
8
|
-
<foreword>
|
9
|
-
<p>
|
10
|
-
<xref target="N1"/>
|
11
|
-
<xref target="N2"/>
|
12
|
-
<xref target="N"/>
|
13
|
-
<xref target="note1"/>
|
14
|
-
<xref target="note2"/>
|
15
|
-
<xref target="AN"/>
|
16
|
-
<xref target="Anote1"/>
|
17
|
-
<xref target="Anote2"/>
|
18
|
-
</p>
|
19
|
-
</foreword>
|
20
|
-
<introduction id="intro">
|
21
|
-
<requirement model="ogc" id="N1">
|
22
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
23
|
-
</requirement>
|
24
|
-
<clause id="xyz"><title>Preparatory</title>
|
25
|
-
<requirement model="ogc" id="N2" unnumbered="true">
|
26
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
27
|
-
</requirement>
|
28
|
-
</clause>
|
29
|
-
</introduction>
|
30
|
-
</preface>
|
31
|
-
<sections>
|
32
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
33
|
-
<requirement model="ogc" id="N">
|
34
|
-
<title>First</title>
|
35
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
36
|
-
</requirement>
|
37
|
-
<p><xref target="N"/></p>
|
38
|
-
</clause>
|
39
|
-
<terms id="terms"/>
|
40
|
-
<clause id="widgets"><title>Widgets</title>
|
41
|
-
<clause id="widgets1">
|
42
|
-
<requirement model="ogc" id="note1">
|
43
|
-
<title>Second</title>
|
44
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
45
|
-
</requirement>
|
46
|
-
<requirement model="ogc" id="note2">
|
47
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
48
|
-
</requirement>
|
49
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
50
|
-
</clause>
|
51
|
-
</clause>
|
52
|
-
</sections>
|
53
|
-
<annex id="annex1">
|
54
|
-
<clause id="annex1a">
|
55
|
-
<requirement model="ogc" id="AN">
|
56
|
-
<title>Third</title>
|
57
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
58
|
-
</requirement>
|
59
|
-
</clause>
|
60
|
-
<clause id="annex1b">
|
61
|
-
<requirement model="ogc" id="Anote1" unnumbered="true">
|
62
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
63
|
-
</requirement>
|
64
|
-
<requirement model="ogc" id="Anote2">
|
65
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
66
|
-
</requirement>
|
67
|
-
</clause>
|
68
|
-
</annex>
|
69
|
-
</iso-standard>
|
70
|
-
INPUT
|
71
|
-
output = <<~OUTPUT
|
72
|
-
<foreword displayorder='1'>
|
73
|
-
<p>
|
74
|
-
<xref target='N1'>
|
75
|
-
<span class='citetbl'>Table 1, Requirement 1</span>
|
76
|
-
</xref>
|
77
|
-
<xref target='N2'>
|
78
|
-
<span class='citetbl'>Table (??), Requirement (??)</span>
|
79
|
-
</xref>
|
80
|
-
<xref target='N'>
|
81
|
-
<span class='citetbl'>Table 2, Requirement 2</span>
|
82
|
-
</xref>
|
83
|
-
<xref target='note1'>
|
84
|
-
<span class='citetbl'>Table 3, Requirement 3</span>
|
85
|
-
</xref>
|
86
|
-
<xref target='note2'>
|
87
|
-
<span class='citetbl'>Table 4, Requirement 4</span>
|
88
|
-
</xref>
|
89
|
-
<xref target='AN'>
|
90
|
-
<span class='citetbl'>Table A.1, Requirement A.1</span>
|
91
|
-
</xref>
|
92
|
-
<xref target='Anote1'>
|
93
|
-
<span class='citetbl'>Table (??), Requirement (??)</span>
|
94
|
-
</xref>
|
95
|
-
<xref target='Anote2'>
|
96
|
-
<span class='citetbl'>Table A.2, Requirement A.2</span>
|
97
|
-
</xref>
|
98
|
-
</p>
|
99
|
-
</foreword>
|
100
|
-
OUTPUT
|
101
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
102
|
-
.convert("test", input, true))
|
103
|
-
.at("//xmlns:foreword").to_xml))
|
104
|
-
.to be_equivalent_to xmlpp(output)
|
105
|
-
end
|
106
|
-
|
107
|
-
it "cross-references requirements with labels" do
|
108
|
-
input = <<~INPUT
|
109
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
110
|
-
<preface>
|
111
|
-
<foreword>
|
112
|
-
<p>
|
113
|
-
<xref target="N1"/>
|
114
|
-
<xref target="N2"/>
|
115
|
-
<xref target="N"/>
|
116
|
-
<xref target="note1"/>
|
117
|
-
<xref target="note2"/>
|
118
|
-
<xref target="AN"/>
|
119
|
-
<xref target="Anote1"/>
|
120
|
-
<xref target="Anote2"/>
|
121
|
-
</p>
|
122
|
-
</foreword>
|
123
|
-
<introduction id="intro">
|
124
|
-
<requirement model="ogc" id="N1">
|
125
|
-
<identifier>/ogc/req1</identifier>
|
126
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
127
|
-
</requirement>
|
128
|
-
<clause id="xyz"><title>Preparatory</title>
|
129
|
-
<requirement model="ogc" id="N2" unnumbered="true">
|
130
|
-
<identifier>/ogc/req2</identifier>
|
131
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
132
|
-
</requirement>
|
133
|
-
</clause>
|
134
|
-
</introduction>
|
135
|
-
</preface>
|
136
|
-
<sections>
|
137
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
138
|
-
<requirement model="ogc" id="N">
|
139
|
-
<title>First</title>
|
140
|
-
<identifier>/ogc/req3</identifier>
|
141
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
142
|
-
</requirement>
|
143
|
-
<p><xref target="N"/></p>
|
144
|
-
</clause>
|
145
|
-
<terms id="terms"/>
|
146
|
-
<clause id="widgets"><title>Widgets</title>
|
147
|
-
<clause id="widgets1">
|
148
|
-
<requirement model="ogc" id="note1">
|
149
|
-
<title>Second</title>
|
150
|
-
<identifier>/ogc/req4</identifier>
|
151
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
152
|
-
</requirement>
|
153
|
-
<requirement model="ogc" id="note2">
|
154
|
-
<identifier>/ogc/req5</identifier>
|
155
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
156
|
-
</requirement>
|
157
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
158
|
-
</clause>
|
159
|
-
</clause>
|
160
|
-
</sections>
|
161
|
-
<annex id="annex1">
|
162
|
-
<clause id="annex1a">
|
163
|
-
<requirement model="ogc" id="AN">
|
164
|
-
<title>Third</title>
|
165
|
-
<identifier>/ogc/req6</identifier>
|
166
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
167
|
-
</requirement>
|
168
|
-
</clause>
|
169
|
-
<clause id="annex1b">
|
170
|
-
<requirement model="ogc" id="Anote1" unnumbered="true">
|
171
|
-
<identifier>/ogc/req7</identifier>
|
172
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
173
|
-
</requirement>
|
174
|
-
<requirement model="ogc" id="Anote2">
|
175
|
-
<identifier>/ogc/req8</identifier>
|
176
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
177
|
-
</requirement>
|
178
|
-
</clause>
|
179
|
-
</annex>
|
180
|
-
</iso-standard>
|
181
|
-
INPUT
|
182
|
-
output = <<~OUTPUT
|
183
|
-
<foreword displayorder='1'>
|
184
|
-
<p>
|
185
|
-
<xref target='N1'>
|
186
|
-
<span class='citetbl'>Table 1, Requirement 1</span>
|
187
|
-
</xref>
|
188
|
-
<xref target='N2'>
|
189
|
-
<span class='citetbl'>Table (??), Requirement (??)</span>
|
190
|
-
</xref>
|
191
|
-
<xref target='N'>
|
192
|
-
<span class='citetbl'>Table 2, Requirement 2</span>
|
193
|
-
</xref>
|
194
|
-
<xref target='note1'>
|
195
|
-
<span class='citetbl'>Table 3, Requirement 3</span>
|
196
|
-
</xref>
|
197
|
-
<xref target='note2'>
|
198
|
-
<span class='citetbl'>Table 4, Requirement 4</span>
|
199
|
-
</xref>
|
200
|
-
<xref target='AN'>
|
201
|
-
<span class='citetbl'>Table A.1, Requirement A.1</span>
|
202
|
-
</xref>
|
203
|
-
<xref target='Anote1'>
|
204
|
-
<span class='citetbl'>Table (??), Requirement (??)</span>
|
205
|
-
</xref>
|
206
|
-
<xref target='Anote2'>
|
207
|
-
<span class='citetbl'>Table A.2, Requirement A.2</span>
|
208
|
-
</xref>
|
209
|
-
</p>
|
210
|
-
</foreword>
|
211
|
-
OUTPUT
|
212
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
213
|
-
.convert("test", input, true))
|
214
|
-
.at("//xmlns:foreword").to_xml))
|
215
|
-
.to be_equivalent_to xmlpp(output)
|
216
|
-
end
|
217
|
-
|
218
|
-
it "cross-references requirement parts" do
|
219
|
-
input = <<~INPUT
|
220
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
221
|
-
<preface>
|
222
|
-
<foreword>
|
223
|
-
<p>
|
224
|
-
<xref target="N1a"/>
|
225
|
-
<xref target="N1b"/>
|
226
|
-
<xref target="N2a"/>
|
227
|
-
<xref target="N2b"/>
|
228
|
-
<xref target="Na"/>
|
229
|
-
<xref target="Nb"/>
|
230
|
-
<xref target="note1a"/>
|
231
|
-
<xref target="note1b"/>
|
232
|
-
<xref target="note2a"/>
|
233
|
-
<xref target="note2b"/>
|
234
|
-
<xref target="ANa"/>
|
235
|
-
<xref target="ANb"/>
|
236
|
-
<xref target="Anote1a"/>
|
237
|
-
<xref target="Anote1b"/>
|
238
|
-
<xref target="Anote2a"/>
|
239
|
-
<xref target="Anote2b"/>
|
240
|
-
</p>
|
241
|
-
</foreword>
|
242
|
-
<introduction id="intro">
|
243
|
-
<requirement model="ogc" id="N1">
|
244
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
245
|
-
<component class="part" id="N1a"/>
|
246
|
-
<component class="part" id="N1b"/>
|
247
|
-
</requirement>
|
248
|
-
<clause id="xyz"><title>Preparatory</title>
|
249
|
-
<requirement model="ogc" id="N2" unnumbered="true">
|
250
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
251
|
-
<component class="part" id="N2a"/>
|
252
|
-
<component class="part" id="N2b"/>
|
253
|
-
</requirement>
|
254
|
-
</clause>
|
255
|
-
</introduction>
|
256
|
-
</preface>
|
257
|
-
<sections>
|
258
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
259
|
-
<requirement model="ogc" id="N">
|
260
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
261
|
-
<component class="part" id="Na"/>
|
262
|
-
<component class="part" id="Nb"/>
|
263
|
-
</requirement>
|
264
|
-
<p><xref target="N"/></p>
|
265
|
-
</clause>
|
266
|
-
<terms id="terms"/>
|
267
|
-
<clause id="widgets"><title>Widgets</title>
|
268
|
-
<clause id="widgets1">
|
269
|
-
<requirement model="ogc" id="note1">
|
270
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
271
|
-
<component class="part" id="note1a"/>
|
272
|
-
<component class="part" id="note1b"/>
|
273
|
-
</requirement>
|
274
|
-
<requirement model="ogc" id="note2">
|
275
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
276
|
-
<component class="part" id="note2a"/>
|
277
|
-
<component class="part" id="note2b"/>
|
278
|
-
</requirement>
|
279
|
-
<p> <xref target="note1a"/> <xref target="note2b"/> </p>
|
280
|
-
</clause>
|
281
|
-
</clause>
|
282
|
-
</sections>
|
283
|
-
<annex id="annex1">
|
284
|
-
<clause id="annex1a">
|
285
|
-
<requirement model="ogc" id="AN">
|
286
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
287
|
-
<component class="part" id="ANa"/>
|
288
|
-
<component class="part" id="ANb"/>
|
289
|
-
</requirement>
|
290
|
-
</clause>
|
291
|
-
<clause id="annex1b">
|
292
|
-
<requirement model="ogc" id="Anote1" unnumbered="true">
|
293
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
294
|
-
<component class="part" id="Anote1a"/>
|
295
|
-
<component class="part" id="Anote1b"/>
|
296
|
-
</requirement>
|
297
|
-
<requirement model="ogc" id="Anote2">
|
298
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
299
|
-
<component class="part" id="Anote2a"/>
|
300
|
-
<component class="part" id="Anote2b"/>
|
301
|
-
</requirement>
|
302
|
-
</clause>
|
303
|
-
</annex>
|
304
|
-
</iso-standard>
|
305
|
-
INPUT
|
306
|
-
output = <<~OUTPUT
|
307
|
-
<foreword displayorder='1'>
|
308
|
-
<p>
|
309
|
-
<xref target='N1a'>Table 1, Requirement 1 A</xref>
|
310
|
-
<xref target='N1b'>Table 1, Requirement 1 B</xref>
|
311
|
-
<xref target='N2a'>Table (??), Requirement A</xref>
|
312
|
-
<xref target='N2b'>Table (??), Requirement B</xref>
|
313
|
-
<xref target='Na'>Table 2, Requirement 2 A</xref>
|
314
|
-
<xref target='Nb'>Table 2, Requirement 2 B</xref>
|
315
|
-
<xref target='note1a'>Table 3, Requirement 3 A</xref>
|
316
|
-
<xref target='note1b'>Table 3, Requirement 3 B</xref>
|
317
|
-
<xref target='note2a'>Table 4, Requirement 4 A</xref>
|
318
|
-
<xref target='note2b'>Table 4, Requirement 4 B</xref>
|
319
|
-
<xref target='ANa'>Table A.1, Requirement A.1 A</xref>
|
320
|
-
<xref target='ANb'>Table A.1, Requirement A.1 B</xref>
|
321
|
-
<xref target='Anote1a'>Table (??), Requirement A. A</xref>
|
322
|
-
<xref target='Anote1b'>Table (??), Requirement A. B</xref>
|
323
|
-
<xref target='Anote2a'>Table A.2, Requirement A.2 A</xref>
|
324
|
-
<xref target='Anote2b'>Table A.2, Requirement A.2 B</xref>
|
325
|
-
</p>
|
326
|
-
</foreword>
|
327
|
-
OUTPUT
|
328
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
329
|
-
.convert("test", input, true))
|
330
|
-
.at("//xmlns:foreword").to_xml))
|
331
|
-
.to be_equivalent_to xmlpp(output)
|
332
|
-
end
|
333
|
-
|
334
|
-
it "cross-references requirement tests" do
|
335
|
-
input = <<~INPUT
|
336
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
337
|
-
<preface>
|
338
|
-
<foreword>
|
339
|
-
<p>
|
340
|
-
<xref target="N1"/>
|
341
|
-
<xref target="N2"/>
|
342
|
-
<xref target="N"/>
|
343
|
-
<xref target="note1"/>
|
344
|
-
<xref target="note2"/>
|
345
|
-
<xref target="AN"/>
|
346
|
-
<xref target="Anote1"/>
|
347
|
-
<xref target="Anote2"/>
|
348
|
-
</p>
|
349
|
-
</foreword>
|
350
|
-
<introduction id="intro">
|
351
|
-
<requirement model="ogc" id="N1" type="verification">
|
352
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
353
|
-
</requirement>
|
354
|
-
<clause id="xyz"><title>Preparatory</title>
|
355
|
-
<requirement model="ogc" id="N2" unnumbered="true" type="verification">
|
356
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
357
|
-
</requirement>
|
358
|
-
</clause>
|
359
|
-
</introduction>
|
360
|
-
</preface>
|
361
|
-
<sections>
|
362
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
363
|
-
<requirement model="ogc" id="N" type="verification">
|
364
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
365
|
-
</requirement>
|
366
|
-
<p><xref target="N"/></p>
|
367
|
-
</clause>
|
368
|
-
<terms id="terms"/>
|
369
|
-
<clause id="widgets"><title>Widgets</title>
|
370
|
-
<clause id="widgets1">
|
371
|
-
<requirement model="ogc" id="note1" type="verification">
|
372
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
373
|
-
</requirement>
|
374
|
-
<requirement model="ogc" id="note2" type="verification">
|
375
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
376
|
-
</requirement>
|
377
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
378
|
-
</clause>
|
379
|
-
</clause>
|
380
|
-
</sections>
|
381
|
-
<annex id="annex1">
|
382
|
-
<clause id="annex1a">
|
383
|
-
<requirement model="ogc" id="AN" type="verification">
|
384
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
385
|
-
</requirement>
|
386
|
-
</clause>
|
387
|
-
<clause id="annex1b">
|
388
|
-
<requirement model="ogc" id="Anote1" unnumbered="true" type="verification">
|
389
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
390
|
-
</requirement>
|
391
|
-
<requirement model="ogc" id="Anote2" type="verification">
|
392
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
393
|
-
</requirement>
|
394
|
-
</clause>
|
395
|
-
</annex>
|
396
|
-
</iso-standard>
|
397
|
-
INPUT
|
398
|
-
output = <<~OUTPUT
|
399
|
-
<foreword displayorder='1'>
|
400
|
-
<p>
|
401
|
-
<xref target='N1'>
|
402
|
-
<span class='citetbl'>Table 1, Conformance test 1</span>
|
403
|
-
</xref>
|
404
|
-
<xref target='N2'>
|
405
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
406
|
-
</xref>
|
407
|
-
<xref target='N'>
|
408
|
-
<span class='citetbl'>Table 2, Conformance test 2</span>
|
409
|
-
</xref>
|
410
|
-
<xref target='note1'>
|
411
|
-
<span class='citetbl'>Table 3, Conformance test 3</span>
|
412
|
-
</xref>
|
413
|
-
<xref target='note2'>
|
414
|
-
<span class='citetbl'>Table 4, Conformance test 4</span>
|
415
|
-
</xref>
|
416
|
-
<xref target='AN'>
|
417
|
-
<span class='citetbl'>Table A.1, Conformance test A.1</span>
|
418
|
-
</xref>
|
419
|
-
<xref target='Anote1'>
|
420
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
421
|
-
</xref>
|
422
|
-
<xref target='Anote2'>
|
423
|
-
<span class='citetbl'>Table A.2, Conformance test A.2</span>
|
424
|
-
</xref>
|
425
|
-
</p>
|
426
|
-
</foreword>
|
427
|
-
OUTPUT
|
428
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
429
|
-
.convert("test", input, true))
|
430
|
-
.at("//xmlns:foreword").to_xml))
|
431
|
-
.to be_equivalent_to xmlpp(output)
|
432
|
-
end
|
433
|
-
|
434
|
-
it "cross-references requirement tests in French" do
|
435
|
-
input = <<~INPUT
|
436
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
437
|
-
<bibdata><language>fr</language></bibdata>
|
438
|
-
<preface>
|
439
|
-
<foreword>
|
440
|
-
<p>
|
441
|
-
<xref target="N1"/>
|
442
|
-
<xref target="N2"/>
|
443
|
-
<xref target="N"/>
|
444
|
-
<xref target="note1"/>
|
445
|
-
<xref target="note2"/>
|
446
|
-
<xref target="AN"/>
|
447
|
-
<xref target="Anote1"/>
|
448
|
-
<xref target="Anote2"/>
|
449
|
-
</p>
|
450
|
-
</foreword>
|
451
|
-
<introduction id="intro">
|
452
|
-
<requirement model="ogc" id="N1" type="verification">
|
453
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
454
|
-
</requirement>
|
455
|
-
<clause id="xyz"><title>Preparatory</title>
|
456
|
-
<requirement model="ogc" id="N2" unnumbered="true" type="verification">
|
457
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
458
|
-
</requirement>
|
459
|
-
</clause>
|
460
|
-
</introduction>
|
461
|
-
</preface>
|
462
|
-
<sections>
|
463
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
464
|
-
<requirement model="ogc" id="N" type="verification">
|
465
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
466
|
-
</requirement>
|
467
|
-
<p><xref target="N"/></p>
|
468
|
-
</clause>
|
469
|
-
<terms id="terms"/>
|
470
|
-
<clause id="widgets"><title>Widgets</title>
|
471
|
-
<clause id="widgets1">
|
472
|
-
<requirement model="ogc" id="note1" type="verification">
|
473
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
474
|
-
</requirement>
|
475
|
-
<requirement model="ogc" id="note2" type="verification">
|
476
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
477
|
-
</requirement>
|
478
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
479
|
-
</clause>
|
480
|
-
</clause>
|
481
|
-
</sections>
|
482
|
-
<annex id="annex1">
|
483
|
-
<clause id="annex1a">
|
484
|
-
<requirement model="ogc" id="AN" type="verification">
|
485
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
486
|
-
</requirement>
|
487
|
-
</clause>
|
488
|
-
<clause id="annex1b">
|
489
|
-
<requirement model="ogc" id="Anote1" unnumbered="true" type="verification">
|
490
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
491
|
-
</requirement>
|
492
|
-
<requirement model="ogc" id="Anote2" type="verification">
|
493
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
494
|
-
</requirement>
|
495
|
-
</clause>
|
496
|
-
</annex>
|
497
|
-
</iso-standard>
|
498
|
-
INPUT
|
499
|
-
output = <<~OUTPUT
|
500
|
-
<foreword displayorder='1'>
|
501
|
-
<p>
|
502
|
-
<xref target='N1'>
|
503
|
-
<span class='citetbl'>Tableau 1, Test de conformité 1</span>
|
504
|
-
</xref>
|
505
|
-
<xref target='N2'>
|
506
|
-
<span class='citetbl'>Tableau (??), Test de conformité (??)</span>
|
507
|
-
</xref>
|
508
|
-
<xref target='N'>
|
509
|
-
<span class='citetbl'>Tableau 2, Test de conformité 2</span>
|
510
|
-
</xref>
|
511
|
-
<xref target='note1'>
|
512
|
-
<span class='citetbl'>Tableau 3, Test de conformité 3</span>
|
513
|
-
</xref>
|
514
|
-
<xref target='note2'>
|
515
|
-
<span class='citetbl'>Tableau 4, Test de conformité 4</span>
|
516
|
-
</xref>
|
517
|
-
<xref target='AN'>
|
518
|
-
<span class='citetbl'>Tableau A.1, Test de conformité A.1</span>
|
519
|
-
</xref>
|
520
|
-
<xref target='Anote1'>
|
521
|
-
<span class='citetbl'>Tableau (??), Test de conformité (??)</span>
|
522
|
-
</xref>
|
523
|
-
<xref target='Anote2'>
|
524
|
-
<span class='citetbl'>Tableau A.2, Test de conformité A.2</span>
|
525
|
-
</xref>
|
526
|
-
</p>
|
527
|
-
</foreword>
|
528
|
-
OUTPUT
|
529
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
530
|
-
.convert("test", input, true))
|
531
|
-
.at("//xmlns:foreword").to_xml))
|
532
|
-
.to be_equivalent_to xmlpp(output)
|
533
|
-
end
|
534
|
-
|
535
|
-
it "cross-references recommendations" do
|
536
|
-
input = <<~INPUT
|
537
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
538
|
-
<preface>
|
539
|
-
<foreword>
|
540
|
-
<p>
|
541
|
-
<xref target="N1"/>
|
542
|
-
<xref target="N2"/>
|
543
|
-
<xref target="N"/>
|
544
|
-
<xref target="note1"/>
|
545
|
-
<xref target="note2"/>
|
546
|
-
<xref target="AN"/>
|
547
|
-
<xref target="Anote1"/>
|
548
|
-
<xref target="Anote2"/>
|
549
|
-
</p>
|
550
|
-
</foreword>
|
551
|
-
<introduction id="intro">
|
552
|
-
<recommendation model="ogc" id="N1">
|
553
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
554
|
-
</recommendation>
|
555
|
-
<clause id="xyz"><title>Preparatory</title>
|
556
|
-
<recommendation model="ogc" id="N2" unnumbered="true">
|
557
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
558
|
-
</recommendation>
|
559
|
-
</clause>
|
560
|
-
</introduction>
|
561
|
-
</preface>
|
562
|
-
<sections>
|
563
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
564
|
-
<recommendation model="ogc" id="N">
|
565
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
566
|
-
</recommendation>
|
567
|
-
<p><xref target="N"/></p>
|
568
|
-
</clause>
|
569
|
-
<terms id="terms"/>
|
570
|
-
<clause id="widgets"><title>Widgets</title>
|
571
|
-
<clause id="widgets1">
|
572
|
-
<recommendation model="ogc" id="note1">
|
573
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
574
|
-
</recommendation>
|
575
|
-
<recommendation model="ogc" id="note2">
|
576
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
577
|
-
</recommendation>
|
578
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
579
|
-
</clause>
|
580
|
-
</clause>
|
581
|
-
</sections>
|
582
|
-
<annex id="annex1">
|
583
|
-
<clause id="annex1a">
|
584
|
-
<recommendation model="ogc" id="AN">
|
585
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
586
|
-
</recommendation>
|
587
|
-
</clause>
|
588
|
-
<clause id="annex1b">
|
589
|
-
<recommendation model="ogc" id="Anote1" unnumbered="true">
|
590
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
591
|
-
</recommendation>
|
592
|
-
<recommendation model="ogc" id="Anote2">
|
593
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
594
|
-
</recommendation>
|
595
|
-
</clause>
|
596
|
-
</annex>
|
597
|
-
</iso-standard>
|
598
|
-
INPUT
|
599
|
-
output = <<~OUTPUT
|
600
|
-
<foreword displayorder='1'>
|
601
|
-
<p>
|
602
|
-
<xref target='N1'>
|
603
|
-
<span class='citetbl'>Table 1, Recommendation 1</span>
|
604
|
-
</xref>
|
605
|
-
<xref target='N2'>
|
606
|
-
<span class='citetbl'>Table (??), Recommendation (??)</span>
|
607
|
-
</xref>
|
608
|
-
<xref target='N'>
|
609
|
-
<span class='citetbl'>Table 2, Recommendation 2</span>
|
610
|
-
</xref>
|
611
|
-
<xref target='note1'>
|
612
|
-
<span class='citetbl'>Table 3, Recommendation 3</span>
|
613
|
-
</xref>
|
614
|
-
<xref target='note2'>
|
615
|
-
<span class='citetbl'>Table 4, Recommendation 4</span>
|
616
|
-
</xref>
|
617
|
-
<xref target='AN'>
|
618
|
-
<span class='citetbl'>Table A.1, Recommendation A.1</span>
|
619
|
-
</xref>
|
620
|
-
<xref target='Anote1'>
|
621
|
-
<span class='citetbl'>Table (??), Recommendation (??)</span>
|
622
|
-
</xref>
|
623
|
-
<xref target='Anote2'>
|
624
|
-
<span class='citetbl'>Table A.2, Recommendation A.2</span>
|
625
|
-
</xref>
|
626
|
-
</p>
|
627
|
-
</foreword>
|
628
|
-
OUTPUT
|
629
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
630
|
-
.convert("test", input, true))
|
631
|
-
.at("//xmlns:foreword").to_xml))
|
632
|
-
.to be_equivalent_to xmlpp(output)
|
633
|
-
end
|
634
|
-
|
635
|
-
it "cross-references recommendation tests" do
|
636
|
-
input = <<~INPUT
|
637
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
638
|
-
<preface>
|
639
|
-
<foreword>
|
640
|
-
<p>
|
641
|
-
<xref target="N1"/>
|
642
|
-
<xref target="N2"/>
|
643
|
-
<xref target="N"/>
|
644
|
-
<xref target="note1"/>
|
645
|
-
<xref target="note2"/>
|
646
|
-
<xref target="AN"/>
|
647
|
-
<xref target="Anote1"/>
|
648
|
-
<xref target="Anote2"/>
|
649
|
-
</p>
|
650
|
-
</foreword>
|
651
|
-
<introduction id="intro">
|
652
|
-
<recommendation model="ogc" id="N1" type="verification">
|
653
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
654
|
-
</recommendation>
|
655
|
-
<clause id="xyz"><title>Preparatory</title>
|
656
|
-
<recommendation model="ogc" id="N2" unnumbered="true" type="verification">
|
657
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
658
|
-
</recommendation>
|
659
|
-
</clause>
|
660
|
-
</introduction>
|
661
|
-
</preface>
|
662
|
-
<sections>
|
663
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
664
|
-
<recommendation model="ogc" id="N" type="verification">
|
665
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
666
|
-
</recommendation>
|
667
|
-
<p><xref target="N"/></p>
|
668
|
-
</clause>
|
669
|
-
<terms id="terms"/>
|
670
|
-
<clause id="widgets"><title>Widgets</title>
|
671
|
-
<clause id="widgets1">
|
672
|
-
<recommendation model="ogc" id="note1" type="verification">
|
673
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
674
|
-
</recommendation>
|
675
|
-
<recommendation model="ogc" id="note2" type="verification">
|
676
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
677
|
-
</recommendation>
|
678
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
679
|
-
</clause>
|
680
|
-
</clause>
|
681
|
-
</sections>
|
682
|
-
<annex id="annex1">
|
683
|
-
<clause id="annex1a">
|
684
|
-
<recommendation model="ogc" id="AN" type="verification">
|
685
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
686
|
-
</recommendation>
|
687
|
-
</clause>
|
688
|
-
<clause id="annex1b">
|
689
|
-
<recommendation model="ogc" id="Anote1" unnumbered="true" type="verification">
|
690
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
691
|
-
</recommendation>
|
692
|
-
<recommendation model="ogc" id="Anote2" type="verification">
|
693
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
694
|
-
</recommendation>
|
695
|
-
</clause>
|
696
|
-
</annex>
|
697
|
-
</iso-standard>
|
698
|
-
INPUT
|
699
|
-
output = <<~OUTPUT
|
700
|
-
<foreword displayorder='1'>
|
701
|
-
<p>
|
702
|
-
<xref target='N1'>
|
703
|
-
<span class='citetbl'>Table 1, Conformance test 1</span>
|
704
|
-
</xref>
|
705
|
-
<xref target='N2'>
|
706
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
707
|
-
</xref>
|
708
|
-
<xref target='N'>
|
709
|
-
<span class='citetbl'>Table 2, Conformance test 2</span>
|
710
|
-
</xref>
|
711
|
-
<xref target='note1'>
|
712
|
-
<span class='citetbl'>Table 3, Conformance test 3</span>
|
713
|
-
</xref>
|
714
|
-
<xref target='note2'>
|
715
|
-
<span class='citetbl'>Table 4, Conformance test 4</span>
|
716
|
-
</xref>
|
717
|
-
<xref target='AN'>
|
718
|
-
<span class='citetbl'>Table A.1, Conformance test A.1</span>
|
719
|
-
</xref>
|
720
|
-
<xref target='Anote1'>
|
721
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
722
|
-
</xref>
|
723
|
-
<xref target='Anote2'>
|
724
|
-
<span class='citetbl'>Table A.2, Conformance test A.2</span>
|
725
|
-
</xref>
|
726
|
-
</p>
|
727
|
-
</foreword>
|
728
|
-
OUTPUT
|
729
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
730
|
-
.convert("test", input, true))
|
731
|
-
.at("//xmlns:foreword").to_xml))
|
732
|
-
.to be_equivalent_to xmlpp(output)
|
733
|
-
end
|
734
|
-
|
735
|
-
it "cross-references permissions" do
|
736
|
-
input = <<~INPUT
|
737
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
738
|
-
<preface>
|
739
|
-
<foreword>
|
740
|
-
<p>
|
741
|
-
<xref target="N1"/>
|
742
|
-
<xref target="N2"/>
|
743
|
-
<xref target="N"/>
|
744
|
-
<xref target="note1"/>
|
745
|
-
<xref target="note2"/>
|
746
|
-
<xref target="AN"/>
|
747
|
-
<xref target="Anote1"/>
|
748
|
-
<xref target="Anote2"/>
|
749
|
-
</p>
|
750
|
-
</foreword>
|
751
|
-
<introduction id="intro">
|
752
|
-
<permission model="ogc" id="N1">
|
753
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
754
|
-
</permission>
|
755
|
-
<clause id="xyz"><title>Preparatory</title>
|
756
|
-
<permission model="ogc" id="N2" unnumbered="true">
|
757
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
758
|
-
</permission>
|
759
|
-
</clause>
|
760
|
-
</introduction>
|
761
|
-
</preface>
|
762
|
-
<sections>
|
763
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
764
|
-
<permission model="ogc" id="N">
|
765
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
766
|
-
</permission>
|
767
|
-
<p><xref target="N"/></p>
|
768
|
-
</clause>
|
769
|
-
<terms id="terms"/>
|
770
|
-
<clause id="widgets"><title>Widgets</title>
|
771
|
-
<clause id="widgets1">
|
772
|
-
<permission model="ogc" id="note1">
|
773
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
774
|
-
</permission>
|
775
|
-
<permission model="ogc" id="note2">
|
776
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
777
|
-
</permission>
|
778
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
779
|
-
</clause>
|
780
|
-
</clause>
|
781
|
-
</sections>
|
782
|
-
<annex id="annex1">
|
783
|
-
<clause id="annex1a">
|
784
|
-
<permission model="ogc" id="AN">
|
785
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
786
|
-
</permission>
|
787
|
-
</clause>
|
788
|
-
<clause id="annex1b">
|
789
|
-
<permission model="ogc" id="Anote1" unnumbered="true">
|
790
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
791
|
-
</permission>
|
792
|
-
<permission model="ogc" id="Anote2">
|
793
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
794
|
-
</permission>
|
795
|
-
</clause>
|
796
|
-
</annex>
|
797
|
-
</iso-standard>
|
798
|
-
INPUT
|
799
|
-
output = <<~OUTPUT
|
800
|
-
<foreword displayorder='1'>
|
801
|
-
<p>
|
802
|
-
<xref target='N1'>
|
803
|
-
<span class='citetbl'>Table 1, Permission 1</span>
|
804
|
-
</xref>
|
805
|
-
<xref target='N2'>
|
806
|
-
<span class='citetbl'>Table (??), Permission (??)</span>
|
807
|
-
</xref>
|
808
|
-
<xref target='N'>
|
809
|
-
<span class='citetbl'>Table 2, Permission 2</span>
|
810
|
-
</xref>
|
811
|
-
<xref target='note1'>
|
812
|
-
<span class='citetbl'>Table 3, Permission 3</span>
|
813
|
-
</xref>
|
814
|
-
<xref target='note2'>
|
815
|
-
<span class='citetbl'>Table 4, Permission 4</span>
|
816
|
-
</xref>
|
817
|
-
<xref target='AN'>
|
818
|
-
<span class='citetbl'>Table A.1, Permission A.1</span>
|
819
|
-
</xref>
|
820
|
-
<xref target='Anote1'>
|
821
|
-
<span class='citetbl'>Table (??), Permission (??)</span>
|
822
|
-
</xref>
|
823
|
-
<xref target='Anote2'>
|
824
|
-
<span class='citetbl'>Table A.2, Permission A.2</span>
|
825
|
-
</xref>
|
826
|
-
</p>
|
827
|
-
</foreword>
|
828
|
-
OUTPUT
|
829
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
830
|
-
.convert("test", input, true))
|
831
|
-
.at("//xmlns:foreword").to_xml))
|
832
|
-
.to be_equivalent_to xmlpp(output)
|
833
|
-
end
|
834
|
-
|
835
|
-
it "cross-references permission tests" do
|
836
|
-
input = <<~INPUT
|
837
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
838
|
-
<preface>
|
839
|
-
<foreword>
|
840
|
-
<p>
|
841
|
-
<xref target="N1"/>
|
842
|
-
<xref target="N2"/>
|
843
|
-
<xref target="N"/>
|
844
|
-
<xref target="note1"/>
|
845
|
-
<xref target="note2"/>
|
846
|
-
<xref target="AN"/>
|
847
|
-
<xref target="Anote1"/>
|
848
|
-
<xref target="Anote2"/>
|
849
|
-
</p>
|
850
|
-
</foreword>
|
851
|
-
<introduction id="intro">
|
852
|
-
<permission model="ogc" id="N1" type="verification">
|
853
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
854
|
-
</permission>
|
855
|
-
<clause id="xyz"><title>Preparatory</title>
|
856
|
-
<permission model="ogc" id="N2" unnumbered="true" type="verification">
|
857
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
858
|
-
</permission>
|
859
|
-
</clause>
|
860
|
-
</introduction>
|
861
|
-
</preface>
|
862
|
-
<sections>
|
863
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
864
|
-
<permission model="ogc" id="N" type="verification">
|
865
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
866
|
-
</permission>
|
867
|
-
<p><xref target="N"/></p>
|
868
|
-
</clause>
|
869
|
-
<terms id="terms"/>
|
870
|
-
<clause id="widgets"><title>Widgets</title>
|
871
|
-
<clause id="widgets1">
|
872
|
-
<permission model="ogc" id="note1" type="verification">
|
873
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
874
|
-
</permission>
|
875
|
-
<permission model="ogc" id="note2" type="verification">
|
876
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
877
|
-
</permission>
|
878
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
879
|
-
</clause>
|
880
|
-
</clause>
|
881
|
-
</sections>
|
882
|
-
<annex id="annex1">
|
883
|
-
<clause id="annex1a">
|
884
|
-
<permission model="ogc" id="AN" type="verification">
|
885
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
886
|
-
</permission>
|
887
|
-
</clause>
|
888
|
-
<clause id="annex1b">
|
889
|
-
<permission model="ogc" id="Anote1" unnumbered="true" type="verification">
|
890
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
891
|
-
</permission>
|
892
|
-
<permission model="ogc" id="Anote2" type="verification">
|
893
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
894
|
-
</permission>
|
895
|
-
</clause>
|
896
|
-
</annex>
|
897
|
-
</iso-standard>
|
898
|
-
INPUT
|
899
|
-
output = <<~OUTPUT
|
900
|
-
<foreword displayorder='1'>
|
901
|
-
<p>
|
902
|
-
<xref target='N1'>
|
903
|
-
<span class='citetbl'>Table 1, Conformance test 1</span>
|
904
|
-
</xref>
|
905
|
-
<xref target='N2'>
|
906
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
907
|
-
</xref>
|
908
|
-
<xref target='N'>
|
909
|
-
<span class='citetbl'>Table 2, Conformance test 2</span>
|
910
|
-
</xref>
|
911
|
-
<xref target='note1'>
|
912
|
-
<span class='citetbl'>Table 3, Conformance test 3</span>
|
913
|
-
</xref>
|
914
|
-
<xref target='note2'>
|
915
|
-
<span class='citetbl'>Table 4, Conformance test 4</span>
|
916
|
-
</xref>
|
917
|
-
<xref target='AN'>
|
918
|
-
<span class='citetbl'>Table A.1, Conformance test A.1</span>
|
919
|
-
</xref>
|
920
|
-
<xref target='Anote1'>
|
921
|
-
<span class='citetbl'>Table (??), Conformance test (??)</span>
|
922
|
-
</xref>
|
923
|
-
<xref target='Anote2'>
|
924
|
-
<span class='citetbl'>Table A.2, Conformance test A.2</span>
|
925
|
-
</xref>
|
926
|
-
</p>
|
927
|
-
</foreword>
|
928
|
-
OUTPUT
|
929
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
930
|
-
.convert("test", input, true))
|
931
|
-
.at("//xmlns:foreword").to_xml))
|
932
|
-
.to be_equivalent_to xmlpp(output)
|
933
|
-
end
|
934
|
-
|
935
|
-
it "labels and cross-references nested requirements" do
|
936
|
-
input = <<~INPUT
|
937
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
938
|
-
<preface>
|
939
|
-
<foreword>
|
940
|
-
<p>
|
941
|
-
<xref target="N1"/>
|
942
|
-
<xref target="N2"/>
|
943
|
-
<xref target="N"/>
|
944
|
-
<xref target="Q1"/>
|
945
|
-
<xref target="R1"/>
|
946
|
-
<xref target="AN1"/>
|
947
|
-
<xref target="AN2"/>
|
948
|
-
<xref target="AN"/>
|
949
|
-
<xref target="AQ1"/>
|
950
|
-
<xref target="AR1"/>
|
951
|
-
</p>
|
952
|
-
</foreword>
|
953
|
-
</preface>
|
954
|
-
<sections>
|
955
|
-
<clause id="xyz"><title>Preparatory</title>
|
956
|
-
<permission model="ogc" id="N1">
|
957
|
-
<permission model="ogc" id="N2" type="verification">
|
958
|
-
<permission model="ogc" id="N">
|
959
|
-
</permission>
|
960
|
-
</permission>
|
961
|
-
<requirement model="ogc" id="Q1">
|
962
|
-
</requirement>
|
963
|
-
<recommendation model="ogc" id="R1">
|
964
|
-
</recommendation>
|
965
|
-
<permission model="ogc" id="N3" type="verification"/>
|
966
|
-
<permission model="ogc" id="N4"/>
|
967
|
-
</permission>
|
968
|
-
</clause>
|
969
|
-
</sections>
|
970
|
-
<annex id="Axyz"><title>Preparatory</title>
|
971
|
-
<permission model="ogc" id="AN1" type="verification">
|
972
|
-
<permission model="ogc" id="AN2">
|
973
|
-
<permission model="ogc" id="AN" type="verification">
|
974
|
-
</permission>
|
975
|
-
</permission>
|
976
|
-
<requirement model="ogc" id="AQ1">
|
977
|
-
</requirement>
|
978
|
-
<recommendation model="ogc" id="AR1">
|
979
|
-
</recommendation>
|
980
|
-
<permission model="ogc" id="AN3" type="verification"/>
|
981
|
-
<permission model="ogc" id="AN4"/>
|
982
|
-
</permission>
|
983
|
-
</annex>
|
984
|
-
</iso-standard>
|
985
|
-
INPUT
|
986
|
-
output = <<~OUTPUT
|
987
|
-
<foreword displayorder='1'>
|
988
|
-
<p>
|
989
|
-
<xref target='N1'>
|
990
|
-
<span class='citetbl'>Table 1, Permission 1</span>
|
991
|
-
</xref>
|
992
|
-
<xref target='N2'>Table 1, Conformance test 1-1</xref>
|
993
|
-
<xref target='N'>Table 1, Permission 1-1-1</xref>
|
994
|
-
<xref target='Q1'>Table 1, Requirement 1-1</xref>
|
995
|
-
<xref target='R1'>Table 1, Recommendation 1-1</xref>
|
996
|
-
<xref target='AN1'>
|
997
|
-
<span class='citetbl'>Table A.1, Conformance test A.1</span>
|
998
|
-
</xref>
|
999
|
-
<xref target='AN2'>Table A.1, Permission A.1-1</xref>
|
1000
|
-
<xref target='AN'>Table A.1, Conformance test A.1-1-1</xref>
|
1001
|
-
<xref target='AQ1'>Table A.1, Requirement A.1-1</xref>
|
1002
|
-
<xref target='AR1'>Table A.1, Recommendation A.1-1</xref>
|
1003
|
-
</p>
|
1004
|
-
</foreword>
|
1005
|
-
OUTPUT
|
1006
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1007
|
-
.convert("test", input, true))
|
1008
|
-
.at("//xmlns:foreword").to_xml))
|
1009
|
-
.to be_equivalent_to xmlpp(output)
|
1010
|
-
end
|
1011
|
-
|
1012
|
-
it "cross-references abstract tests" do
|
1013
|
-
input = <<~INPUT
|
1014
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1015
|
-
<preface>
|
1016
|
-
<foreword>
|
1017
|
-
<p>
|
1018
|
-
<xref target="N1"/>
|
1019
|
-
<xref target="N2"/>
|
1020
|
-
<xref target="N"/>
|
1021
|
-
<xref target="note1"/>
|
1022
|
-
<xref target="note2"/>
|
1023
|
-
<xref target="AN"/>
|
1024
|
-
<xref target="Anote1"/>
|
1025
|
-
<xref target="Anote2"/>
|
1026
|
-
</p>
|
1027
|
-
</foreword>
|
1028
|
-
<introduction id="intro">
|
1029
|
-
<permission model="ogc" id="N1" type="abstracttest">
|
1030
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1031
|
-
</permission>
|
1032
|
-
<clause id="xyz"><title>Preparatory</title>
|
1033
|
-
<permission model="ogc" id="N2" unnumbered="true" type="abstracttest">
|
1034
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1035
|
-
</permission>
|
1036
|
-
</clause>
|
1037
|
-
</introduction>
|
1038
|
-
</preface>
|
1039
|
-
<sections>
|
1040
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1041
|
-
<permission model="ogc" id="N" type="abstracttest">
|
1042
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1043
|
-
</permission>
|
1044
|
-
<p><xref target="N"/></p>
|
1045
|
-
</clause>
|
1046
|
-
<terms id="terms"/>
|
1047
|
-
<clause id="widgets"><title>Widgets</title>
|
1048
|
-
<clause id="widgets1">
|
1049
|
-
<permission model="ogc" id="note1" type="abstracttest">
|
1050
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1051
|
-
</permission>
|
1052
|
-
<permission model="ogc" id="note2" type="abstracttest">
|
1053
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1054
|
-
</permission>
|
1055
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
1056
|
-
</clause>
|
1057
|
-
</clause>
|
1058
|
-
</sections>
|
1059
|
-
<annex id="annex1">
|
1060
|
-
<clause id="annex1a">
|
1061
|
-
<permission model="ogc" id="AN" type="abstracttest">
|
1062
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1063
|
-
</permission>
|
1064
|
-
</clause>
|
1065
|
-
<clause id="annex1b">
|
1066
|
-
<permission model="ogc" id="Anote1" unnumbered="true" type="abstracttest">
|
1067
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1068
|
-
</permission>
|
1069
|
-
<permission model="ogc" id="Anote2" type="abstracttest">
|
1070
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1071
|
-
</permission>
|
1072
|
-
</clause>
|
1073
|
-
</annex>
|
1074
|
-
</iso-standard>
|
1075
|
-
INPUT
|
1076
|
-
output = <<~OUTPUT
|
1077
|
-
<foreword displayorder='1'>
|
1078
|
-
<p>
|
1079
|
-
<xref target='N1'>
|
1080
|
-
<span class='citetbl'>Table 1, Abstract test 1</span>
|
1081
|
-
</xref>
|
1082
|
-
<xref target='N2'>
|
1083
|
-
<span class='citetbl'>Table (??), Abstract test (??)</span>
|
1084
|
-
</xref>
|
1085
|
-
<xref target='N'>
|
1086
|
-
<span class='citetbl'>Table 2, Abstract test 2</span>
|
1087
|
-
</xref>
|
1088
|
-
<xref target='note1'>
|
1089
|
-
<span class='citetbl'>Table 3, Abstract test 3</span>
|
1090
|
-
</xref>
|
1091
|
-
<xref target='note2'>
|
1092
|
-
<span class='citetbl'>Table 4, Abstract test 4</span>
|
1093
|
-
</xref>
|
1094
|
-
<xref target='AN'>
|
1095
|
-
<span class='citetbl'>Table A.1, Abstract test A.1</span>
|
1096
|
-
</xref>
|
1097
|
-
<xref target='Anote1'>
|
1098
|
-
<span class='citetbl'>Table (??), Abstract test (??)</span>
|
1099
|
-
</xref>
|
1100
|
-
<xref target='Anote2'>
|
1101
|
-
<span class='citetbl'>Table A.2, Abstract test A.2</span>
|
1102
|
-
</xref>
|
1103
|
-
</p>
|
1104
|
-
</foreword>
|
1105
|
-
OUTPUT
|
1106
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1107
|
-
.convert("test", input, true))
|
1108
|
-
.at("//xmlns:foreword").to_xml))
|
1109
|
-
.to be_equivalent_to xmlpp(output)
|
1110
|
-
end
|
1111
|
-
|
1112
|
-
it "cross-references conformance classes" do
|
1113
|
-
input = <<~INPUT
|
1114
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1115
|
-
<preface>
|
1116
|
-
<foreword>
|
1117
|
-
<p>
|
1118
|
-
<xref target="N1"/>
|
1119
|
-
<xref target="N2"/>
|
1120
|
-
<xref target="N"/>
|
1121
|
-
<xref target="note1"/>
|
1122
|
-
<xref target="note2"/>
|
1123
|
-
<xref target="AN"/>
|
1124
|
-
<xref target="Anote1"/>
|
1125
|
-
<xref target="Anote2"/>
|
1126
|
-
</p>
|
1127
|
-
</foreword>
|
1128
|
-
<introduction id="intro">
|
1129
|
-
<permission model="ogc" id="N1" type="conformanceclass">
|
1130
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1131
|
-
</permission>
|
1132
|
-
<clause id="xyz"><title>Preparatory</title>
|
1133
|
-
<permission model="ogc" id="N2" unnumbered="true" type="conformanceclass">
|
1134
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1135
|
-
</permission>
|
1136
|
-
</clause>
|
1137
|
-
</introduction>
|
1138
|
-
</preface>
|
1139
|
-
<sections>
|
1140
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1141
|
-
<permission model="ogc" id="N" type="conformanceclass">
|
1142
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1143
|
-
</permission>
|
1144
|
-
<p><xref target="N"/></p>
|
1145
|
-
</clause>
|
1146
|
-
<terms id="terms"/>
|
1147
|
-
<clause id="widgets"><title>Widgets</title>
|
1148
|
-
<clause id="widgets1">
|
1149
|
-
<permission model="ogc" id="note1" type="conformanceclass">
|
1150
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1151
|
-
</permission>
|
1152
|
-
<permission model="ogc" id="note2" type="conformanceclass">
|
1153
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1154
|
-
</permission>
|
1155
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
1156
|
-
</clause>
|
1157
|
-
</clause>
|
1158
|
-
</sections>
|
1159
|
-
<annex id="annex1">
|
1160
|
-
<clause id="annex1a">
|
1161
|
-
<permission model="ogc" id="AN" type="conformanceclass">
|
1162
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1163
|
-
</permission>
|
1164
|
-
</clause>
|
1165
|
-
<clause id="annex1b">
|
1166
|
-
<permission model="ogc" id="Anote1" unnumbered="true" type="conformanceclass">
|
1167
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1168
|
-
</permission>
|
1169
|
-
<permission model="ogc" id="Anote2" type="conformanceclass">
|
1170
|
-
<stem type="AsciiMath">r = 1 %</stem>
|
1171
|
-
</permission>
|
1172
|
-
</clause>
|
1173
|
-
</annex>
|
1174
|
-
</iso-standard>
|
1175
|
-
INPUT
|
1176
|
-
output = <<~OUTPUT
|
1177
|
-
<foreword displayorder='1'>
|
1178
|
-
<p>
|
1179
|
-
<xref target='N1'>
|
1180
|
-
<span class='citetbl'>Table 1, Conformance class 1</span>
|
1181
|
-
</xref>
|
1182
|
-
<xref target='N2'>
|
1183
|
-
<span class='citetbl'>Table (??), Conformance class (??)</span>
|
1184
|
-
</xref>
|
1185
|
-
<xref target='N'>
|
1186
|
-
<span class='citetbl'>Table 2, Conformance class 2</span>
|
1187
|
-
</xref>
|
1188
|
-
<xref target='note1'>
|
1189
|
-
<span class='citetbl'>Table 3, Conformance class 3</span>
|
1190
|
-
</xref>
|
1191
|
-
<xref target='note2'>
|
1192
|
-
<span class='citetbl'>Table 4, Conformance class 4</span>
|
1193
|
-
</xref>
|
1194
|
-
<xref target='AN'>
|
1195
|
-
<span class='citetbl'>Table A.1, Conformance class A.1</span>
|
1196
|
-
</xref>
|
1197
|
-
<xref target='Anote1'>
|
1198
|
-
<span class='citetbl'>Table (??), Conformance class (??)</span>
|
1199
|
-
</xref>
|
1200
|
-
<xref target='Anote2'>
|
1201
|
-
<span class='citetbl'>Table A.2, Conformance class A.2</span>
|
1202
|
-
</xref>
|
1203
|
-
</p>
|
1204
|
-
</foreword>
|
1205
|
-
OUTPUT
|
1206
|
-
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1207
|
-
.convert("test", input, true))
|
1208
|
-
.at("//xmlns:foreword").to_xml))
|
1209
|
-
.to be_equivalent_to xmlpp(output)
|
1210
|
-
end
|
1211
|
-
end
|