metanorma-bsi 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of metanorma-bsi might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +43 -0
- data/.github/workflows/release_github_packages.yml +49 -0
- data/.hound.yml +3 -1
- data/.rubocop.yml +4 -8
- data/README.adoc +95 -11
- data/lib/asciidoctor/bsi/biblio.rng +1 -0
- data/lib/asciidoctor/bsi/bsi.rng +32 -4
- data/lib/asciidoctor/bsi/bsi_intro_en.xml +87 -61
- data/lib/asciidoctor/bsi/cleanup.rb +15 -8
- data/lib/asciidoctor/bsi/cleanup_ref.rb +10 -21
- data/lib/asciidoctor/bsi/converter.rb +7 -5
- data/lib/asciidoctor/bsi/front.rb +26 -5
- data/lib/asciidoctor/bsi/isodoc.rng +191 -3
- data/lib/asciidoctor/bsi/isostandard.rng +12 -0
- data/lib/asciidoctor/bsi/validate.rb +5 -6
- data/lib/asciidoctor/bsi/validate_list.rb +2 -2
- data/lib/isodoc/bsi/base_convert.rb +2 -1
- data/lib/isodoc/bsi/bsi.international-standard.xsl +3380 -2349
- data/lib/isodoc/bsi/html/htmlstyle.css +43 -22
- data/lib/isodoc/bsi/html/htmlstyle.scss +46 -22
- data/lib/isodoc/bsi/html_convert.rb +2 -2
- data/lib/isodoc/bsi/i18n-en.yaml +4 -4
- data/lib/isodoc/bsi/metadata.rb +2 -2
- data/lib/isodoc/bsi/presentation_xml_convert.rb +26 -5
- data/lib/isodoc/bsi/xref.rb +11 -4
- data/lib/metanorma/bsi/version.rb +1 -1
- data/metanorma-bsi.gemspec +2 -2
- data/spec/asciidoctor/base_spec.rb +564 -494
- data/spec/asciidoctor/blocks_spec.rb +192 -195
- data/spec/asciidoctor/cleanup_spec.rb +361 -361
- data/spec/asciidoctor/refs_spec.rb +8 -78
- data/spec/asciidoctor/section_spec.rb +227 -227
- data/spec/asciidoctor/validate_spec.rb +26 -1
- data/spec/isodoc/blocks_spec.rb +56 -21
- data/spec/isodoc/i18n_spec.rb +156 -234
- data/spec/isodoc/inline_spec.rb +7 -7
- data/spec/isodoc/iso_spec.rb +4 -4
- data/spec/isodoc/metadata_spec.rb +0 -1
- data/spec/isodoc/ref_spec.rb +7 -7
- data/spec/isodoc/section_spec.rb +400 -343
- data/spec/isodoc/terms_spec.rb +224 -225
- data/spec/isodoc/xref_spec.rb +1347 -1360
- data/spec/metanorma/processor_spec.rb +37 -40
- data/spec/spec_helper.rb +6 -4
- data/spec/vcr_cassettes/iso-639.yml +19 -19
- data/spec/vcr_cassettes/isobib_get_639_1967.yml +17 -17
- data/spec/vcr_cassettes/multistandard.yml +15 -193
- metadata +7 -5
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -2,8 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc::BSI do
|
4
4
|
it "cross-references commentaries" do
|
5
|
-
|
6
|
-
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
5
|
+
input = <<~INPUT
|
7
6
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
8
7
|
<preface>
|
9
8
|
<foreword>
|
@@ -57,60 +56,39 @@ RSpec.describe IsoDoc::BSI do
|
|
57
56
|
</sections>
|
58
57
|
</iso-standard>
|
59
58
|
INPUT
|
60
|
-
|
61
|
-
|
62
|
-
<
|
63
|
-
<
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
<
|
73
|
-
<
|
74
|
-
1
|
75
|
-
|
76
|
-
Reagents
|
77
|
-
</title>
|
78
|
-
<admonition id='N' type='commentary' target='reag1'>
|
79
|
-
<name>COMMENTARY 1 ON CLAUSE 1</name>
|
80
|
-
<p id='p1'>This is a commentary on the reagents</p>
|
81
|
-
</admonition>
|
82
|
-
<admonition id='note1' type='commentary' target='reag1'>
|
83
|
-
<name>COMMENTARY 2 ON CLAUSE 1</name>
|
84
|
-
<p id='p2'>This is a commentary on the reagents</p>
|
85
|
-
</admonition>
|
86
|
-
<admonition id='note2' type='commentary' target='table1'>
|
87
|
-
<name>COMMENTARY ON TABLE 1</name>
|
88
|
-
<p id='p3'>This is a commentary on the reagents</p>
|
89
|
-
</admonition>
|
90
|
-
<table id='table1'>
|
91
|
-
<name>Table 1 — Reagents in use</name>
|
92
|
-
<tbody>
|
93
|
-
<tr>
|
94
|
-
<td valign='top' align='left'>A</td>
|
95
|
-
<td valign='top' align='left'>B</td>
|
96
|
-
</tr>
|
97
|
-
</tbody>
|
98
|
-
</table>
|
99
|
-
</clause>
|
100
|
-
<clause id='reag0'>
|
101
|
-
<title>2</title>
|
102
|
-
<clause id='reag2' inline-header='false' obligation='normative'>
|
103
|
-
<title depth='2'>
|
104
|
-
2.1
|
59
|
+
output = <<~OUTPUT
|
60
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
|
61
|
+
<preface>
|
62
|
+
<foreword displayorder='1'>
|
63
|
+
<p>
|
64
|
+
<xref target='N'>Commentary 1 on Clause 1</xref>
|
65
|
+
<xref target='note1'>Commentary 2 on Clause 1</xref>
|
66
|
+
<xref target='note2'>Commentary on Table 1</xref>
|
67
|
+
<xref target='AN'>Commentary on Clause 2.1</xref>
|
68
|
+
</p>
|
69
|
+
</foreword>
|
70
|
+
</preface>
|
71
|
+
<sections>
|
72
|
+
<clause id='reag1' inline-header='false' obligation='normative' displayorder="2">
|
73
|
+
<title depth='1'>
|
74
|
+
1
|
105
75
|
<tab/>
|
106
76
|
Reagents
|
107
77
|
</title>
|
108
|
-
<admonition id='
|
109
|
-
<name>COMMENTARY ON CLAUSE
|
78
|
+
<admonition id='N' type='commentary' target='reag1'>
|
79
|
+
<name>COMMENTARY 1 ON CLAUSE 1</name>
|
80
|
+
<p id='p1'>This is a commentary on the reagents</p>
|
81
|
+
</admonition>
|
82
|
+
<admonition id='note1' type='commentary' target='reag1'>
|
83
|
+
<name>COMMENTARY 2 ON CLAUSE 1</name>
|
110
84
|
<p id='p2'>This is a commentary on the reagents</p>
|
111
85
|
</admonition>
|
112
|
-
<
|
113
|
-
<name>
|
86
|
+
<admonition id='note2' type='commentary' target='table1'>
|
87
|
+
<name>COMMENTARY ON TABLE 1</name>
|
88
|
+
<p id='p3'>This is a commentary on the reagents</p>
|
89
|
+
</admonition>
|
90
|
+
<table id='table1'>
|
91
|
+
<name>Table 1 — Reagents in use</name>
|
114
92
|
<tbody>
|
115
93
|
<tr>
|
116
94
|
<td valign='top' align='left'>A</td>
|
@@ -119,658 +97,710 @@ RSpec.describe IsoDoc::BSI do
|
|
119
97
|
</tbody>
|
120
98
|
</table>
|
121
99
|
</clause>
|
122
|
-
|
123
|
-
|
124
|
-
|
100
|
+
<clause id='reag0' displayorder="3">
|
101
|
+
<title>2</title>
|
102
|
+
<clause id='reag2' inline-header='false' obligation='normative'>
|
103
|
+
<title depth='2'>
|
104
|
+
2.1
|
105
|
+
<tab/>
|
106
|
+
Reagents
|
107
|
+
</title>
|
108
|
+
<admonition id='AN' type='commentary' target='reag2'>
|
109
|
+
<name>COMMENTARY ON CLAUSE 2.1</name>
|
110
|
+
<p id='p2'>This is a commentary on the reagents</p>
|
111
|
+
</admonition>
|
112
|
+
<table id='table2'>
|
113
|
+
<name>Table 2 — Reagents in use</name>
|
114
|
+
<tbody>
|
115
|
+
<tr>
|
116
|
+
<td valign='top' align='left'>A</td>
|
117
|
+
<td valign='top' align='left'>B</td>
|
118
|
+
</tr>
|
119
|
+
</tbody>
|
120
|
+
</table>
|
121
|
+
</clause>
|
122
|
+
</clause>
|
123
|
+
</sections>
|
124
|
+
</iso-standard>
|
125
125
|
OUTPUT
|
126
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
127
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
126
128
|
end
|
127
129
|
|
128
130
|
it "cross-references notes" do
|
129
|
-
|
130
|
-
|
131
|
-
<
|
132
|
-
<
|
133
|
-
<
|
134
|
-
<
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
<
|
145
|
-
<
|
146
|
-
|
147
|
-
<
|
148
|
-
|
149
|
-
|
150
|
-
<
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<
|
156
|
-
|
157
|
-
<
|
158
|
-
<note id="note1">
|
159
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
160
|
-
</note>
|
161
|
-
<note id="note2">
|
162
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
163
|
-
</note>
|
164
|
-
<p>
|
165
|
-
<xref target="note1"/>
|
166
|
-
<xref target="note2"/>
|
167
|
-
</p>
|
168
|
-
</clause>
|
169
|
-
</clause>
|
170
|
-
</sections>
|
171
|
-
<annex id="annex1">
|
172
|
-
<clause id="annex1a">
|
173
|
-
<note id="AN">
|
174
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
175
|
-
</note>
|
176
|
-
</clause>
|
177
|
-
<clause id="annex1b">
|
178
|
-
<note id="Anote1">
|
131
|
+
input = <<~INPUT
|
132
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
133
|
+
<preface>
|
134
|
+
<foreword>
|
135
|
+
<p>
|
136
|
+
<xref target="N"/>
|
137
|
+
<xref target="note1"/>
|
138
|
+
<xref target="note2"/>
|
139
|
+
<xref target="AN"/>
|
140
|
+
<xref target="Anote1"/>
|
141
|
+
<xref target="Anote2"/>
|
142
|
+
</p>
|
143
|
+
</foreword>
|
144
|
+
</preface>
|
145
|
+
<sections>
|
146
|
+
<clause id="scope" type="scope">
|
147
|
+
<title>Scope</title>
|
148
|
+
<note id="N">
|
149
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
150
|
+
</note>
|
151
|
+
<p>
|
152
|
+
<xref target="N"/>
|
153
|
+
</p>
|
154
|
+
</clause>
|
155
|
+
<terms id="terms"/>
|
156
|
+
<clause id="widgets">
|
157
|
+
<title>Widgets</title>
|
158
|
+
<clause id="widgets1">
|
159
|
+
<note id="note1">
|
179
160
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
180
161
|
</note>
|
181
|
-
<note id="
|
162
|
+
<note id="note2">
|
182
163
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
183
164
|
</note>
|
184
|
-
</clause>
|
185
|
-
</annex>
|
186
|
-
</iso-standard>
|
187
|
-
INPUT
|
188
|
-
<?xml version='1.0'?>
|
189
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
190
|
-
<preface>
|
191
|
-
<foreword>
|
192
|
-
<p>
|
193
|
-
<xref target="N">Clause <strong>1</strong>, Note</xref>
|
194
|
-
<xref target="note1"><strong>3.1</strong>, Note 1</xref>
|
195
|
-
<xref target="note2"><strong>3.1</strong>, Note 2</xref>
|
196
|
-
<xref target="AN"><strong>A.1</strong>, Note</xref>
|
197
|
-
<xref target="Anote1"><strong>A.2</strong>, Note 1</xref>
|
198
|
-
<xref target="Anote2"><strong>A.2</strong>, Note 2</xref>
|
199
|
-
</p>
|
200
|
-
</foreword>
|
201
|
-
</preface>
|
202
|
-
<sections>
|
203
|
-
<clause id="scope" type="scope">
|
204
|
-
<title depth="1">1
|
205
|
-
<tab/>
|
206
|
-
Scope</title>
|
207
|
-
<note id="N">
|
208
|
-
<name>NOTE</name>
|
209
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
210
|
-
types of kernel.
|
211
|
-
</p>
|
212
|
-
</note>
|
213
165
|
<p>
|
214
|
-
<xref target="
|
166
|
+
<xref target="note1"/>
|
167
|
+
<xref target="note2"/>
|
215
168
|
</p>
|
216
169
|
</clause>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
</
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
<strong>
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
170
|
+
</clause>
|
171
|
+
</sections>
|
172
|
+
<annex id="annex1">
|
173
|
+
<clause id="annex1a">
|
174
|
+
<note id="AN">
|
175
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
176
|
+
</note>
|
177
|
+
</clause>
|
178
|
+
<clause id="annex1b">
|
179
|
+
<note id="Anote1">
|
180
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
181
|
+
</note>
|
182
|
+
<note id="Anote2">
|
183
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
184
|
+
</note>
|
185
|
+
</clause>
|
186
|
+
</annex>
|
187
|
+
</iso-standard>
|
188
|
+
INPUT
|
189
|
+
output = <<~OUTPUT
|
190
|
+
<?xml version='1.0'?>
|
191
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
192
|
+
<preface>
|
193
|
+
<foreword displayorder='1'>
|
194
|
+
<p>
|
195
|
+
<xref target="N">Clause <strong>1</strong>, Note</xref>
|
196
|
+
<xref target="note1"><strong>3.1</strong>, Note 1</xref>
|
197
|
+
<xref target="note2"><strong>3.1</strong>, Note 2</xref>
|
198
|
+
<xref target="AN"><strong>A.1</strong>, Note</xref>
|
199
|
+
<xref target="Anote1"><strong>A.2</strong>, Note 1</xref>
|
200
|
+
<xref target="Anote2"><strong>A.2</strong>, Note 2</xref>
|
201
|
+
</p>
|
202
|
+
</foreword>
|
203
|
+
</preface>
|
204
|
+
<sections>
|
205
|
+
<clause id="scope" type="scope" displayorder='2'>
|
206
|
+
<title depth="1">1
|
207
|
+
<tab/>
|
208
|
+
Scope</title>
|
209
|
+
<note id="N">
|
210
|
+
<name>NOTE</name>
|
211
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
212
|
+
types of kernel.
|
213
|
+
</p>
|
214
|
+
</note>
|
215
|
+
<p>
|
216
|
+
<xref target="N">Note</xref>
|
217
|
+
</p>
|
218
|
+
</clause>
|
219
|
+
<terms id="terms" displayorder='3'>
|
220
|
+
<title>2</title>
|
221
|
+
</terms>
|
222
|
+
<clause id="widgets" displayorder='4'>
|
223
|
+
<title depth="1">3
|
224
|
+
<tab/>
|
225
|
+
Widgets</title>
|
226
|
+
<clause id="widgets1" inline-header="true">
|
227
|
+
<title>3.1</title>
|
228
|
+
<note id="note1">
|
261
229
|
<name>NOTE 1</name>
|
262
230
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
263
231
|
types of kernel.
|
264
232
|
</p>
|
265
233
|
</note>
|
266
|
-
<note id="
|
234
|
+
<note id="note2">
|
267
235
|
<name>NOTE 2</name>
|
268
236
|
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
269
237
|
types of kernel.
|
270
238
|
</p>
|
271
239
|
</note>
|
240
|
+
<p>
|
241
|
+
<xref target="note1">Note 1</xref>
|
242
|
+
<xref target="note2">Note 2</xref>
|
243
|
+
</p>
|
272
244
|
</clause>
|
273
|
-
</
|
274
|
-
</
|
275
|
-
|
245
|
+
</clause>
|
246
|
+
</sections>
|
247
|
+
<annex id="annex1" displayorder='5'>
|
248
|
+
<title>
|
249
|
+
<strong>Annex A</strong>
|
250
|
+
<tab/>(informative)</title>
|
251
|
+
<clause id="annex1a" inline-header="true">
|
252
|
+
<title>A.1</title>
|
253
|
+
<note id="AN">
|
254
|
+
<name>NOTE</name>
|
255
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
256
|
+
types of kernel.
|
257
|
+
</p>
|
258
|
+
</note>
|
259
|
+
</clause>
|
260
|
+
<clause id="annex1b" inline-header="true">
|
261
|
+
<title>A.2</title>
|
262
|
+
<note id="Anote1">
|
263
|
+
<name>NOTE 1</name>
|
264
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
265
|
+
types of kernel.
|
266
|
+
</p>
|
267
|
+
</note>
|
268
|
+
<note id="Anote2">
|
269
|
+
<name>NOTE 2</name>
|
270
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
271
|
+
types of kernel.
|
272
|
+
</p>
|
273
|
+
</note>
|
274
|
+
</clause>
|
275
|
+
</annex>
|
276
|
+
</iso-standard>
|
277
|
+
OUTPUT
|
278
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
279
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
276
280
|
end
|
277
281
|
|
278
282
|
it "cross-references figures (Presentation XML)" do
|
279
|
-
|
280
|
-
|
281
|
-
<
|
282
|
-
<
|
283
|
-
<
|
284
|
-
<
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
<
|
295
|
-
<
|
296
|
-
|
297
|
-
<
|
283
|
+
input = <<~INPUT
|
284
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
285
|
+
<preface>
|
286
|
+
<foreword id="fwd">
|
287
|
+
<p>
|
288
|
+
<xref target="N"/>
|
289
|
+
<xref target="note1"/>
|
290
|
+
<xref target="note2"/>
|
291
|
+
<xref target="AN"/>
|
292
|
+
<xref target="Anote1"/>
|
293
|
+
<xref target="Anote2"/>
|
294
|
+
</p>
|
295
|
+
</foreword>
|
296
|
+
</preface>
|
297
|
+
<sections>
|
298
|
+
<clause id="scope" type="scope">
|
299
|
+
<title>Scope</title>
|
300
|
+
<figure id="N">
|
301
|
+
<name>Split-it-right sample divider</name>
|
302
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
303
|
+
</figure>
|
304
|
+
<p>
|
305
|
+
<xref target="N"/>
|
306
|
+
</p>
|
307
|
+
</clause>
|
308
|
+
<terms id="terms"/>
|
309
|
+
<clause id="widgets">
|
310
|
+
<title>Widgets</title>
|
311
|
+
<clause id="widgets1">
|
312
|
+
<figure id="note1">
|
298
313
|
<name>Split-it-right sample divider</name>
|
299
314
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
300
315
|
</figure>
|
301
|
-
<
|
302
|
-
<xref target="N"/>
|
303
|
-
</p>
|
304
|
-
</clause>
|
305
|
-
<terms id="terms"/>
|
306
|
-
<clause id="widgets">
|
307
|
-
<title>Widgets</title>
|
308
|
-
<clause id="widgets1">
|
309
|
-
<figure id="note1">
|
310
|
-
<name>Split-it-right sample divider</name>
|
311
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
312
|
-
</figure>
|
313
|
-
<figure id="note2">
|
314
|
-
<name>Split-it-right sample divider</name>
|
315
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
316
|
-
</figure>
|
317
|
-
<p>
|
318
|
-
<xref target="note1"/>
|
319
|
-
<xref target="note2"/>
|
320
|
-
</p>
|
321
|
-
</clause>
|
322
|
-
</clause>
|
323
|
-
</sections>
|
324
|
-
<annex id="annex1">
|
325
|
-
<clause id="annex1a">
|
326
|
-
<figure id="AN">
|
316
|
+
<figure id="note2">
|
327
317
|
<name>Split-it-right sample divider</name>
|
328
318
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
329
319
|
</figure>
|
320
|
+
<p>
|
321
|
+
<xref target="note1"/>
|
322
|
+
<xref target="note2"/>
|
323
|
+
</p>
|
330
324
|
</clause>
|
331
|
-
|
332
|
-
|
333
|
-
|
325
|
+
</clause>
|
326
|
+
</sections>
|
327
|
+
<annex id="annex1">
|
328
|
+
<clause id="annex1a">
|
329
|
+
<figure id="AN">
|
330
|
+
<name>Split-it-right sample divider</name>
|
331
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
332
|
+
</figure>
|
333
|
+
</clause>
|
334
|
+
<clause id="annex1b">
|
335
|
+
<figure id="Anote1">
|
336
|
+
<name>Split-it-right sample divider</name>
|
337
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
338
|
+
</figure>
|
339
|
+
<figure id="Anote2">
|
340
|
+
<name>Split-it-right sample divider</name>
|
341
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
342
|
+
</figure>
|
343
|
+
</clause>
|
344
|
+
</annex>
|
345
|
+
</iso-standard>
|
346
|
+
INPUT
|
347
|
+
output = <<~OUTPUT
|
348
|
+
<?xml version='1.0'?>
|
349
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
350
|
+
<preface>
|
351
|
+
<foreword id="fwd" displayorder='1'>
|
352
|
+
<p>
|
353
|
+
<xref target="N">Figure 1</xref>
|
354
|
+
<xref target="note1">Figure 2</xref>
|
355
|
+
<xref target="note2">Figure 3</xref>
|
356
|
+
<xref target="AN">Figure A.1</xref>
|
357
|
+
<xref target="Anote1">Figure A.2</xref>
|
358
|
+
<xref target="Anote2">Figure A.3</xref>
|
359
|
+
</p>
|
360
|
+
</foreword>
|
361
|
+
</preface>
|
362
|
+
<sections>
|
363
|
+
<clause id="scope" type="scope" displayorder='2'>
|
364
|
+
<title depth="1">1
|
365
|
+
<tab/>
|
366
|
+
Scope</title>
|
367
|
+
<figure id="N">
|
368
|
+
<name>Figure 1 — Split-it-right sample divider</name>
|
369
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
370
|
+
</figure>
|
371
|
+
<p>
|
372
|
+
<xref target="N">Figure 1</xref>
|
373
|
+
</p>
|
374
|
+
</clause>
|
375
|
+
<terms id="terms" displayorder='3'>
|
376
|
+
<title>2</title>
|
377
|
+
</terms>
|
378
|
+
<clause id="widgets" displayorder='4'>
|
379
|
+
<title depth="1">3
|
380
|
+
<tab/>
|
381
|
+
Widgets</title>
|
382
|
+
<clause id="widgets1" inline-header="true">
|
383
|
+
<title>3.1</title>
|
384
|
+
<figure id="note1">
|
385
|
+
<name>Figure 2 — Split-it-right sample divider</name>
|
334
386
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
335
387
|
</figure>
|
336
|
-
<figure id="
|
337
|
-
<name>Split-it-right sample divider</name>
|
388
|
+
<figure id="note2">
|
389
|
+
<name>Figure 3 — Split-it-right sample divider</name>
|
338
390
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
339
391
|
</figure>
|
340
|
-
</clause>
|
341
|
-
</annex>
|
342
|
-
</iso-standard>
|
343
|
-
INPUT
|
344
|
-
<?xml version='1.0'?>
|
345
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
346
|
-
<preface>
|
347
|
-
<foreword id="fwd">
|
348
392
|
<p>
|
349
|
-
<xref target="N">Figure 1</xref>
|
350
393
|
<xref target="note1">Figure 2</xref>
|
351
394
|
<xref target="note2">Figure 3</xref>
|
352
|
-
<xref target="AN">Figure A.1</xref>
|
353
|
-
<xref target="Anote1">Figure A.2</xref>
|
354
|
-
<xref target="Anote2">Figure A.3</xref>
|
355
|
-
</p>
|
356
|
-
</foreword>
|
357
|
-
</preface>
|
358
|
-
<sections>
|
359
|
-
<clause id="scope" type="scope">
|
360
|
-
<title depth="1">1
|
361
|
-
<tab/>
|
362
|
-
Scope</title>
|
363
|
-
<figure id="N">
|
364
|
-
<name>Figure 1 — Split-it-right sample divider</name>
|
365
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
366
|
-
</figure>
|
367
|
-
<p>
|
368
|
-
<xref target="N">Figure 1</xref>
|
369
395
|
</p>
|
370
396
|
</clause>
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
</
|
394
|
-
</
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
<title>A.1</title>
|
401
|
-
<figure id="AN">
|
402
|
-
<name>Figure A.1 — Split-it-right sample divider</name>
|
403
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
404
|
-
</figure>
|
405
|
-
</clause>
|
406
|
-
<clause id="annex1b" inline-header="true">
|
407
|
-
<title>A.2</title>
|
408
|
-
<figure id="Anote1">
|
409
|
-
<name>Figure A.2 — Split-it-right sample divider</name>
|
410
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
411
|
-
</figure>
|
412
|
-
<figure id="Anote2">
|
413
|
-
<name>Figure A.3 — Split-it-right sample divider</name>
|
414
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
415
|
-
</figure>
|
416
|
-
</clause>
|
417
|
-
</annex>
|
418
|
-
</iso-standard>
|
419
|
-
OUTPUT
|
397
|
+
</clause>
|
398
|
+
</sections>
|
399
|
+
<annex id="annex1" displayorder='5'>
|
400
|
+
<title>
|
401
|
+
<strong>Annex A</strong>
|
402
|
+
<tab/>(informative)</title>
|
403
|
+
<clause id="annex1a" inline-header="true">
|
404
|
+
<title>A.1</title>
|
405
|
+
<figure id="AN">
|
406
|
+
<name>Figure A.1 — Split-it-right sample divider</name>
|
407
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
408
|
+
</figure>
|
409
|
+
</clause>
|
410
|
+
<clause id="annex1b" inline-header="true">
|
411
|
+
<title>A.2</title>
|
412
|
+
<figure id="Anote1">
|
413
|
+
<name>Figure A.2 — Split-it-right sample divider</name>
|
414
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
415
|
+
</figure>
|
416
|
+
<figure id="Anote2">
|
417
|
+
<name>Figure A.3 — Split-it-right sample divider</name>
|
418
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
419
|
+
</figure>
|
420
|
+
</clause>
|
421
|
+
</annex>
|
422
|
+
</iso-standard>
|
423
|
+
OUTPUT
|
424
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
425
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
420
426
|
end
|
421
427
|
|
422
428
|
it "cross-references subfigures (Presentation XML)" do
|
423
|
-
|
424
|
-
|
425
|
-
<
|
426
|
-
<
|
427
|
-
<
|
428
|
-
<
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
<
|
439
|
-
<
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
<
|
444
|
-
|
445
|
-
<
|
446
|
-
<figure id="
|
447
|
-
<figure id="note1">
|
448
|
-
<name>Split-it-right sample divider</name>
|
449
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
450
|
-
</figure>
|
451
|
-
<figure id="note2">
|
452
|
-
<name>Split-it-right sample divider</name>
|
453
|
-
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
454
|
-
</figure>
|
455
|
-
</figure>
|
456
|
-
<p>
|
457
|
-
<xref target="note1"/>
|
458
|
-
<xref target="note2"/>
|
459
|
-
</p>
|
460
|
-
</clause>
|
461
|
-
</clause>
|
462
|
-
</sections>
|
463
|
-
<annex id="annex1">
|
464
|
-
<clause id="annex1a"/>
|
465
|
-
<clause id="annex1b">
|
466
|
-
<figure id="AN">
|
467
|
-
<figure id="Anote1">
|
429
|
+
input = <<~INPUT
|
430
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
431
|
+
<preface>
|
432
|
+
<foreword id="fwd">
|
433
|
+
<p>
|
434
|
+
<xref target="N"/>
|
435
|
+
<xref target="note1"/>
|
436
|
+
<xref target="note2"/>
|
437
|
+
<xref target="AN"/>
|
438
|
+
<xref target="Anote1"/>
|
439
|
+
<xref target="Anote2"/>
|
440
|
+
</p>
|
441
|
+
</foreword>
|
442
|
+
</preface>
|
443
|
+
<sections>
|
444
|
+
<clause id="scope" type="scope">
|
445
|
+
<title>Scope</title>
|
446
|
+
</clause>
|
447
|
+
<terms id="terms"/>
|
448
|
+
<clause id="widgets">
|
449
|
+
<title>Widgets</title>
|
450
|
+
<clause id="widgets1">
|
451
|
+
<figure id="N">
|
452
|
+
<figure id="note1">
|
468
453
|
<name>Split-it-right sample divider</name>
|
469
454
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
470
455
|
</figure>
|
471
|
-
<figure id="
|
456
|
+
<figure id="note2">
|
472
457
|
<name>Split-it-right sample divider</name>
|
473
458
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
474
459
|
</figure>
|
475
460
|
</figure>
|
476
|
-
</clause>
|
477
|
-
</annex>
|
478
|
-
</iso-standard>
|
479
|
-
INPUT
|
480
|
-
<?xml version='1.0'?>
|
481
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
482
|
-
<preface>
|
483
|
-
<foreword id="fwd">
|
484
461
|
<p>
|
485
|
-
<xref target="
|
486
|
-
<xref target="
|
487
|
-
<xref target="note2">Figure 1 b)</xref>
|
488
|
-
<xref target="AN">Figure A.1</xref>
|
489
|
-
<xref target="Anote1">Figure A.1 a)</xref>
|
490
|
-
<xref target="Anote2">Figure A.1 b)</xref>
|
462
|
+
<xref target="note1"/>
|
463
|
+
<xref target="note2"/>
|
491
464
|
</p>
|
492
|
-
</foreword>
|
493
|
-
</preface>
|
494
|
-
<sections>
|
495
|
-
<clause id="scope" type="scope">
|
496
|
-
<title depth="1">1
|
497
|
-
<tab/>
|
498
|
-
Scope</title>
|
499
465
|
</clause>
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
<
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
<
|
530
|
-
<
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
466
|
+
</clause>
|
467
|
+
</sections>
|
468
|
+
<annex id="annex1">
|
469
|
+
<clause id="annex1a"/>
|
470
|
+
<clause id="annex1b">
|
471
|
+
<figure id="AN">
|
472
|
+
<figure id="Anote1">
|
473
|
+
<name>Split-it-right sample divider</name>
|
474
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
475
|
+
</figure>
|
476
|
+
<figure id="Anote2">
|
477
|
+
<name>Split-it-right sample divider</name>
|
478
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
479
|
+
</figure>
|
480
|
+
</figure>
|
481
|
+
</clause>
|
482
|
+
</annex>
|
483
|
+
</iso-standard>
|
484
|
+
INPUT
|
485
|
+
output = <<~OUTPUT
|
486
|
+
<?xml version='1.0'?>
|
487
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
488
|
+
<preface>
|
489
|
+
<foreword id="fwd" displayorder='1'>
|
490
|
+
<p>
|
491
|
+
<xref target="N">Figure 1</xref>
|
492
|
+
<xref target="note1">Figure 1 a)</xref>
|
493
|
+
<xref target="note2">Figure 1 b)</xref>
|
494
|
+
<xref target="AN">Figure A.1</xref>
|
495
|
+
<xref target="Anote1">Figure A.1 a)</xref>
|
496
|
+
<xref target="Anote2">Figure A.1 b)</xref>
|
497
|
+
</p>
|
498
|
+
</foreword>
|
499
|
+
</preface>
|
500
|
+
<sections>
|
501
|
+
<clause id="scope" type="scope" displayorder='2'>
|
502
|
+
<title depth="1">1
|
503
|
+
<tab/>
|
504
|
+
Scope</title>
|
505
|
+
</clause>
|
506
|
+
<terms id="terms" displayorder='3'>
|
507
|
+
<title>2</title>
|
508
|
+
</terms>
|
509
|
+
<clause id="widgets" displayorder='4'>
|
510
|
+
<title depth="1">3
|
511
|
+
<tab/>
|
512
|
+
Widgets</title>
|
513
|
+
<clause id="widgets1" inline-header="true">
|
514
|
+
<title>3.1</title>
|
515
|
+
<figure id="N">
|
516
|
+
<name>Figure 1</name>
|
517
|
+
<figure id="note1">
|
539
518
|
<name>a) Split-it-right sample divider</name>
|
540
519
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
541
520
|
</figure>
|
542
|
-
<figure id="
|
521
|
+
<figure id="note2">
|
543
522
|
<name>b) Split-it-right sample divider</name>
|
544
523
|
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
545
524
|
</figure>
|
546
525
|
</figure>
|
526
|
+
<p>
|
527
|
+
<xref target="note1">Figure 1 a)</xref>
|
528
|
+
<xref target="note2">Figure 1 b)</xref>
|
529
|
+
</p>
|
547
530
|
</clause>
|
548
|
-
</
|
549
|
-
</
|
550
|
-
|
531
|
+
</clause>
|
532
|
+
</sections>
|
533
|
+
<annex id="annex1" displayorder='5'>
|
534
|
+
<title>
|
535
|
+
<strong>Annex A</strong>
|
536
|
+
<tab/>(informative)</title>
|
537
|
+
<clause id="annex1a" inline-header="true">
|
538
|
+
<title>A.1</title>
|
539
|
+
</clause>
|
540
|
+
<clause id="annex1b" inline-header="true">
|
541
|
+
<title>A.2</title>
|
542
|
+
<figure id="AN">
|
543
|
+
<name>Figure A.1</name>
|
544
|
+
<figure id="Anote1">
|
545
|
+
<name>a) Split-it-right sample divider</name>
|
546
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
547
|
+
</figure>
|
548
|
+
<figure id="Anote2">
|
549
|
+
<name>b) Split-it-right sample divider</name>
|
550
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
551
|
+
</figure>
|
552
|
+
</figure>
|
553
|
+
</clause>
|
554
|
+
</annex>
|
555
|
+
</iso-standard>
|
556
|
+
OUTPUT
|
557
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
558
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
551
559
|
end
|
552
560
|
|
553
561
|
it "cross-references examples" do
|
554
|
-
|
555
|
-
|
556
|
-
<
|
557
|
-
<
|
558
|
-
<
|
559
|
-
<
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
<
|
570
|
-
<
|
571
|
-
|
572
|
-
<
|
573
|
-
|
574
|
-
|
575
|
-
<
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
<
|
581
|
-
|
582
|
-
<
|
583
|
-
<example id="note1">
|
584
|
-
<p>Hello</p>
|
585
|
-
</example>
|
586
|
-
<example id="note2">
|
587
|
-
<p>Hello</p>
|
588
|
-
</example>
|
589
|
-
<p>
|
590
|
-
<xref target="note1"/>
|
591
|
-
<xref target="note2"/>
|
592
|
-
</p>
|
593
|
-
</clause>
|
594
|
-
</clause>
|
595
|
-
</sections>
|
596
|
-
<annex id="annex1">
|
597
|
-
<clause id="annex1a">
|
598
|
-
<example id="AN">
|
599
|
-
<p>Hello</p>
|
600
|
-
</example>
|
601
|
-
</clause>
|
602
|
-
<clause id="annex1b">
|
603
|
-
<example id="Anote1">
|
604
|
-
<p>Hello</p>
|
605
|
-
</example>
|
606
|
-
<example id="Anote2">
|
562
|
+
input = <<~INPUT
|
563
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
564
|
+
<preface>
|
565
|
+
<foreword>
|
566
|
+
<p>
|
567
|
+
<xref target="N"/>
|
568
|
+
<xref target="note1"/>
|
569
|
+
<xref target="note2"/>
|
570
|
+
<xref target="AN"/>
|
571
|
+
<xref target="Anote1"/>
|
572
|
+
<xref target="Anote2"/>
|
573
|
+
</p>
|
574
|
+
</foreword>
|
575
|
+
</preface>
|
576
|
+
<sections>
|
577
|
+
<clause id="scope" type="scope">
|
578
|
+
<title>Scope</title>
|
579
|
+
<example id="N">
|
580
|
+
<p>Hello</p>
|
581
|
+
</example>
|
582
|
+
<p>
|
583
|
+
<xref target="N"/>
|
584
|
+
</p>
|
585
|
+
</clause>
|
586
|
+
<terms id="terms"/>
|
587
|
+
<clause id="widgets">
|
588
|
+
<title>Widgets</title>
|
589
|
+
<clause id="widgets1">
|
590
|
+
<example id="note1">
|
607
591
|
<p>Hello</p>
|
608
592
|
</example>
|
609
|
-
|
610
|
-
</annex>
|
611
|
-
</iso-standard>
|
612
|
-
INPUT
|
613
|
-
<?xml version='1.0'?>
|
614
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
615
|
-
<preface>
|
616
|
-
<foreword>
|
617
|
-
<p>
|
618
|
-
<xref target="N">Clause <strong>1</strong>, Example</xref>
|
619
|
-
<xref target="note1"><strong>3.1</strong>, Example 1</xref>
|
620
|
-
<xref target="note2"><strong>3.1</strong>, Example 2</xref>
|
621
|
-
<xref target="AN"><strong>A.1</strong>, Example</xref>
|
622
|
-
<xref target="Anote1"><strong>A.2</strong>, Example 1</xref>
|
623
|
-
<xref target="Anote2"><strong>A.2</strong>, Example 2</xref>
|
624
|
-
</p>
|
625
|
-
</foreword>
|
626
|
-
</preface>
|
627
|
-
<sections>
|
628
|
-
<clause id="scope" type="scope">
|
629
|
-
<title depth="1">1
|
630
|
-
<tab/>
|
631
|
-
Scope</title>
|
632
|
-
<example id="N">
|
633
|
-
<name>EXAMPLE</name>
|
593
|
+
<example id="note2">
|
634
594
|
<p>Hello</p>
|
635
595
|
</example>
|
636
596
|
<p>
|
637
|
-
<xref target="
|
597
|
+
<xref target="note1"/>
|
598
|
+
<xref target="note2"/>
|
638
599
|
</p>
|
639
600
|
</clause>
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
<strong>
|
667
|
-
<
|
668
|
-
|
669
|
-
<
|
670
|
-
<
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
<
|
601
|
+
</clause>
|
602
|
+
</sections>
|
603
|
+
<annex id="annex1">
|
604
|
+
<clause id="annex1a">
|
605
|
+
<example id="AN">
|
606
|
+
<p>Hello</p>
|
607
|
+
</example>
|
608
|
+
</clause>
|
609
|
+
<clause id="annex1b">
|
610
|
+
<example id="Anote1">
|
611
|
+
<p>Hello</p>
|
612
|
+
</example>
|
613
|
+
<example id="Anote2">
|
614
|
+
<p>Hello</p>
|
615
|
+
</example>
|
616
|
+
</clause>
|
617
|
+
</annex>
|
618
|
+
</iso-standard>
|
619
|
+
INPUT
|
620
|
+
output = <<~OUTPUT
|
621
|
+
<?xml version='1.0'?>
|
622
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
623
|
+
<preface>
|
624
|
+
<foreword displayorder='1'>
|
625
|
+
<p>
|
626
|
+
<xref target="N">Clause <strong>1</strong>, Example</xref>
|
627
|
+
<xref target="note1"><strong>3.1</strong>, Example 1</xref>
|
628
|
+
<xref target="note2"><strong>3.1</strong>, Example 2</xref>
|
629
|
+
<xref target="AN"><strong>A.1</strong>, Example</xref>
|
630
|
+
<xref target="Anote1"><strong>A.2</strong>, Example 1</xref>
|
631
|
+
<xref target="Anote2"><strong>A.2</strong>, Example 2</xref>
|
632
|
+
</p>
|
633
|
+
</foreword>
|
634
|
+
</preface>
|
635
|
+
<sections>
|
636
|
+
<clause id="scope" type="scope" displayorder='2'>
|
637
|
+
<title depth="1">1
|
638
|
+
<tab/>
|
639
|
+
Scope</title>
|
640
|
+
<example id="N">
|
641
|
+
<name>EXAMPLE</name>
|
642
|
+
<p>Hello</p>
|
643
|
+
</example>
|
644
|
+
<p>
|
645
|
+
<xref target="N">Example</xref>
|
646
|
+
</p>
|
647
|
+
</clause>
|
648
|
+
<terms id="terms" displayorder='3'>
|
649
|
+
<title>2</title>
|
650
|
+
</terms>
|
651
|
+
<clause id="widgets" displayorder='4'>
|
652
|
+
<title depth="1">3
|
653
|
+
<tab/>
|
654
|
+
Widgets</title>
|
655
|
+
<clause id="widgets1" inline-header="true">
|
656
|
+
<title>3.1</title>
|
657
|
+
<example id="note1">
|
678
658
|
<name>EXAMPLE 1</name>
|
679
659
|
<p>Hello</p>
|
680
660
|
</example>
|
681
|
-
<example id="
|
661
|
+
<example id="note2">
|
682
662
|
<name>EXAMPLE 2</name>
|
683
663
|
<p>Hello</p>
|
684
664
|
</example>
|
665
|
+
<p>
|
666
|
+
<xref target="note1">Example 1</xref>
|
667
|
+
<xref target="note2">Example 2</xref>
|
668
|
+
</p>
|
685
669
|
</clause>
|
686
|
-
</
|
687
|
-
</
|
688
|
-
|
670
|
+
</clause>
|
671
|
+
</sections>
|
672
|
+
<annex id="annex1" displayorder='5'>
|
673
|
+
<title>
|
674
|
+
<strong>Annex A</strong>
|
675
|
+
<tab/>(informative)</title>
|
676
|
+
<clause id="annex1a" inline-header="true">
|
677
|
+
<title>A.1</title>
|
678
|
+
<example id="AN">
|
679
|
+
<name>EXAMPLE</name>
|
680
|
+
<p>Hello</p>
|
681
|
+
</example>
|
682
|
+
</clause>
|
683
|
+
<clause id="annex1b" inline-header="true">
|
684
|
+
<title>A.2</title>
|
685
|
+
<example id="Anote1">
|
686
|
+
<name>EXAMPLE 1</name>
|
687
|
+
<p>Hello</p>
|
688
|
+
</example>
|
689
|
+
<example id="Anote2">
|
690
|
+
<name>EXAMPLE 2</name>
|
691
|
+
<p>Hello</p>
|
692
|
+
</example>
|
693
|
+
</clause>
|
694
|
+
</annex>
|
695
|
+
</iso-standard>
|
696
|
+
OUTPUT
|
697
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
698
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
689
699
|
end
|
690
700
|
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
</clause>
|
713
|
-
</sections>
|
714
|
-
|
701
|
+
it "cross-references formulae" do
|
702
|
+
input = <<~INPUT
|
703
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
704
|
+
<preface>
|
705
|
+
<foreword>
|
706
|
+
<p>
|
707
|
+
<xref target="N1"/>
|
708
|
+
<xref target="N2"/>
|
709
|
+
</p>
|
710
|
+
</foreword>
|
711
|
+
</preface>
|
712
|
+
<sections>
|
713
|
+
<clause id="intro"><title>First</title>
|
714
|
+
<formula id="N1">
|
715
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
716
|
+
</formula>
|
717
|
+
<clause id="xyz"><title>Preparatory</title>
|
718
|
+
<formula id="N2" inequality="true">
|
719
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
720
|
+
</formula>
|
721
|
+
<xref target="N2"/>
|
722
|
+
</clause>
|
723
|
+
</sections>
|
724
|
+
</iso-standard>
|
715
725
|
INPUT
|
716
|
-
|
717
|
-
|
718
|
-
<
|
719
|
-
<
|
720
|
-
<
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
<
|
727
|
-
<
|
728
|
-
1
|
729
|
-
|
730
|
-
First
|
731
|
-
</title>
|
732
|
-
<formula id='N1'>
|
733
|
-
<name>1</name>
|
734
|
-
<stem type='AsciiMath'>r = 1 %</stem>
|
735
|
-
</formula>
|
736
|
-
<clause id='xyz'>
|
737
|
-
<title depth='2'>
|
738
|
-
1.1
|
726
|
+
output = <<~OUTPUT
|
727
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
728
|
+
<preface>
|
729
|
+
<foreword displayorder='1'>
|
730
|
+
<p>
|
731
|
+
<xref target='N1'>Clause <strong>1</strong>, Equation (1)</xref>
|
732
|
+
<xref target='N2'><strong>1.1</strong>, Inequality (2)</xref>
|
733
|
+
</p>
|
734
|
+
</foreword>
|
735
|
+
</preface>
|
736
|
+
<sections>
|
737
|
+
<clause id='intro' displayorder="2">
|
738
|
+
<title depth='1'>
|
739
|
+
1
|
739
740
|
<tab/>
|
740
|
-
|
741
|
+
First
|
741
742
|
</title>
|
742
|
-
<formula id='
|
743
|
-
<name>
|
743
|
+
<formula id='N1'>
|
744
|
+
<name>1</name>
|
744
745
|
<stem type='AsciiMath'>r = 1 %</stem>
|
745
746
|
</formula>
|
746
|
-
<
|
747
|
+
<clause id='xyz'>
|
748
|
+
<title depth='2'>
|
749
|
+
1.1
|
750
|
+
<tab/>
|
751
|
+
Preparatory
|
752
|
+
</title>
|
753
|
+
<formula id='N2' inequality='true'>
|
754
|
+
<name>2</name>
|
755
|
+
<stem type='AsciiMath'>r = 1 %</stem>
|
756
|
+
</formula>
|
757
|
+
<xref target='N2'>Inequality (2)</xref>
|
758
|
+
</clause>
|
747
759
|
</clause>
|
748
|
-
</
|
749
|
-
</
|
750
|
-
</iso-standard>
|
760
|
+
</sections>
|
761
|
+
</iso-standard>
|
751
762
|
OUTPUT
|
752
|
-
|
763
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
764
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
765
|
+
end
|
753
766
|
|
754
767
|
it "cross-references tables" do
|
755
|
-
|
756
|
-
|
757
|
-
<
|
758
|
-
<
|
759
|
-
<
|
760
|
-
<
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
<
|
771
|
-
<
|
772
|
-
|
773
|
-
<
|
768
|
+
input = <<~INPUT
|
769
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
770
|
+
<preface>
|
771
|
+
<foreword>
|
772
|
+
<p>
|
773
|
+
<xref target="N"/>
|
774
|
+
<xref target="note1"/>
|
775
|
+
<xref target="note2"/>
|
776
|
+
<xref target="AN"/>
|
777
|
+
<xref target="Anote1"/>
|
778
|
+
<xref target="Anote2"/>
|
779
|
+
</p>
|
780
|
+
</foreword>
|
781
|
+
</preface>
|
782
|
+
<sections>
|
783
|
+
<clause id="scope" type="scope">
|
784
|
+
<title>Scope</title>
|
785
|
+
<table id="N">
|
786
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
787
|
+
<tbody>
|
788
|
+
<tr>
|
789
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
790
|
+
<td align="center">13</td>
|
791
|
+
<td align="center">11</td>
|
792
|
+
</tr>
|
793
|
+
</tbody>
|
794
|
+
</table>
|
795
|
+
<p>
|
796
|
+
<xref target="N"/>
|
797
|
+
</p>
|
798
|
+
</clause>
|
799
|
+
<terms id="terms"/>
|
800
|
+
<clause id="widgets">
|
801
|
+
<title>Widgets</title>
|
802
|
+
<clause id="widgets1">
|
803
|
+
<table id="note1">
|
774
804
|
<name>Repeatability and reproducibility of husked rice yield</name>
|
775
805
|
<tbody>
|
776
806
|
<tr>
|
@@ -780,44 +810,7 @@ RSpec.describe IsoDoc::BSI do
|
|
780
810
|
</tr>
|
781
811
|
</tbody>
|
782
812
|
</table>
|
783
|
-
<
|
784
|
-
<xref target="N"/>
|
785
|
-
</p>
|
786
|
-
</clause>
|
787
|
-
<terms id="terms"/>
|
788
|
-
<clause id="widgets">
|
789
|
-
<title>Widgets</title>
|
790
|
-
<clause id="widgets1">
|
791
|
-
<table id="note1">
|
792
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
793
|
-
<tbody>
|
794
|
-
<tr>
|
795
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
796
|
-
<td align="center">13</td>
|
797
|
-
<td align="center">11</td>
|
798
|
-
</tr>
|
799
|
-
</tbody>
|
800
|
-
</table>
|
801
|
-
<table id="note2">
|
802
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
803
|
-
<tbody>
|
804
|
-
<tr>
|
805
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
806
|
-
<td align="center">13</td>
|
807
|
-
<td align="center">11</td>
|
808
|
-
</tr>
|
809
|
-
</tbody>
|
810
|
-
</table>
|
811
|
-
<p>
|
812
|
-
<xref target="note1"/>
|
813
|
-
<xref target="note2"/>
|
814
|
-
</p>
|
815
|
-
</clause>
|
816
|
-
</clause>
|
817
|
-
</sections>
|
818
|
-
<annex id="annex1">
|
819
|
-
<clause id="annex1a">
|
820
|
-
<table id="AN">
|
813
|
+
<table id="note2">
|
821
814
|
<name>Repeatability and reproducibility of husked rice yield</name>
|
822
815
|
<tbody>
|
823
816
|
<tr>
|
@@ -827,10 +820,96 @@ RSpec.describe IsoDoc::BSI do
|
|
827
820
|
</tr>
|
828
821
|
</tbody>
|
829
822
|
</table>
|
823
|
+
<p>
|
824
|
+
<xref target="note1"/>
|
825
|
+
<xref target="note2"/>
|
826
|
+
</p>
|
830
827
|
</clause>
|
831
|
-
|
832
|
-
|
833
|
-
|
828
|
+
</clause>
|
829
|
+
</sections>
|
830
|
+
<annex id="annex1">
|
831
|
+
<clause id="annex1a">
|
832
|
+
<table id="AN">
|
833
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
834
|
+
<tbody>
|
835
|
+
<tr>
|
836
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
837
|
+
<td align="center">13</td>
|
838
|
+
<td align="center">11</td>
|
839
|
+
</tr>
|
840
|
+
</tbody>
|
841
|
+
</table>
|
842
|
+
</clause>
|
843
|
+
<clause id="annex1b">
|
844
|
+
<table id="Anote1">
|
845
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
846
|
+
<tbody>
|
847
|
+
<tr>
|
848
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
849
|
+
<td align="center">13</td>
|
850
|
+
<td align="center">11</td>
|
851
|
+
</tr>
|
852
|
+
</tbody>
|
853
|
+
</table>
|
854
|
+
<table id="Anote2">
|
855
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
856
|
+
<tbody>
|
857
|
+
<tr>
|
858
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
859
|
+
<td align="center">13</td>
|
860
|
+
<td align="center">11</td>
|
861
|
+
</tr>
|
862
|
+
</tbody>
|
863
|
+
</table>
|
864
|
+
</clause>
|
865
|
+
</annex>
|
866
|
+
</iso-standard>
|
867
|
+
INPUT
|
868
|
+
output = <<~OUTPUT
|
869
|
+
<?xml version='1.0'?>
|
870
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
871
|
+
<preface>
|
872
|
+
<foreword displayorder='1'>
|
873
|
+
<p>
|
874
|
+
<xref target="N">Table 1</xref>
|
875
|
+
<xref target="note1">Table 2</xref>
|
876
|
+
<xref target="note2">Table 3</xref>
|
877
|
+
<xref target="AN">Table A.1</xref>
|
878
|
+
<xref target="Anote1">Table A.2</xref>
|
879
|
+
<xref target="Anote2">Table A.3</xref>
|
880
|
+
</p>
|
881
|
+
</foreword>
|
882
|
+
</preface>
|
883
|
+
<sections>
|
884
|
+
<clause id="scope" type="scope" displayorder='2'>
|
885
|
+
<title depth="1">1
|
886
|
+
<tab/>
|
887
|
+
Scope</title>
|
888
|
+
<table id="N">
|
889
|
+
<name>Table 1 — Repeatability and reproducibility of husked rice yield</name>
|
890
|
+
<tbody>
|
891
|
+
<tr>
|
892
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
893
|
+
<td align="center">13</td>
|
894
|
+
<td align="center">11</td>
|
895
|
+
</tr>
|
896
|
+
</tbody>
|
897
|
+
</table>
|
898
|
+
<p>
|
899
|
+
<xref target="N">Table 1</xref>
|
900
|
+
</p>
|
901
|
+
</clause>
|
902
|
+
<terms id="terms" displayorder='3'>
|
903
|
+
<title>2</title>
|
904
|
+
</terms>
|
905
|
+
<clause id="widgets" displayorder='4'>
|
906
|
+
<title depth="1">3
|
907
|
+
<tab/>
|
908
|
+
Widgets</title>
|
909
|
+
<clause id="widgets1" inline-header="true">
|
910
|
+
<title>3.1</title>
|
911
|
+
<table id="note1">
|
912
|
+
<name>Table 2 — Repeatability and reproducibility of husked rice yield</name>
|
834
913
|
<tbody>
|
835
914
|
<tr>
|
836
915
|
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
@@ -839,8 +918,8 @@ RSpec.describe IsoDoc::BSI do
|
|
839
918
|
</tr>
|
840
919
|
</tbody>
|
841
920
|
</table>
|
842
|
-
<table id="
|
843
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
921
|
+
<table id="note2">
|
922
|
+
<name>Table 3 — Repeatability and reproducibility of husked rice yield</name>
|
844
923
|
<tbody>
|
845
924
|
<tr>
|
846
925
|
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
@@ -849,447 +928,349 @@ RSpec.describe IsoDoc::BSI do
|
|
849
928
|
</tr>
|
850
929
|
</tbody>
|
851
930
|
</table>
|
852
|
-
</clause>
|
853
|
-
</annex>
|
854
|
-
</iso-standard>
|
855
|
-
INPUT
|
856
|
-
<?xml version='1.0'?>
|
857
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
858
|
-
<preface>
|
859
|
-
<foreword>
|
860
931
|
<p>
|
861
|
-
<xref target="N">Table 1</xref>
|
862
932
|
<xref target="note1">Table 2</xref>
|
863
933
|
<xref target="note2">Table 3</xref>
|
864
|
-
<xref target="AN">Table A.1</xref>
|
865
|
-
<xref target="Anote1">Table A.2</xref>
|
866
|
-
<xref target="Anote2">Table A.3</xref>
|
867
|
-
</p>
|
868
|
-
</foreword>
|
869
|
-
</preface>
|
870
|
-
<sections>
|
871
|
-
<clause id="scope" type="scope">
|
872
|
-
<title depth="1">1
|
873
|
-
<tab/>
|
874
|
-
Scope</title>
|
875
|
-
<table id="N">
|
876
|
-
<name>Table 1 — Repeatability and reproducibility of husked rice yield</name>
|
877
|
-
<tbody>
|
878
|
-
<tr>
|
879
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
880
|
-
<td align="center">13</td>
|
881
|
-
<td align="center">11</td>
|
882
|
-
</tr>
|
883
|
-
</tbody>
|
884
|
-
</table>
|
885
|
-
<p>
|
886
|
-
<xref target="N">Table 1</xref>
|
887
934
|
</p>
|
888
935
|
</clause>
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
</
|
917
|
-
</
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
<tbody>
|
934
|
-
<tr>
|
935
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
936
|
-
<td align="center">13</td>
|
937
|
-
<td align="center">11</td>
|
938
|
-
</tr>
|
939
|
-
</tbody>
|
940
|
-
</table>
|
941
|
-
</clause>
|
942
|
-
<clause id="annex1b" inline-header="true">
|
943
|
-
<title>A.2</title>
|
944
|
-
<table id="Anote1">
|
945
|
-
<name>Table A.2 — 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>Table A.3 — 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>
|
936
|
+
</clause>
|
937
|
+
</sections>
|
938
|
+
<annex id="annex1" displayorder='5'>
|
939
|
+
<title>
|
940
|
+
<strong>Annex A</strong>
|
941
|
+
<tab/>(informative)</title>
|
942
|
+
<clause id="annex1a" inline-header="true">
|
943
|
+
<title>A.1</title>
|
944
|
+
<table id="AN">
|
945
|
+
<name>Table A.1 — 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
|
+
</clause>
|
955
|
+
<clause id="annex1b" inline-header="true">
|
956
|
+
<title>A.2</title>
|
957
|
+
<table id="Anote1">
|
958
|
+
<name>Table A.2 — Repeatability and reproducibility of husked rice yield</name>
|
959
|
+
<tbody>
|
960
|
+
<tr>
|
961
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
962
|
+
<td align="center">13</td>
|
963
|
+
<td align="center">11</td>
|
964
|
+
</tr>
|
965
|
+
</tbody>
|
966
|
+
</table>
|
967
|
+
<table id="Anote2">
|
968
|
+
<name>Table A.3 — Repeatability and reproducibility of husked rice yield</name>
|
969
|
+
<tbody>
|
970
|
+
<tr>
|
971
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
972
|
+
<td align="center">13</td>
|
973
|
+
<td align="center">11</td>
|
974
|
+
</tr>
|
975
|
+
</tbody>
|
976
|
+
</table>
|
977
|
+
</clause>
|
978
|
+
</annex>
|
979
|
+
</iso-standard>
|
967
980
|
OUTPUT
|
981
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
982
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
968
983
|
end
|
969
984
|
|
970
985
|
it "cross-references term notes" do
|
971
|
-
|
972
|
-
|
973
|
-
<
|
974
|
-
<
|
975
|
-
<
|
976
|
-
<
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
<
|
984
|
-
<
|
985
|
-
|
986
|
-
|
987
|
-
<
|
988
|
-
<
|
989
|
-
|
990
|
-
<
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
<
|
995
|
-
|
996
|
-
<
|
997
|
-
|
998
|
-
|
999
|
-
<
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
</terms>
|
986
|
+
input = <<~INPUT
|
987
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
988
|
+
<preface>
|
989
|
+
<foreword>
|
990
|
+
<p>
|
991
|
+
<xref target="note1"/>
|
992
|
+
<xref target="note2"/>
|
993
|
+
<xref target="note3"/>
|
994
|
+
</p>
|
995
|
+
</foreword>
|
996
|
+
</preface>
|
997
|
+
<sections>
|
998
|
+
<clause id="scope" type="scope">
|
999
|
+
<title>Scope</title>
|
1000
|
+
</clause>
|
1001
|
+
<terms id="terms">
|
1002
|
+
<term id="_waxy_rice">
|
1003
|
+
<preferred>waxy rice</preferred>
|
1004
|
+
<termnote id="note1">
|
1005
|
+
<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>
|
1006
|
+
</termnote>
|
1007
|
+
</term>
|
1008
|
+
<term id="_nonwaxy_rice">
|
1009
|
+
<preferred>nonwaxy rice</preferred>
|
1010
|
+
<termnote id="note2">
|
1011
|
+
<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>
|
1012
|
+
</termnote>
|
1013
|
+
<termnote id="note3">
|
1014
|
+
<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>
|
1015
|
+
</termnote>
|
1016
|
+
</term>
|
1017
|
+
</terms>
|
1004
1018
|
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
</
|
1016
|
-
</
|
1017
|
-
</
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
</
|
1035
|
-
</
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
</
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
</
|
1051
|
-
</
|
1052
|
-
</
|
1053
|
-
</
|
1054
|
-
</
|
1055
|
-
|
1019
|
+
</iso-standard>
|
1020
|
+
INPUT
|
1021
|
+
output = <<~OUTPUT
|
1022
|
+
<?xml version='1.0'?>
|
1023
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
1024
|
+
<preface>
|
1025
|
+
<foreword displayorder='1'>
|
1026
|
+
<p>
|
1027
|
+
<xref target="note1"><strong>2.1</strong>, Note</xref>
|
1028
|
+
<xref target="note2"><strong>2.2</strong>, Note 1</xref>
|
1029
|
+
<xref target="note3"><strong>2.2</strong>, Note 2</xref>
|
1030
|
+
</p>
|
1031
|
+
</foreword>
|
1032
|
+
</preface>
|
1033
|
+
<sections>
|
1034
|
+
<clause id="scope" type="scope" displayorder='2'>
|
1035
|
+
<title depth="1">1
|
1036
|
+
<tab/>
|
1037
|
+
Scope</title>
|
1038
|
+
</clause>
|
1039
|
+
<terms id="terms" displayorder='3'>
|
1040
|
+
<title>2</title>
|
1041
|
+
<term id="_waxy_rice">
|
1042
|
+
<name>2.1</name>
|
1043
|
+
<preferred>waxy rice</preferred>
|
1044
|
+
<termnote id="note1">
|
1045
|
+
<name>NOTE</name>
|
1046
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
1047
|
+
kernels have a tendency to stick together after cooking.
|
1048
|
+
</p>
|
1049
|
+
</termnote>
|
1050
|
+
</term>
|
1051
|
+
<term id="_nonwaxy_rice">
|
1052
|
+
<name>2.2</name>
|
1053
|
+
<preferred>nonwaxy rice</preferred>
|
1054
|
+
<termnote id="note2">
|
1055
|
+
<name>NOTE 1</name>
|
1056
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
1057
|
+
kernels have a tendency to stick together after cooking.
|
1058
|
+
</p>
|
1059
|
+
</termnote>
|
1060
|
+
<termnote id="note3">
|
1061
|
+
<name>NOTE 2</name>
|
1062
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
1063
|
+
kernels have a tendency to stick together after cooking.
|
1064
|
+
</p>
|
1065
|
+
</termnote>
|
1066
|
+
</term>
|
1067
|
+
</terms>
|
1068
|
+
</sections>
|
1069
|
+
</iso-standard>
|
1070
|
+
OUTPUT
|
1071
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
1072
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1056
1073
|
end
|
1057
1074
|
|
1058
1075
|
it "cross-references sections" do
|
1059
|
-
|
1060
|
-
|
1061
|
-
<
|
1062
|
-
<
|
1063
|
-
<
|
1064
|
-
|
1065
|
-
<
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
<
|
1085
|
-
|
1086
|
-
<
|
1087
|
-
<title>Introduction Subsection</title>
|
1088
|
-
</clause>
|
1089
|
-
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
1090
|
-
</introduction>
|
1091
|
-
</preface>
|
1092
|
-
<sections>
|
1093
|
-
<clause id="D" obligation="normative" type="scope">
|
1094
|
-
<title>Scope</title>
|
1095
|
-
<p id="E">Text</p>
|
1076
|
+
input = <<~INPUT
|
1077
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1078
|
+
<preface>
|
1079
|
+
<foreword obligation="informative">
|
1080
|
+
<title>Foreword</title>
|
1081
|
+
<p id="A">This is a preamble
|
1082
|
+
<xref target="C"/>
|
1083
|
+
<xref target="C1"/>
|
1084
|
+
<xref target="D"/>
|
1085
|
+
<xref target="H"/>
|
1086
|
+
<xref target="I"/>
|
1087
|
+
<xref target="J"/>
|
1088
|
+
<xref target="K"/>
|
1089
|
+
<xref target="L"/>
|
1090
|
+
<xref target="M"/>
|
1091
|
+
<xref target="N"/>
|
1092
|
+
<xref target="O"/>
|
1093
|
+
<xref target="P"/>
|
1094
|
+
<xref target="Q"/>
|
1095
|
+
<xref target="Q1"/>
|
1096
|
+
<xref target="Q2"/>
|
1097
|
+
<xref target="Q3"/>
|
1098
|
+
<xref target="R"/></p>
|
1099
|
+
</foreword>
|
1100
|
+
<introduction id="B" obligation="informative">
|
1101
|
+
<title>Introduction</title>
|
1102
|
+
<clause id="C" inline-header="false" obligation="informative">
|
1103
|
+
<title>Introduction Subsection</title>
|
1096
1104
|
</clause>
|
1097
|
-
<
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1105
|
+
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
1106
|
+
</introduction>
|
1107
|
+
</preface>
|
1108
|
+
<sections>
|
1109
|
+
<clause id="D" obligation="normative" type="scope">
|
1110
|
+
<title>Scope</title>
|
1111
|
+
<p id="E">Text</p>
|
1112
|
+
</clause>
|
1113
|
+
<terms id="H" obligation="normative">
|
1114
|
+
<title>Terms, definitions, symbols and abbreviated terms</title>
|
1115
|
+
<terms id="I" obligation="normative">
|
1116
|
+
<title>Normal Terms</title>
|
1117
|
+
<term id="J">
|
1118
|
+
<preferred>Term2</preferred>
|
1119
|
+
</term>
|
1111
1120
|
</terms>
|
1112
|
-
<definitions id="
|
1121
|
+
<definitions id="K">
|
1113
1122
|
<dl>
|
1114
1123
|
<dt>Symbol</dt>
|
1115
1124
|
<dd>Definition</dd>
|
1116
1125
|
</dl>
|
1117
1126
|
</definitions>
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
</
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
</
|
1127
|
-
|
1128
|
-
|
1129
|
-
<title>Annex</title>
|
1130
|
-
<clause id="Q" inline-header="false" obligation="normative">
|
1131
|
-
<title>Annex A.1</title>
|
1132
|
-
<clause id="Q1" inline-header="false" obligation="normative">
|
1133
|
-
<title>Annex A.1a</title>
|
1134
|
-
</clause>
|
1135
|
-
</clause>
|
1136
|
-
<appendix id="Q2" inline-header="false" obligation="normative">
|
1137
|
-
<title>An Appendix</title>
|
1138
|
-
<clause id="Q3" inline-header="false" obligation="normative">
|
1139
|
-
<title>Appendix subclause</title>
|
1140
|
-
</clause>
|
1141
|
-
</appendix>
|
1142
|
-
</annex>
|
1143
|
-
<bibliography>
|
1144
|
-
<references id="R" normative="true" obligation="informative">
|
1145
|
-
<title>Normative References</title>
|
1146
|
-
</references>
|
1147
|
-
<clause id="S" obligation="informative">
|
1148
|
-
<title>Bibliography</title>
|
1149
|
-
<references id="T" normative="false" obligation="informative">
|
1150
|
-
<title>Bibliography Subsection</title>
|
1151
|
-
</references>
|
1127
|
+
</terms>
|
1128
|
+
<definitions id="L">
|
1129
|
+
<dl>
|
1130
|
+
<dt>Symbol</dt>
|
1131
|
+
<dd>Definition</dd>
|
1132
|
+
</dl>
|
1133
|
+
</definitions>
|
1134
|
+
<clause id="M" inline-header="false" obligation="normative">
|
1135
|
+
<title>Clause 4</title>
|
1136
|
+
<clause id="N" inline-header="false" obligation="normative">
|
1137
|
+
<title>Introduction</title>
|
1152
1138
|
</clause>
|
1153
|
-
|
1154
|
-
|
1155
|
-
INPUT
|
1156
|
-
<?xml version='1.0'?>
|
1157
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
1158
|
-
<preface>
|
1159
|
-
<foreword obligation="informative">
|
1160
|
-
<title>Foreword</title>
|
1161
|
-
<p id="A">This is a preamble
|
1162
|
-
<xref target="C"><strong>0.1</strong></xref>
|
1163
|
-
<xref target="C1"><strong>0.2</strong></xref>
|
1164
|
-
<xref target="D">Clause <strong>1</strong></xref>
|
1165
|
-
<xref target="H">Clause <strong>3</strong></xref>
|
1166
|
-
<xref target="I"><strong>3.1</strong></xref>
|
1167
|
-
<xref target="J"><strong>3.1.1</strong></xref>
|
1168
|
-
<xref target="K"><strong>3.2</strong></xref>
|
1169
|
-
<xref target="L">Clause <strong>4</strong></xref>
|
1170
|
-
<xref target="M">Clause <strong>5</strong></xref>
|
1171
|
-
<xref target="N"><strong>5.1</strong></xref>
|
1172
|
-
<xref target="O"><strong>5.2</strong></xref>
|
1173
|
-
<xref target="P">Annex A</xref>
|
1174
|
-
<xref target="Q"><strong>A.1</strong></xref>
|
1175
|
-
<xref target="Q1"><strong>A.1.1</strong></xref>
|
1176
|
-
<xref target="Q2">Annex A, Appendix 1</xref>
|
1177
|
-
<xref target="Q3">Annex A, Appendix 1.1</xref>
|
1178
|
-
<xref target="R">Clause <strong>2</strong></xref></p>
|
1179
|
-
</foreword>
|
1180
|
-
<introduction id="B" obligation="informative">
|
1181
|
-
<title depth="1">
|
1182
|
-
0
|
1183
|
-
<tab/>
|
1184
|
-
Introduction</title>
|
1185
|
-
<clause id="C" inline-header="false" obligation="informative">
|
1186
|
-
<title depth="2">
|
1187
|
-
0.1
|
1188
|
-
<tab/>
|
1189
|
-
Introduction Subsection</title>
|
1190
|
-
</clause>
|
1191
|
-
<clause id="C1" inline-header="true" obligation="informative">
|
1192
|
-
<title>0.2</title>Text</clause>
|
1193
|
-
</introduction>
|
1194
|
-
</preface>
|
1195
|
-
<sections>
|
1196
|
-
<clause id="D" obligation="normative" type="scope">
|
1197
|
-
<title depth="1">1
|
1198
|
-
<tab/>
|
1199
|
-
Scope</title>
|
1200
|
-
<p id="E">Text</p>
|
1139
|
+
<clause id="O" inline-header="false" obligation="normative">
|
1140
|
+
<title>Clause 4.2</title>
|
1201
1141
|
</clause>
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
<term id="J">
|
1211
|
-
<name>3.1.1</name>
|
1212
|
-
<preferred>Term2</preferred>
|
1213
|
-
</term>
|
1214
|
-
</terms>
|
1215
|
-
<definitions id="K" inline-header="true">
|
1216
|
-
<title>3.2</title>
|
1217
|
-
<dl>
|
1218
|
-
<dt>Symbol</dt>
|
1219
|
-
<dd>Definition</dd>
|
1220
|
-
</dl>
|
1221
|
-
</definitions>
|
1222
|
-
</terms>
|
1223
|
-
<definitions id="L">
|
1224
|
-
<title>4</title>
|
1225
|
-
<dl>
|
1226
|
-
<dt>Symbol</dt>
|
1227
|
-
<dd>Definition</dd>
|
1228
|
-
</dl>
|
1229
|
-
</definitions>
|
1230
|
-
<clause id="M" inline-header="false" obligation="normative">
|
1231
|
-
<title depth="1">5
|
1232
|
-
<tab/>
|
1233
|
-
Clause 4</title>
|
1234
|
-
<clause id="N" inline-header="false" obligation="normative">
|
1235
|
-
<title depth="2">5.1
|
1236
|
-
<tab/>
|
1237
|
-
Introduction</title>
|
1238
|
-
</clause>
|
1239
|
-
<clause id="O" inline-header="false" obligation="normative">
|
1240
|
-
<title depth="2">5.2
|
1241
|
-
<tab/>
|
1242
|
-
Clause 4.2</title>
|
1243
|
-
</clause>
|
1142
|
+
</clause>
|
1143
|
+
</sections>
|
1144
|
+
<annex id="P" inline-header="false" obligation="normative">
|
1145
|
+
<title>Annex</title>
|
1146
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
1147
|
+
<title>Annex A.1</title>
|
1148
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
1149
|
+
<title>Annex A.1a</title>
|
1244
1150
|
</clause>
|
1245
|
-
</
|
1246
|
-
<
|
1247
|
-
<title>
|
1248
|
-
|
1249
|
-
<
|
1250
|
-
<br/>
|
1251
|
-
<br/>
|
1252
|
-
<strong>Annex</strong></title>
|
1253
|
-
<clause id="Q" inline-header="false" obligation="normative">
|
1254
|
-
<title depth="2">A.1
|
1255
|
-
<tab/>
|
1256
|
-
Annex A.1</title>
|
1257
|
-
<clause id="Q1" inline-header="false" obligation="normative">
|
1258
|
-
<title depth="3">A.1.1
|
1259
|
-
<tab/>
|
1260
|
-
Annex A.1a</title>
|
1261
|
-
</clause>
|
1151
|
+
</clause>
|
1152
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
1153
|
+
<title>An Appendix</title>
|
1154
|
+
<clause id="Q3" inline-header="false" obligation="normative">
|
1155
|
+
<title>Appendix subclause</title>
|
1262
1156
|
</clause>
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
</annex>
|
1274
|
-
<bibliography>
|
1275
|
-
<references id="R" normative="true" obligation="informative">
|
1276
|
-
<title depth="1">2
|
1277
|
-
<tab/>
|
1278
|
-
Normative References</title>
|
1157
|
+
</appendix>
|
1158
|
+
</annex>
|
1159
|
+
<bibliography>
|
1160
|
+
<references id="R" normative="true" obligation="informative">
|
1161
|
+
<title>Normative References</title>
|
1162
|
+
</references>
|
1163
|
+
<clause id="S" obligation="informative">
|
1164
|
+
<title>Bibliography</title>
|
1165
|
+
<references id="T" normative="false" obligation="informative">
|
1166
|
+
<title>Bibliography Subsection</title>
|
1279
1167
|
</references>
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1168
|
+
</clause>
|
1169
|
+
</bibliography>
|
1170
|
+
</iso-standard>
|
1171
|
+
INPUT
|
1172
|
+
output = <<~OUTPUT
|
1173
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
|
1174
|
+
<preface>
|
1175
|
+
<foreword obligation="informative" displayorder="1">
|
1176
|
+
<title>Foreword</title>
|
1177
|
+
<p id="A">This is a preamble
|
1178
|
+
<xref target="C"><strong>0.1</strong></xref>
|
1179
|
+
<xref target="C1"><strong>0.2</strong></xref>
|
1180
|
+
<xref target="D">Clause <strong>1</strong></xref>
|
1181
|
+
<xref target="H">Clause <strong>3</strong></xref>
|
1182
|
+
<xref target="I"><strong>3.1</strong></xref>
|
1183
|
+
<xref target="J"><strong>3.1.1</strong></xref>
|
1184
|
+
<xref target="K"><strong>3.2</strong></xref>
|
1185
|
+
<xref target="L">Clause <strong>4</strong></xref>
|
1186
|
+
<xref target="M">Clause <strong>5</strong></xref>
|
1187
|
+
<xref target="N"><strong>5.1</strong></xref>
|
1188
|
+
<xref target="O"><strong>5.2</strong></xref>
|
1189
|
+
<xref target="P">Annex A</xref>
|
1190
|
+
<xref target="Q"><strong>A.1</strong></xref>
|
1191
|
+
<xref target="Q1"><strong>A.1.1</strong></xref>
|
1192
|
+
<xref target="Q2">Annex A, Appendix 1</xref>
|
1193
|
+
<xref target="Q3">Annex A, Appendix 1.1</xref>
|
1194
|
+
<xref target="R">Clause <strong>2</strong></xref></p>
|
1195
|
+
</foreword>
|
1196
|
+
<introduction id="B" obligation="informative" displayorder="2">
|
1197
|
+
<title depth="1">0<tab/>Introduction</title>
|
1198
|
+
<clause id="C" inline-header="false" obligation="informative">
|
1199
|
+
<title depth="2">0.1<tab/>Introduction Subsection</title>
|
1200
|
+
</clause>
|
1201
|
+
<clause id="C1" inline-header="true" obligation="informative"><title>0.2</title>Text</clause>
|
1202
|
+
</introduction>
|
1203
|
+
</preface>
|
1204
|
+
<sections>
|
1205
|
+
<clause id="D" obligation="normative" type="scope" displayorder="3">
|
1206
|
+
<title depth="1">1<tab/>Scope</title>
|
1207
|
+
<p id="E">Text</p>
|
1208
|
+
</clause>
|
1209
|
+
<terms id="H" obligation="normative" displayorder="5">
|
1210
|
+
<title depth="1">3<tab/>Terms, definitions, symbols and abbreviated terms</title>
|
1211
|
+
<terms id="I" obligation="normative">
|
1212
|
+
<title depth="2">3.1<tab/>Normal Terms</title>
|
1213
|
+
<term id="J"><name>3.1.1</name>
|
1214
|
+
<preferred>Term2</preferred>
|
1215
|
+
</term>
|
1216
|
+
</terms>
|
1217
|
+
<definitions id="K" inline-header="true"><title>3.2</title>
|
1218
|
+
<dl>
|
1219
|
+
<dt>Symbol</dt>
|
1220
|
+
<dd>Definition</dd>
|
1221
|
+
</dl>
|
1222
|
+
</definitions>
|
1223
|
+
</terms>
|
1224
|
+
<definitions id="L" displayorder="6"><title>4</title>
|
1225
|
+
<dl>
|
1226
|
+
<dt>Symbol</dt>
|
1227
|
+
<dd>Definition</dd>
|
1228
|
+
</dl>
|
1229
|
+
</definitions>
|
1230
|
+
<clause id="M" inline-header="false" obligation="normative" displayorder="7">
|
1231
|
+
<title depth="1">5<tab/>Clause 4</title>
|
1232
|
+
<clause id="N" inline-header="false" obligation="normative">
|
1233
|
+
<title depth="2">5.1<tab/>Introduction</title>
|
1234
|
+
</clause>
|
1235
|
+
<clause id="O" inline-header="false" obligation="normative">
|
1236
|
+
<title depth="2">5.2<tab/>Clause 4.2</title>
|
1237
|
+
</clause>
|
1238
|
+
</clause>
|
1239
|
+
</sections>
|
1240
|
+
<annex id="P" inline-header="false" obligation="normative" displayorder="8">
|
1241
|
+
<title><strong>Annex A</strong><tab/>(normative)<br/><strong>Annex</strong></title>
|
1242
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
1243
|
+
<title depth="2">A.1<tab/>Annex A.1</title>
|
1244
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
1245
|
+
<title depth="3">A.1.1<tab/>Annex A.1a</title>
|
1246
|
+
</clause>
|
1247
|
+
</clause>
|
1248
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
1249
|
+
<title depth="2">Appendix 1<tab/>An Appendix</title>
|
1250
|
+
<clause id="Q3" inline-header="false" obligation="normative">
|
1251
|
+
<title depth="3">Appendix 1.1<tab/>Appendix subclause</title>
|
1252
|
+
</clause>
|
1253
|
+
</appendix>
|
1254
|
+
</annex>
|
1255
|
+
<bibliography>
|
1256
|
+
<references id="R" normative="true" obligation="informative" displayorder="4">
|
1257
|
+
<title depth="1">2<tab/>Normative References</title>
|
1258
|
+
</references>
|
1259
|
+
<clause id="S" obligation="informative" displayorder="9">
|
1260
|
+
<title depth="1">Bibliography</title>
|
1261
|
+
<references id="T" normative="false" obligation="informative">
|
1262
|
+
<title depth="2">Bibliography Subsection</title>
|
1263
|
+
</references>
|
1264
|
+
</clause>
|
1265
|
+
</bibliography>
|
1266
|
+
</iso-standard>
|
1267
|
+
OUTPUT
|
1268
|
+
expect((IsoDoc::BSI::PresentationXMLConvert.new({})
|
1269
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1289
1270
|
end
|
1290
1271
|
|
1291
1272
|
it "cross-references lists" do
|
1292
|
-
|
1273
|
+
input = <<~INPUT
|
1293
1274
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1294
1275
|
<preface>
|
1295
1276
|
<foreword>
|
@@ -1342,11 +1323,11 @@ RSpec.describe IsoDoc::BSI do
|
|
1342
1323
|
</annex>
|
1343
1324
|
</iso-standard>
|
1344
1325
|
INPUT
|
1345
|
-
|
1326
|
+
output = <<~OUTPUT
|
1346
1327
|
<?xml version='1.0'?>
|
1347
1328
|
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
1348
1329
|
<preface>
|
1349
|
-
<foreword>
|
1330
|
+
<foreword displayorder='1'>
|
1350
1331
|
<p>
|
1351
1332
|
<xref target="N">Clause <strong>1</strong>, List</xref>
|
1352
1333
|
<xref target="note1"><strong>3.1</strong>, List 1</xref>
|
@@ -1358,7 +1339,7 @@ RSpec.describe IsoDoc::BSI do
|
|
1358
1339
|
</foreword>
|
1359
1340
|
</preface>
|
1360
1341
|
<sections>
|
1361
|
-
<clause id="scope" type="scope">
|
1342
|
+
<clause id="scope" type="scope" displayorder='2'>
|
1362
1343
|
<title depth="1">1
|
1363
1344
|
<tab/>
|
1364
1345
|
Scope</title>
|
@@ -1368,10 +1349,10 @@ RSpec.describe IsoDoc::BSI do
|
|
1368
1349
|
</li>
|
1369
1350
|
</ol>
|
1370
1351
|
</clause>
|
1371
|
-
<terms id="terms">
|
1352
|
+
<terms id="terms" displayorder='3'>
|
1372
1353
|
<title>2</title>
|
1373
1354
|
</terms>
|
1374
|
-
<clause id="widgets">
|
1355
|
+
<clause id="widgets" displayorder='4'>
|
1375
1356
|
<title depth="1">3
|
1376
1357
|
<tab/>
|
1377
1358
|
Widgets</title>
|
@@ -1390,10 +1371,10 @@ RSpec.describe IsoDoc::BSI do
|
|
1390
1371
|
</clause>
|
1391
1372
|
</clause>
|
1392
1373
|
</sections>
|
1393
|
-
<annex id="annex1">
|
1374
|
+
<annex id="annex1" displayorder='5'>
|
1394
1375
|
<title>
|
1395
1376
|
<strong>Annex A</strong>
|
1396
|
-
<
|
1377
|
+
<tab/>(informative)</title>
|
1397
1378
|
<clause id="annex1a" inline-header="true">
|
1398
1379
|
<title>A.1</title>
|
1399
1380
|
<ol id="AN" type="alphabet">
|
@@ -1418,313 +1399,319 @@ RSpec.describe IsoDoc::BSI do
|
|
1418
1399
|
</annex>
|
1419
1400
|
</iso-standard>
|
1420
1401
|
OUTPUT
|
1402
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
1403
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1421
1404
|
end
|
1422
1405
|
|
1423
1406
|
it "cross-references list items" do
|
1424
|
-
|
1425
|
-
|
1426
|
-
<
|
1427
|
-
<
|
1428
|
-
<
|
1429
|
-
<
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
<
|
1440
|
-
<
|
1441
|
-
|
1442
|
-
<
|
1443
|
-
<
|
1407
|
+
input = <<~INPUT
|
1408
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1409
|
+
<preface>
|
1410
|
+
<foreword>
|
1411
|
+
<p>
|
1412
|
+
<xref target="N"/>
|
1413
|
+
<xref target="note1"/>
|
1414
|
+
<xref target="note2"/>
|
1415
|
+
<xref target="AN"/>
|
1416
|
+
<xref target="Anote1"/>
|
1417
|
+
<xref target="Anote2"/>
|
1418
|
+
</p>
|
1419
|
+
</foreword>
|
1420
|
+
</preface>
|
1421
|
+
<sections>
|
1422
|
+
<clause id="scope" type="scope">
|
1423
|
+
<title>Scope</title>
|
1424
|
+
<ol id="N1" type="alphabet">
|
1425
|
+
<li id="N">
|
1426
|
+
<p>A</p>
|
1427
|
+
</li>
|
1428
|
+
</ol>
|
1429
|
+
</clause>
|
1430
|
+
<terms id="terms"/>
|
1431
|
+
<clause id="widgets">
|
1432
|
+
<title>Widgets</title>
|
1433
|
+
<clause id="widgets1">
|
1434
|
+
<ol id="note1l" type="alphabet">
|
1435
|
+
<li id="note1">
|
1444
1436
|
<p>A</p>
|
1445
1437
|
</li>
|
1446
1438
|
</ol>
|
1447
|
-
|
1448
|
-
|
1449
|
-
<clause id="widgets">
|
1450
|
-
<title>Widgets</title>
|
1451
|
-
<clause id="widgets1">
|
1452
|
-
<ol id="note1l" type="alphabet">
|
1453
|
-
<li id="note1">
|
1454
|
-
<p>A</p>
|
1455
|
-
</li>
|
1456
|
-
</ol>
|
1457
|
-
<ol id="note2l" type="arabic">
|
1458
|
-
<li id="note2">
|
1459
|
-
<p>A</p>
|
1460
|
-
</li>
|
1461
|
-
</ol>
|
1462
|
-
</clause>
|
1463
|
-
</clause>
|
1464
|
-
</sections>
|
1465
|
-
<annex id="annex1">
|
1466
|
-
<clause id="annex1a">
|
1467
|
-
<ol id="ANl" type="alphabet">
|
1468
|
-
<li id="AN">
|
1439
|
+
<ol id="note2l" type="arabic">
|
1440
|
+
<li id="note2">
|
1469
1441
|
<p>A</p>
|
1470
1442
|
</li>
|
1471
1443
|
</ol>
|
1472
1444
|
</clause>
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1445
|
+
</clause>
|
1446
|
+
</sections>
|
1447
|
+
<annex id="annex1">
|
1448
|
+
<clause id="annex1a">
|
1449
|
+
<ol id="ANl" type="alphabet">
|
1450
|
+
<li id="AN">
|
1451
|
+
<p>A</p>
|
1452
|
+
</li>
|
1453
|
+
</ol>
|
1454
|
+
</clause>
|
1455
|
+
<clause id="annex1b">
|
1456
|
+
<ol id="Anote1l" type="alphabet">
|
1457
|
+
<li id="Anote1">
|
1458
|
+
<p>A</p>
|
1459
|
+
</li>
|
1460
|
+
</ol>
|
1461
|
+
<ol id="Anote2l" type="arabic">
|
1462
|
+
<li id="Anote2">
|
1463
|
+
<p>A</p>
|
1464
|
+
</li>
|
1465
|
+
</ol>
|
1466
|
+
</clause>
|
1467
|
+
</annex>
|
1468
|
+
</iso-standard>
|
1469
|
+
INPUT
|
1470
|
+
output = <<~OUTPUT
|
1471
|
+
<?xml version='1.0'?>
|
1472
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1473
|
+
<preface>
|
1474
|
+
<foreword displayorder='1'>
|
1475
|
+
<p>
|
1476
|
+
<xref target='N'>Clause <strong>1</strong>a)</xref>
|
1477
|
+
<xref target='note1'><strong>3.1</strong>a)</xref>
|
1478
|
+
<xref target='note2'><strong>3.1</strong>1)</xref>
|
1479
|
+
<xref target='AN'><strong>A.1</strong>a)</xref>
|
1480
|
+
<xref target='Anote1'><strong>A.2</strong>a)</xref>
|
1481
|
+
<xref target='Anote2'><strong>A.2</strong>1)</xref>
|
1482
|
+
</p>
|
1483
|
+
</foreword>
|
1484
|
+
</preface>
|
1485
|
+
<sections>
|
1486
|
+
<clause id='scope' type='scope' displayorder='2'>
|
1487
|
+
<title depth='1'>1<tab/>Scope</title>
|
1488
|
+
<ol id='N1' type="alphabet">
|
1489
|
+
<li id='N'>
|
1490
|
+
<p>A</p>
|
1491
|
+
</li>
|
1492
|
+
</ol>
|
1493
|
+
</clause>
|
1494
|
+
<terms id='terms' displayorder='3'><title>2</title></terms>
|
1495
|
+
<clause id='widgets' displayorder='4'>
|
1496
|
+
<title depth='1'>3<tab/>Widgets</title>
|
1497
|
+
<clause inline-header="true" id='widgets1'><title>3.1</title>
|
1498
|
+
<ol id='note1l' type="alphabet">
|
1499
|
+
<li id='note1'>
|
1481
1500
|
<p>A</p>
|
1482
1501
|
</li>
|
1483
1502
|
</ol>
|
1484
|
-
|
1485
|
-
|
1486
|
-
</iso-standard>
|
1487
|
-
INPUT
|
1488
|
-
<?xml version='1.0'?>
|
1489
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1490
|
-
<preface>
|
1491
|
-
<foreword>
|
1492
|
-
<p>
|
1493
|
-
<xref target='N'>Clause <strong>1</strong>a)</xref>
|
1494
|
-
<xref target='note1'><strong>3.1</strong>a)</xref>
|
1495
|
-
<xref target='note2'><strong>3.1</strong>1)</xref>
|
1496
|
-
<xref target='AN'><strong>A.1</strong>a)</xref>
|
1497
|
-
<xref target='Anote1'><strong>A.2</strong>a)</xref>
|
1498
|
-
<xref target='Anote2'><strong>A.2</strong>1)</xref>
|
1499
|
-
</p>
|
1500
|
-
</foreword>
|
1501
|
-
</preface>
|
1502
|
-
<sections>
|
1503
|
-
<clause id='scope' type='scope'>
|
1504
|
-
<title depth='1'>1<tab/>Scope</title>
|
1505
|
-
<ol id='N1' type="alphabet">
|
1506
|
-
<li id='N'>
|
1503
|
+
<ol id='note2l' type="arabic">
|
1504
|
+
<li id='note2'>
|
1507
1505
|
<p>A</p>
|
1508
1506
|
</li>
|
1509
1507
|
</ol>
|
1510
1508
|
</clause>
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1509
|
+
</clause>
|
1510
|
+
</sections>
|
1511
|
+
<annex id='annex1' displayorder='5'><title><strong>Annex A</strong><tab/>(informative)</title>
|
1512
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
1513
|
+
<ol id='ANl' type="alphabet">
|
1514
|
+
<li id='AN'>
|
1515
|
+
<p>A</p>
|
1516
|
+
</li>
|
1517
|
+
</ol>
|
1518
|
+
</clause>
|
1519
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
1520
|
+
<ol id='Anote1l' type="alphabet">
|
1521
|
+
<li id='Anote1'>
|
1522
|
+
<p>A</p>
|
1523
|
+
</li>
|
1524
|
+
</ol>
|
1525
|
+
<ol id='Anote2l' type="arabic">
|
1526
|
+
<li id='Anote2'>
|
1527
|
+
<p>A</p>
|
1528
|
+
</li>
|
1529
|
+
</ol>
|
1530
|
+
</clause>
|
1531
|
+
</annex>
|
1532
|
+
</iso-standard>
|
1533
|
+
OUTPUT
|
1534
|
+
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
1535
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
it "cross-references nested list items" do
|
1539
|
+
input = <<~INPUT
|
1540
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1541
|
+
<preface>
|
1542
|
+
<foreword>
|
1543
|
+
<p>
|
1544
|
+
<xref target="N"/>
|
1545
|
+
<xref target="note1"/>
|
1546
|
+
<xref target="note2"/>
|
1547
|
+
<xref target="AN"/>
|
1548
|
+
<xref target="Anote1"/>
|
1549
|
+
<xref target="Anote2"/>
|
1550
|
+
<xref target="Na"/>
|
1551
|
+
<xref target="note1a"/>
|
1552
|
+
<xref target="note2a"/>
|
1553
|
+
<xref target="ANa"/>
|
1554
|
+
<xref target="Anote1a"/>
|
1555
|
+
<xref target="Anote2a"/>
|
1556
|
+
</p>
|
1557
|
+
</foreword>
|
1558
|
+
</preface>
|
1559
|
+
<sections>
|
1560
|
+
<clause id="scope" type="scope">
|
1561
|
+
<title>Scope</title>
|
1562
|
+
<ol id="N1" type="alphabet">
|
1563
|
+
<li id="N">
|
1564
|
+
<p>A</p>
|
1565
|
+
<ol type="arabic">
|
1566
|
+
<li id="note1">
|
1517
1567
|
<p>A</p>
|
1568
|
+
<ol type="roman">
|
1569
|
+
<li id="note2">
|
1570
|
+
<p>A</p>
|
1571
|
+
<ol type="alphabet">
|
1572
|
+
<li id="AN">
|
1573
|
+
<p>A</p>
|
1574
|
+
<ol type="arabic">
|
1575
|
+
<li id="Anote1">
|
1576
|
+
<p>A</p>
|
1577
|
+
<ol type="roman">
|
1578
|
+
<li id="Anote2">
|
1579
|
+
<p>A</p>
|
1580
|
+
</li>
|
1581
|
+
</ol>
|
1582
|
+
</li>
|
1583
|
+
</ol>
|
1584
|
+
</li>
|
1585
|
+
</ol>
|
1586
|
+
</li>
|
1587
|
+
</ol>
|
1518
1588
|
</li>
|
1519
1589
|
</ol>
|
1520
|
-
|
1521
|
-
|
1590
|
+
</li>
|
1591
|
+
</ol>
|
1592
|
+
<ol id="N1a" type="arabic">
|
1593
|
+
<li id="Na">
|
1594
|
+
<p>A</p>
|
1595
|
+
<ol type="roman">
|
1596
|
+
<li id="note1a">
|
1522
1597
|
<p>A</p>
|
1598
|
+
<ol type="alphabet">
|
1599
|
+
<li id="note2a">
|
1600
|
+
<p>A</p>
|
1601
|
+
<ol type="arabic">
|
1602
|
+
<li id="ANa">
|
1603
|
+
<p>A</p>
|
1604
|
+
<ol type="roman">
|
1605
|
+
<li id="Anote1a">
|
1606
|
+
<p>A</p>
|
1607
|
+
<ol type="alphabet">
|
1608
|
+
<li id="Anote2a">
|
1609
|
+
<p>A</p>
|
1610
|
+
</li>
|
1611
|
+
</ol>
|
1612
|
+
</li>
|
1613
|
+
</ol>
|
1614
|
+
</li>
|
1615
|
+
</ol>
|
1616
|
+
</li>
|
1617
|
+
</ol>
|
1523
1618
|
</li>
|
1524
1619
|
</ol>
|
1525
|
-
</
|
1526
|
-
</
|
1527
|
-
</
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
<
|
1537
|
-
<
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
</
|
1542
|
-
<
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
</
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
|
1551
|
-
|
1552
|
-
|
1553
|
-
|
1620
|
+
</li>
|
1621
|
+
</ol>
|
1622
|
+
</clause>
|
1623
|
+
</sections>
|
1624
|
+
</iso-standard>
|
1625
|
+
INPUT
|
1626
|
+
output = <<~OUTPUT
|
1627
|
+
<?xml version='1.0'?>
|
1628
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1629
|
+
<preface>
|
1630
|
+
<foreword displayorder='1'>
|
1631
|
+
<p>
|
1632
|
+
<xref target='N'>Clause <strong>1</strong>a)</xref>
|
1633
|
+
<xref target='note1'>Clause <strong>1</strong>a.1)</xref>
|
1634
|
+
<xref target='note2'>Clause <strong>1</strong>a.1.i)</xref>
|
1635
|
+
<xref target='AN'>Clause <strong>1</strong>a.1.i.a)</xref>
|
1636
|
+
<xref target='Anote1'>Clause <strong>1</strong>a.1.i.a.1)</xref>
|
1637
|
+
<xref target='Anote2'>Clause <strong>1</strong>a.1.i.a.1.i)</xref>
|
1638
|
+
<xref target='Na'>Clause <strong>1</strong>1)</xref>
|
1639
|
+
<xref target='note1a'>Clause <strong>1</strong>1.i)</xref>
|
1640
|
+
<xref target='note2a'>Clause <strong>1</strong>1.i.a)</xref>
|
1641
|
+
<xref target='ANa'>Clause <strong>1</strong>1.i.a.1)</xref>
|
1642
|
+
<xref target='Anote1a'>Clause <strong>1</strong>1.i.a.1.i)</xref>
|
1643
|
+
<xref target='Anote2a'>Clause <strong>1</strong>1.i.a.1.i.a)</xref>
|
1644
|
+
</p>
|
1645
|
+
</foreword>
|
1646
|
+
</preface>
|
1647
|
+
<sections>
|
1648
|
+
<clause id='scope' type='scope' displayorder='2'>
|
1649
|
+
<title depth='1'>1<tab/>Scope</title>
|
1650
|
+
<ol id='N1' type="alphabet">
|
1651
|
+
<li id='N'>
|
1652
|
+
<p>A</p>
|
1653
|
+
<ol type="arabic">
|
1654
|
+
<li id='note1'>
|
1655
|
+
<p>A</p>
|
1656
|
+
<ol type="roman">
|
1657
|
+
<li id='note2'>
|
1658
|
+
<p>A</p>
|
1659
|
+
<ol type="alphabet">
|
1660
|
+
<li id='AN'>
|
1661
|
+
<p>A</p>
|
1662
|
+
<ol type="arabic">
|
1663
|
+
<li id='Anote1'>
|
1664
|
+
<p>A</p>
|
1665
|
+
<ol type="roman">
|
1666
|
+
<li id='Anote2'>
|
1667
|
+
<p>A</p>
|
1668
|
+
</li>
|
1669
|
+
</ol>
|
1670
|
+
</li>
|
1671
|
+
</ol>
|
1672
|
+
</li>
|
1673
|
+
</ol>
|
1674
|
+
</li>
|
1675
|
+
</ol>
|
1676
|
+
</li>
|
1677
|
+
</ol>
|
1678
|
+
</li>
|
1679
|
+
</ol>
|
1680
|
+
<ol id='N1a' type='arabic'>
|
1681
|
+
<li id='Na'>
|
1682
|
+
<p>A</p>
|
1683
|
+
<ol type='roman'>
|
1684
|
+
<li id='note1a'>
|
1685
|
+
<p>A</p>
|
1686
|
+
<ol type='alphabet'>
|
1687
|
+
<li id='note2a'>
|
1688
|
+
<p>A</p>
|
1689
|
+
<ol type='arabic'>
|
1690
|
+
<li id='ANa'>
|
1691
|
+
<p>A</p>
|
1692
|
+
<ol type='roman'>
|
1693
|
+
<li id='Anote1a'>
|
1694
|
+
<p>A</p>
|
1695
|
+
<ol type='alphabet'>
|
1696
|
+
<li id='Anote2a'>
|
1697
|
+
<p>A</p>
|
1698
|
+
</li>
|
1699
|
+
</ol>
|
1700
|
+
</li>
|
1701
|
+
</ol>
|
1702
|
+
</li>
|
1703
|
+
</ol>
|
1704
|
+
</li>
|
1705
|
+
</ol>
|
1706
|
+
</li>
|
1707
|
+
</ol>
|
1708
|
+
</li>
|
1709
|
+
</ol>
|
1710
|
+
</clause>
|
1711
|
+
</sections>
|
1712
|
+
</iso-standard>
|
1713
|
+
OUTPUT
|
1554
1714
|
expect(xmlpp(IsoDoc::BSI::PresentationXMLConvert.new({})
|
1555
|
-
.convert("test",
|
1556
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1557
|
-
<preface>
|
1558
|
-
<foreword>
|
1559
|
-
<p>
|
1560
|
-
<xref target="N"/>
|
1561
|
-
<xref target="note1"/>
|
1562
|
-
<xref target="note2"/>
|
1563
|
-
<xref target="AN"/>
|
1564
|
-
<xref target="Anote1"/>
|
1565
|
-
<xref target="Anote2"/>
|
1566
|
-
<xref target="Na"/>
|
1567
|
-
<xref target="note1a"/>
|
1568
|
-
<xref target="note2a"/>
|
1569
|
-
<xref target="ANa"/>
|
1570
|
-
<xref target="Anote1a"/>
|
1571
|
-
<xref target="Anote2a"/>
|
1572
|
-
</p>
|
1573
|
-
</foreword>
|
1574
|
-
</preface>
|
1575
|
-
<sections>
|
1576
|
-
<clause id="scope" type="scope">
|
1577
|
-
<title>Scope</title>
|
1578
|
-
<ol id="N1" type="alphabet">
|
1579
|
-
<li id="N">
|
1580
|
-
<p>A</p>
|
1581
|
-
<ol type="arabic">
|
1582
|
-
<li id="note1">
|
1583
|
-
<p>A</p>
|
1584
|
-
<ol type="roman">
|
1585
|
-
<li id="note2">
|
1586
|
-
<p>A</p>
|
1587
|
-
<ol type="alphabet">
|
1588
|
-
<li id="AN">
|
1589
|
-
<p>A</p>
|
1590
|
-
<ol type="arabic">
|
1591
|
-
<li id="Anote1">
|
1592
|
-
<p>A</p>
|
1593
|
-
<ol type="roman">
|
1594
|
-
<li id="Anote2">
|
1595
|
-
<p>A</p>
|
1596
|
-
</li>
|
1597
|
-
</ol>
|
1598
|
-
</li>
|
1599
|
-
</ol>
|
1600
|
-
</li>
|
1601
|
-
</ol>
|
1602
|
-
</li>
|
1603
|
-
</ol>
|
1604
|
-
</li>
|
1605
|
-
</ol>
|
1606
|
-
</li>
|
1607
|
-
</ol>
|
1608
|
-
<ol id="N1a" type="arabic">
|
1609
|
-
<li id="Na">
|
1610
|
-
<p>A</p>
|
1611
|
-
<ol type="roman">
|
1612
|
-
<li id="note1a">
|
1613
|
-
<p>A</p>
|
1614
|
-
<ol type="alphabet">
|
1615
|
-
<li id="note2a">
|
1616
|
-
<p>A</p>
|
1617
|
-
<ol type="arabic">
|
1618
|
-
<li id="ANa">
|
1619
|
-
<p>A</p>
|
1620
|
-
<ol type="roman">
|
1621
|
-
<li id="Anote1a">
|
1622
|
-
<p>A</p>
|
1623
|
-
<ol type="alphabet">
|
1624
|
-
<li id="Anote2a">
|
1625
|
-
<p>A</p>
|
1626
|
-
</li>
|
1627
|
-
</ol>
|
1628
|
-
</li>
|
1629
|
-
</ol>
|
1630
|
-
</li>
|
1631
|
-
</ol>
|
1632
|
-
</li>
|
1633
|
-
</ol>
|
1634
|
-
</li>
|
1635
|
-
</ol>
|
1636
|
-
</li>
|
1637
|
-
</ol>
|
1638
|
-
</clause>
|
1639
|
-
</sections>
|
1640
|
-
</iso-standard>
|
1641
|
-
INPUT
|
1642
|
-
<?xml version='1.0'?>
|
1643
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1644
|
-
<preface>
|
1645
|
-
<foreword>
|
1646
|
-
<p>
|
1647
|
-
<xref target='N'>Clause <strong>1</strong>a)</xref>
|
1648
|
-
<xref target='note1'>Clause <strong>1</strong>a.1)</xref>
|
1649
|
-
<xref target='note2'>Clause <strong>1</strong>a.1.i)</xref>
|
1650
|
-
<xref target='AN'>Clause <strong>1</strong>a.1.i.a)</xref>
|
1651
|
-
<xref target='Anote1'>Clause <strong>1</strong>a.1.i.a.1)</xref>
|
1652
|
-
<xref target='Anote2'>Clause <strong>1</strong>a.1.i.a.1.i)</xref>
|
1653
|
-
<xref target='Na'>Clause <strong>1</strong>1)</xref>
|
1654
|
-
<xref target='note1a'>Clause <strong>1</strong>1.i)</xref>
|
1655
|
-
<xref target='note2a'>Clause <strong>1</strong>1.i.a)</xref>
|
1656
|
-
<xref target='ANa'>Clause <strong>1</strong>1.i.a.1)</xref>
|
1657
|
-
<xref target='Anote1a'>Clause <strong>1</strong>1.i.a.1.i)</xref>
|
1658
|
-
<xref target='Anote2a'>Clause <strong>1</strong>1.i.a.1.i.a)</xref>
|
1659
|
-
</p>
|
1660
|
-
</foreword>
|
1661
|
-
</preface>
|
1662
|
-
<sections>
|
1663
|
-
<clause id='scope' type='scope'>
|
1664
|
-
<title depth='1'>1<tab/>Scope</title>
|
1665
|
-
<ol id='N1' type="alphabet">
|
1666
|
-
<li id='N'>
|
1667
|
-
<p>A</p>
|
1668
|
-
<ol type="arabic">
|
1669
|
-
<li id='note1'>
|
1670
|
-
<p>A</p>
|
1671
|
-
<ol type="roman">
|
1672
|
-
<li id='note2'>
|
1673
|
-
<p>A</p>
|
1674
|
-
<ol type="alphabet">
|
1675
|
-
<li id='AN'>
|
1676
|
-
<p>A</p>
|
1677
|
-
<ol type="arabic">
|
1678
|
-
<li id='Anote1'>
|
1679
|
-
<p>A</p>
|
1680
|
-
<ol type="roman">
|
1681
|
-
<li id='Anote2'>
|
1682
|
-
<p>A</p>
|
1683
|
-
</li>
|
1684
|
-
</ol>
|
1685
|
-
</li>
|
1686
|
-
</ol>
|
1687
|
-
</li>
|
1688
|
-
</ol>
|
1689
|
-
</li>
|
1690
|
-
</ol>
|
1691
|
-
</li>
|
1692
|
-
</ol>
|
1693
|
-
</li>
|
1694
|
-
</ol>
|
1695
|
-
<ol id='N1a' type='arabic'>
|
1696
|
-
<li id='Na'>
|
1697
|
-
<p>A</p>
|
1698
|
-
<ol type='roman'>
|
1699
|
-
<li id='note1a'>
|
1700
|
-
<p>A</p>
|
1701
|
-
<ol type='alphabet'>
|
1702
|
-
<li id='note2a'>
|
1703
|
-
<p>A</p>
|
1704
|
-
<ol type='arabic'>
|
1705
|
-
<li id='ANa'>
|
1706
|
-
<p>A</p>
|
1707
|
-
<ol type='roman'>
|
1708
|
-
<li id='Anote1a'>
|
1709
|
-
<p>A</p>
|
1710
|
-
<ol type='alphabet'>
|
1711
|
-
<li id='Anote2a'>
|
1712
|
-
<p>A</p>
|
1713
|
-
</li>
|
1714
|
-
</ol>
|
1715
|
-
</li>
|
1716
|
-
</ol>
|
1717
|
-
</li>
|
1718
|
-
</ol>
|
1719
|
-
</li>
|
1720
|
-
</ol>
|
1721
|
-
</li>
|
1722
|
-
</ol>
|
1723
|
-
</li>
|
1724
|
-
</ol>
|
1725
|
-
</clause>
|
1726
|
-
</sections>
|
1727
|
-
</iso-standard>
|
1728
|
-
OUTPUT
|
1715
|
+
.convert("test", input, true))).to be_equivalent_to xmlpp(output)
|
1729
1716
|
end
|
1730
1717
|
end
|