metanorma-iso 1.6.0 → 1.7.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/.github/workflows/rake.yml +16 -29
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/iso/base.rb +13 -13
- data/lib/asciidoctor/iso/basicdoc.rng +5 -3
- data/lib/asciidoctor/iso/cleanup.rb +1 -1
- data/lib/asciidoctor/iso/front.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +134 -5
- data/lib/asciidoctor/iso/isostandard-amd.rng +11 -4
- data/lib/asciidoctor/iso/isostandard.rng +33 -107
- data/lib/asciidoctor/iso/validate.rb +79 -0
- data/lib/asciidoctor/iso/validate_section.rb +12 -9
- data/lib/isodoc/iso/base_convert.rb +11 -0
- data/lib/isodoc/iso/html/header.html +12 -12
- data/lib/isodoc/iso/html/html_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/html_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html/word_iso_intro.html +1 -1
- data/lib/isodoc/iso/html/word_iso_titlepage.html +1 -1
- data/lib/isodoc/iso/html_convert.rb +2 -2
- data/lib/isodoc/iso/i18n-en.yaml +6 -0
- data/lib/isodoc/iso/i18n-fr.yaml +4 -0
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +4 -0
- data/lib/isodoc/iso/index.rb +139 -0
- data/lib/isodoc/iso/iso.amendment.xsl +1006 -317
- data/lib/isodoc/iso/iso.international-standard.xsl +1006 -317
- data/lib/isodoc/iso/presentation_xml_convert.rb +1 -4
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_convert.rb +2 -2
- data/lib/isodoc/iso/xref.rb +33 -12
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +3 -3
- data/spec/asciidoctor/amd_spec.rb +696 -0
- data/spec/asciidoctor/base_spec.rb +704 -0
- data/spec/asciidoctor/blocks_spec.rb +527 -0
- data/spec/asciidoctor/cleanup_spec.rb +1134 -0
- data/spec/asciidoctor/inline_spec.rb +195 -0
- data/spec/asciidoctor/lists_spec.rb +197 -0
- data/spec/asciidoctor/refs_spec.rb +375 -0
- data/spec/asciidoctor/section_spec.rb +393 -0
- data/spec/asciidoctor/table_spec.rb +329 -0
- data/spec/asciidoctor/validate_spec.rb +1555 -0
- data/spec/isodoc/amd_spec.rb +967 -946
- data/spec/isodoc/blocks_spec.rb +530 -507
- data/spec/isodoc/i18n_spec.rb +953 -911
- data/spec/isodoc/inline_spec.rb +355 -293
- data/spec/isodoc/iso_spec.rb +340 -316
- data/spec/isodoc/metadata_spec.rb +392 -382
- data/spec/isodoc/postproc_spec.rb +834 -656
- data/spec/isodoc/ref_spec.rb +374 -331
- data/spec/isodoc/section_spec.rb +821 -519
- data/spec/isodoc/table_spec.rb +472 -411
- data/spec/isodoc/terms_spec.rb +209 -185
- data/spec/isodoc/xref_spec.rb +1370 -1236
- data/spec/metanorma/processor_spec.rb +28 -26
- data/spec/spec_helper.rb +184 -189
- metadata +22 -23
- data/.rubocop.ribose.yml +0 -66
- data/spec/asciidoctor-iso/amd_spec.rb +0 -694
- data/spec/asciidoctor-iso/base_spec.rb +0 -713
- data/spec/asciidoctor-iso/blocks_spec.rb +0 -482
- data/spec/asciidoctor-iso/cleanup_spec.rb +0 -1025
- data/spec/asciidoctor-iso/inline_spec.rb +0 -170
- data/spec/asciidoctor-iso/lists_spec.rb +0 -190
- data/spec/asciidoctor-iso/refs_spec.rb +0 -317
- data/spec/asciidoctor-iso/section_spec.rb +0 -362
- data/spec/asciidoctor-iso/table_spec.rb +0 -313
- data/spec/asciidoctor-iso/validate_spec.rb +0 -1251
- data/spec/assets/xref_error.adoc +0 -7
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -3,200 +3,224 @@ require "spec_helper"
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "processes IsoXML terms" do
|
5
5
|
input = <<~INPUT
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
|
+
<sections>
|
8
|
+
<terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
|
9
|
+
<term id="paddy1">
|
10
|
+
<preferred>paddy</preferred>
|
11
|
+
<domain>rice</domain>
|
12
|
+
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
13
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
14
|
+
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
15
|
+
<ul>
|
16
|
+
<li>A</li>
|
17
|
+
</ul>
|
18
|
+
</termexample>
|
19
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
20
|
+
<ul>
|
21
|
+
<li>A</li>
|
22
|
+
</ul>
|
23
|
+
</termexample>
|
9
24
|
|
10
|
-
<
|
11
|
-
<
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
</ul>
|
18
|
-
</termexample>
|
19
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
20
|
-
<ul>
|
21
|
-
<li>A</li>
|
22
|
-
</ul>
|
23
|
-
</termexample>
|
25
|
+
<termsource status="modified">
|
26
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
27
|
+
<modification>
|
28
|
+
<p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
29
|
+
</modification>
|
30
|
+
</termsource>
|
31
|
+
</term>
|
24
32
|
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
</
|
31
|
-
|
32
|
-
<
|
33
|
-
|
34
|
-
<
|
35
|
-
<
|
36
|
-
<
|
37
|
-
|
38
|
-
|
39
|
-
<
|
40
|
-
<
|
41
|
-
|
42
|
-
</
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
</
|
48
|
-
|
49
|
-
|
50
|
-
</termsource></term>
|
51
|
-
</terms>
|
52
|
-
</sections>
|
53
|
-
</iso-standard>
|
33
|
+
<term id="paddy">
|
34
|
+
<preferred>paddy</preferred>
|
35
|
+
<admitted>paddy rice</admitted>
|
36
|
+
<admitted>rough rice</admitted>
|
37
|
+
<deprecates>cargo rice</deprecates>
|
38
|
+
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
39
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
40
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
41
|
+
</termnote>
|
42
|
+
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
43
|
+
<ul><li>A</li></ul>
|
44
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
45
|
+
</termnote>
|
46
|
+
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
47
|
+
<ul>
|
48
|
+
<li>A</li>
|
49
|
+
</ul>
|
50
|
+
</termexample>
|
51
|
+
<termsource status="identical">
|
52
|
+
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
53
|
+
</termsource>
|
54
|
+
</term>
|
55
|
+
</terms>
|
56
|
+
</sections>
|
57
|
+
</iso-standard>
|
54
58
|
INPUT
|
55
59
|
presxml = <<~OUTPUT
|
56
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
<term id='paddy1'><name>1.1</name>
|
62
|
-
<preferred>paddy</preferred>
|
63
|
-
<domain>rice</domain>
|
64
|
-
<definition>
|
65
|
-
<p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
|
66
|
-
</definition>
|
67
|
-
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f892'>
|
68
|
-
<name>EXAMPLE 1</name>
|
69
|
-
<p id='_65c9a509-9a89-4b54-a890-274126aeb55c'>Foreign seeds, husks, bran, sand, dust.</p>
|
70
|
-
<ul>
|
71
|
-
<li>A</li>
|
72
|
-
</ul>
|
73
|
-
</termexample>
|
74
|
-
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f894'>
|
75
|
-
<name>EXAMPLE 2</name>
|
76
|
-
<ul>
|
77
|
-
<li>A</li>
|
78
|
-
</ul>
|
79
|
-
</termexample>
|
80
|
-
<termsource status='modified'>
|
81
|
-
<origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
82
|
-
<modification>
|
83
|
-
<p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
84
|
-
</modification>
|
85
|
-
</termsource>
|
86
|
-
</term>
|
87
|
-
<term id='paddy'><name>1.2</name>
|
88
|
-
<preferred>paddy</preferred>
|
89
|
-
<admitted>paddy rice</admitted>
|
90
|
-
<admitted>rough rice</admitted>
|
91
|
-
<deprecates>cargo rice</deprecates>
|
92
|
-
<definition>
|
93
|
-
<p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
|
94
|
-
</definition>
|
95
|
-
<termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e'>
|
96
|
-
<name>Note 1 to entry</name>
|
97
|
-
<p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
|
98
|
-
The starch of waxy rice consists almost entirely of amylopectin. The
|
99
|
-
kernels have a tendency to stick together after cooking.
|
100
|
-
</p>
|
101
|
-
</termnote>
|
102
|
-
<termnote id='_671a1994-4783-40d0-bc81-987d06ffb74f'>
|
103
|
-
<name>Note 2 to entry</name>
|
104
|
-
<ul>
|
105
|
-
<li>A</li>
|
106
|
-
</ul>
|
107
|
-
<p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
|
108
|
-
The starch of waxy rice consists almost entirely of amylopectin. The
|
109
|
-
kernels have a tendency to stick together after cooking.
|
110
|
-
</p>
|
111
|
-
</termnote>
|
112
|
-
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f893'>
|
113
|
-
<name>EXAMPLE</name>
|
114
|
-
<ul>
|
115
|
-
<li>A</li>
|
116
|
-
</ul>
|
117
|
-
</termexample>
|
118
|
-
<termsource status='identical'>
|
119
|
-
<origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
120
|
-
</termsource>
|
121
|
-
</term>
|
122
|
-
</terms>
|
123
|
-
</sections>
|
124
|
-
</iso-standard>
|
125
|
-
OUTPUT
|
60
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
61
|
+
<sections>
|
62
|
+
<terms id='_terms_and_definitions' obligation='normative'>
|
63
|
+
<title depth='1'>1<tab/>Terms and Definitions</title>
|
126
64
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
65
|
+
<term id='paddy1'><name>1.1</name>
|
66
|
+
<preferred>paddy</preferred>
|
67
|
+
<domain>rice</domain>
|
68
|
+
<definition>
|
69
|
+
<p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
|
70
|
+
</definition>
|
71
|
+
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f892'>
|
72
|
+
<name>EXAMPLE 1</name>
|
73
|
+
<p id='_65c9a509-9a89-4b54-a890-274126aeb55c'>Foreign seeds, husks, bran, sand, dust.</p>
|
74
|
+
<ul>
|
75
|
+
<li>A</li>
|
76
|
+
</ul>
|
77
|
+
</termexample>
|
78
|
+
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f894'>
|
79
|
+
<name>EXAMPLE 2</name>
|
80
|
+
<ul>
|
81
|
+
<li>A</li>
|
82
|
+
</ul>
|
83
|
+
</termexample>
|
84
|
+
<termsource status='modified'>
|
85
|
+
<origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
86
|
+
<modification>
|
87
|
+
<p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
|
88
|
+
</modification>
|
89
|
+
</termsource>
|
90
|
+
</term>
|
91
|
+
<term id='paddy'><name>1.2</name>
|
92
|
+
<preferred>paddy</preferred>
|
93
|
+
<admitted>paddy rice</admitted>
|
94
|
+
<admitted>rough rice</admitted>
|
95
|
+
<deprecates>cargo rice</deprecates>
|
96
|
+
<definition>
|
97
|
+
<p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
|
98
|
+
</definition>
|
99
|
+
<termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e'>
|
100
|
+
<name>Note 1 to entry</name>
|
101
|
+
<p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>The starch of waxy rice consists almost entirely of amylopectin. The
|
102
|
+
kernels have a tendency to stick together after cooking.</p>
|
103
|
+
</termnote>
|
104
|
+
<termnote id='_671a1994-4783-40d0-bc81-987d06ffb74f'>
|
105
|
+
<name>Note 2 to entry</name>
|
106
|
+
<ul>
|
107
|
+
<li>A</li>
|
108
|
+
</ul>
|
109
|
+
<p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>The starch of waxy rice consists almost entirely of amylopectin. The
|
110
|
+
kernels have a tendency to stick together after cooking.</p>
|
111
|
+
</termnote>
|
112
|
+
<termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f893'>
|
113
|
+
<name>EXAMPLE</name>
|
114
|
+
<ul>
|
115
|
+
<li>A</li>
|
116
|
+
</ul>
|
117
|
+
</termexample>
|
118
|
+
<termsource status='identical'>
|
119
|
+
<origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
|
120
|
+
</termsource>
|
121
|
+
</term>
|
122
|
+
</terms>
|
123
|
+
</sections>
|
124
|
+
</iso-standard>
|
125
|
+
OUTPUT
|
132
126
|
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
<li>A</li>
|
140
|
-
</ul>
|
141
|
-
</div>
|
127
|
+
html = <<~OUTPUT
|
128
|
+
#{HTML_HDR}
|
129
|
+
<p class="zzSTDTitle1"/>
|
130
|
+
<div id="_terms_and_definitions">
|
131
|
+
<h1>1  Terms and Definitions</h1>
|
132
|
+
<p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
|
142
133
|
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
134
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"><rice> rice retaining its husk after threshing</p>
|
135
|
+
<div class="example" id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
136
|
+
<p>
|
137
|
+
<span class="example_label">EXAMPLE 1</span>  Foreign seeds, husks, bran, sand, dust.</p>
|
138
|
+
<ul>
|
139
|
+
<li>A</li>
|
140
|
+
</ul>
|
141
|
+
</div>
|
142
|
+
<div class="example" id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
143
|
+
<p><span class="example_label">EXAMPLE 2</span> </p>
|
144
|
+
<ul>
|
145
|
+
<li>A</li>
|
146
|
+
</ul>
|
147
|
+
</div>
|
148
|
+
<p>[TERMREF]
|
149
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
150
|
+
[MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
|
151
|
+
[/TERMREF]</p>
|
152
|
+
<p class="TermNum" id="paddy">1.2</p>
|
153
|
+
<p class="Terms" style="text-align:left;">paddy</p>
|
154
|
+
<p class="AltTerms" style="text-align:left;">paddy rice</p>
|
155
|
+
<p class="AltTerms" style="text-align:left;">rough rice</p>
|
156
|
+
<p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
|
157
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
158
|
+
<div class="example" id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
159
|
+
<p>
|
160
|
+
<span class="example_label">EXAMPLE</span> 
|
161
|
+
</p>
|
162
|
+
<ul>
|
163
|
+
<li>A</li>
|
164
|
+
</ul>
|
165
|
+
</div>
|
166
|
+
<div class="Note" id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
167
|
+
<p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
168
|
+
</div>
|
169
|
+
<div class="Note" id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
170
|
+
<p>Note 2 to entry:
|
171
|
+
<ul>
|
172
|
+
<li>A</li></ul>
|
173
|
+
<p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
|
174
|
+
</p>
|
175
|
+
</div>
|
176
|
+
<p>[TERMREF]<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
177
|
+
[/TERMREF]</p>
|
178
|
+
</div>
|
179
|
+
</div>
|
180
|
+
</body>
|
181
|
+
</html>
|
182
|
+
OUTPUT
|
168
183
|
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
</ul></div>
|
173
|
-
<div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span><span style="mso-tab-count:1">  </span></p>
|
174
|
-
<ul>
|
175
|
-
<li>A</li>
|
176
|
-
</ul>
|
177
|
-
</div>
|
184
|
+
word = <<~OUTPUT
|
185
|
+
<div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">  </span>Terms and Definitions</h1>
|
186
|
+
<p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
|
178
187
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
<div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span><span style="mso-tab-count:1">  </span></p>
|
187
|
-
<ul>
|
188
|
-
<li>A</li>
|
189
|
-
</ul>
|
190
|
-
</div>
|
191
|
-
<div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
192
|
-
<div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
|
193
|
-
<p>[TERMREF]
|
194
|
-
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
195
|
-
[/TERMREF]</p></div>
|
188
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f"><rice> rice retaining its husk after threshing</p>
|
189
|
+
<div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">  </span>Foreign seeds, husks, bran, sand, dust.</p><ul>
|
190
|
+
<li>A</li>
|
191
|
+
</ul></div>
|
192
|
+
<div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span><span style="mso-tab-count:1">  </span></p><ul>
|
193
|
+
<li>A</li>
|
194
|
+
</ul></div>
|
196
195
|
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
196
|
+
<p>[TERMREF]
|
197
|
+
<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
198
|
+
[MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
|
199
|
+
[/TERMREF]</p>
|
200
|
+
<p class="TermNum" id="paddy">1.2</p>
|
201
|
+
<p class="Terms" style="text-align:left;">paddy</p>
|
202
|
+
<p class="AltTerms" style="text-align:left;">paddy rice</p>
|
203
|
+
<p class="AltTerms" style="text-align:left;">rough rice</p>
|
204
|
+
<p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
|
205
|
+
<p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
|
206
|
+
<div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span><span style="mso-tab-count:1">  </span></p>
|
207
|
+
<ul>
|
208
|
+
<li>A</li>
|
209
|
+
</ul>
|
210
|
+
</div>
|
211
|
+
<div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
|
212
|
+
<div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
|
213
|
+
<p>[TERMREF]<a href="#ISO7301">ISO 7301:2011, 3.1</a>
|
214
|
+
[/TERMREF]</p>
|
215
|
+
</div>
|
216
|
+
OUTPUT
|
217
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true)))
|
218
|
+
.to be_equivalent_to xmlpp(presxml)
|
219
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true)))
|
220
|
+
.to be_equivalent_to xmlpp(html)
|
221
|
+
expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
|
222
|
+
.sub(%r{^.*<p class="zzSTDTitle1"/>}m, "")
|
223
|
+
.sub(%r{</div>\s*<br.*$}m, "")))
|
224
|
+
.to be_equivalent_to xmlpp(word)
|
201
225
|
end
|
202
226
|
end
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -2,826 +2,927 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "cross-references notes" do
|
5
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
6
|
-
|
7
|
-
|
8
|
-
<foreword>
|
9
|
-
<p>
|
10
|
-
<xref target="N"/>
|
11
|
-
<xref target="note1"/>
|
12
|
-
<xref target="note2"/>
|
13
|
-
<xref target="AN"/>
|
14
|
-
<xref target="Anote1"/>
|
15
|
-
<xref target="Anote2"/>
|
16
|
-
</p>
|
17
|
-
</foreword>
|
18
|
-
</preface>
|
19
|
-
<sections>
|
20
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
21
|
-
<note id="N">
|
22
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
23
|
-
</note>
|
24
|
-
<p><xref target="N"/></p>
|
25
|
-
|
26
|
-
</clause>
|
27
|
-
<terms id="terms"/>
|
28
|
-
<clause id="widgets"><title>Widgets</title>
|
29
|
-
<clause id="widgets1">
|
30
|
-
<note id="note1">
|
31
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
32
|
-
</note>
|
33
|
-
<note id="note2">
|
34
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
35
|
-
</note>
|
36
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
37
|
-
|
38
|
-
</clause>
|
39
|
-
</clause>
|
40
|
-
</sections>
|
41
|
-
<annex id="annex1">
|
42
|
-
<clause id="annex1a">
|
43
|
-
<note id="AN">
|
44
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
45
|
-
</note>
|
46
|
-
</clause>
|
47
|
-
<clause id="annex1b">
|
48
|
-
<note id="Anote1">
|
49
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
50
|
-
</note>
|
51
|
-
<note id="Anote2">
|
52
|
-
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
53
|
-
</note>
|
54
|
-
</clause>
|
55
|
-
</annex>
|
56
|
-
</iso-standard>
|
57
|
-
INPUT
|
58
|
-
<?xml version='1.0'?>
|
59
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
5
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
6
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
60
8
|
<preface>
|
61
9
|
<foreword>
|
62
10
|
<p>
|
63
|
-
|
64
|
-
<xref target=
|
65
|
-
<xref target=
|
66
|
-
<xref target=
|
67
|
-
<xref target=
|
68
|
-
<xref target=
|
11
|
+
<xref target="N"/>
|
12
|
+
<xref target="note1"/>
|
13
|
+
<xref target="note2"/>
|
14
|
+
<xref target="AN"/>
|
15
|
+
<xref target="Anote1"/>
|
16
|
+
<xref target="Anote2"/>
|
69
17
|
</p>
|
70
18
|
</foreword>
|
71
19
|
</preface>
|
72
20
|
<sections>
|
73
|
-
<clause id=
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
21
|
+
<clause id="scope" type="scope">
|
22
|
+
<title>Scope</title>
|
23
|
+
<note id="N">
|
24
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
25
|
+
</note>
|
26
|
+
<p>
|
27
|
+
<xref target="N"/>
|
28
|
+
</p>
|
29
|
+
</clause>
|
30
|
+
<terms id="terms"/>
|
31
|
+
<clause id="widgets">
|
32
|
+
<title>Widgets</title>
|
33
|
+
<clause id="widgets1">
|
34
|
+
<note id="note1">
|
35
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
36
|
+
</note>
|
37
|
+
<note id="note2">
|
38
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
39
|
+
</note>
|
40
|
+
<p>
|
41
|
+
<xref target="note1"/>
|
42
|
+
<xref target="note2"/>
|
81
43
|
</p>
|
44
|
+
</clause>
|
45
|
+
</clause>
|
46
|
+
</sections>
|
47
|
+
<annex id="annex1">
|
48
|
+
<clause id="annex1a">
|
49
|
+
<note id="AN">
|
50
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
82
51
|
</note>
|
52
|
+
</clause>
|
53
|
+
<clause id="annex1b">
|
54
|
+
<note id="Anote1">
|
55
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
56
|
+
</note>
|
57
|
+
<note id="Anote2">
|
58
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
59
|
+
</note>
|
60
|
+
</clause>
|
61
|
+
</annex>
|
62
|
+
</iso-standard>
|
63
|
+
INPUT
|
64
|
+
<?xml version='1.0'?>
|
65
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
66
|
+
<preface>
|
67
|
+
<foreword>
|
83
68
|
<p>
|
84
|
-
|
69
|
+
<xref target="N">Clause 1, Note</xref>
|
70
|
+
<xref target="note1">3.1, Note 1</xref>
|
71
|
+
<xref target="note2">3.1, Note 2</xref>
|
72
|
+
<xref target="AN">A.1, Note</xref>
|
73
|
+
<xref target="Anote1">A.2, Note 1</xref>
|
74
|
+
<xref target="Anote2">A.2, Note 2</xref>
|
75
|
+
</p>
|
76
|
+
</foreword>
|
77
|
+
</preface>
|
78
|
+
<sections>
|
79
|
+
<clause id="scope" type="scope">
|
80
|
+
<title depth="1">1
|
81
|
+
<tab/>
|
82
|
+
Scope</title>
|
83
|
+
<note id="N">
|
84
|
+
<name>NOTE</name>
|
85
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
86
|
+
types of kernel.
|
87
|
+
</p>
|
88
|
+
</note>
|
89
|
+
<p>
|
90
|
+
<xref target="N">Note</xref>
|
85
91
|
</p>
|
86
92
|
</clause>
|
87
|
-
<terms id=
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
<
|
92
|
-
<
|
93
|
+
<terms id="terms">
|
94
|
+
<title>2</title>
|
95
|
+
</terms>
|
96
|
+
<clause id="widgets">
|
97
|
+
<title depth="1">3
|
98
|
+
<tab/>
|
99
|
+
Widgets</title>
|
100
|
+
<clause id="widgets1" inline-header="true">
|
101
|
+
<title>3.1</title>
|
102
|
+
<note id="note1">
|
93
103
|
<name>NOTE 1</name>
|
94
|
-
<p id=
|
95
|
-
|
96
|
-
|
97
|
-
</p>
|
104
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
105
|
+
types of kernel.
|
106
|
+
</p>
|
98
107
|
</note>
|
99
|
-
<note id=
|
108
|
+
<note id="note2">
|
100
109
|
<name>NOTE 2</name>
|
101
|
-
<p id=
|
102
|
-
|
103
|
-
|
104
|
-
</p>
|
110
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
111
|
+
types of kernel.
|
112
|
+
</p>
|
105
113
|
</note>
|
106
114
|
<p>
|
107
|
-
<xref target=
|
108
|
-
<xref target=
|
115
|
+
<xref target="note1">Note 1</xref>
|
116
|
+
<xref target="note2">Note 2</xref>
|
109
117
|
</p>
|
110
118
|
</clause>
|
111
119
|
</clause>
|
112
120
|
</sections>
|
113
|
-
<annex id=
|
114
|
-
|
115
|
-
|
116
|
-
<
|
121
|
+
<annex id="annex1">
|
122
|
+
<title>
|
123
|
+
<strong>Annex A</strong>
|
124
|
+
<br/>(informative)</title>
|
125
|
+
<clause id="annex1a" inline-header="true">
|
126
|
+
<title>A.1</title>
|
127
|
+
<note id="AN">
|
117
128
|
<name>NOTE</name>
|
118
|
-
<p id=
|
119
|
-
|
120
|
-
|
121
|
-
</p>
|
129
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
130
|
+
types of kernel.
|
131
|
+
</p>
|
122
132
|
</note>
|
123
133
|
</clause>
|
124
|
-
<clause id=
|
125
|
-
|
126
|
-
<note id=
|
134
|
+
<clause id="annex1b" inline-header="true">
|
135
|
+
<title>A.2</title>
|
136
|
+
<note id="Anote1">
|
127
137
|
<name>NOTE 1</name>
|
128
|
-
<p id=
|
129
|
-
|
130
|
-
|
131
|
-
</p>
|
138
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
139
|
+
types of kernel.
|
140
|
+
</p>
|
132
141
|
</note>
|
133
|
-
<note id=
|
142
|
+
<note id="Anote2">
|
134
143
|
<name>NOTE 2</name>
|
135
|
-
<p id=
|
136
|
-
|
137
|
-
|
138
|
-
</p>
|
144
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
145
|
+
types of kernel.
|
146
|
+
</p>
|
139
147
|
</note>
|
140
148
|
</clause>
|
141
149
|
</annex>
|
142
150
|
</iso-standard>
|
143
|
-
|
151
|
+
OUTPUT
|
144
152
|
end
|
145
153
|
|
146
|
-
|
147
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
154
|
+
it "cross-references figures (Presentation XML)" do
|
155
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
156
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
148
157
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
<
|
213
|
-
<
|
214
|
-
<
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
<
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
158
|
+
<preface>
|
159
|
+
<foreword id="fwd">
|
160
|
+
<p>
|
161
|
+
<xref target="N"/>
|
162
|
+
<xref target="note1"/>
|
163
|
+
<xref target="note2"/>
|
164
|
+
<xref target="AN"/>
|
165
|
+
<xref target="Anote1"/>
|
166
|
+
<xref target="Anote2"/>
|
167
|
+
</p>
|
168
|
+
</foreword>
|
169
|
+
</preface>
|
170
|
+
<sections>
|
171
|
+
<clause id="scope" type="scope">
|
172
|
+
<title>Scope</title>
|
173
|
+
<figure id="N">
|
174
|
+
<name>Split-it-right sample divider</name>
|
175
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
176
|
+
</figure>
|
177
|
+
<p>
|
178
|
+
<xref target="N"/>
|
179
|
+
</p>
|
180
|
+
</clause>
|
181
|
+
<terms id="terms"/>
|
182
|
+
<clause id="widgets">
|
183
|
+
<title>Widgets</title>
|
184
|
+
<clause id="widgets1">
|
185
|
+
<figure id="note1">
|
186
|
+
<name>Split-it-right sample divider</name>
|
187
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
188
|
+
</figure>
|
189
|
+
<figure id="note2">
|
190
|
+
<name>Split-it-right sample divider</name>
|
191
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
192
|
+
</figure>
|
193
|
+
<p>
|
194
|
+
<xref target="note1"/>
|
195
|
+
<xref target="note2"/>
|
196
|
+
</p>
|
197
|
+
</clause>
|
198
|
+
</clause>
|
199
|
+
</sections>
|
200
|
+
<annex id="annex1">
|
201
|
+
<clause id="annex1a">
|
202
|
+
<figure id="AN">
|
203
|
+
<name>Split-it-right sample divider</name>
|
204
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
205
|
+
</figure>
|
206
|
+
</clause>
|
207
|
+
<clause id="annex1b">
|
208
|
+
<figure id="Anote1">
|
209
|
+
<name>Split-it-right sample divider</name>
|
210
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
211
|
+
</figure>
|
212
|
+
<figure id="Anote2">
|
213
|
+
<name>Split-it-right sample divider</name>
|
214
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
215
|
+
</figure>
|
216
|
+
</clause>
|
217
|
+
</annex>
|
218
|
+
</iso-standard>
|
219
|
+
INPUT
|
220
|
+
<?xml version='1.0'?>
|
221
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
222
|
+
<preface>
|
223
|
+
<foreword id="fwd">
|
224
|
+
<p>
|
225
|
+
<xref target="N">Figure 1</xref>
|
226
|
+
<xref target="note1">Figure 2</xref>
|
227
|
+
<xref target="note2">Figure 3</xref>
|
228
|
+
<xref target="AN">Figure A.1</xref>
|
229
|
+
<xref target="Anote1">Figure A.2</xref>
|
230
|
+
<xref target="Anote2">Figure A.3</xref>
|
231
|
+
</p>
|
232
|
+
</foreword>
|
233
|
+
</preface>
|
234
|
+
<sections>
|
235
|
+
<clause id="scope" type="scope">
|
236
|
+
<title depth="1">1
|
237
|
+
<tab/>
|
238
|
+
Scope</title>
|
239
|
+
<figure id="N">
|
240
|
+
<name>Figure 1 — Split-it-right sample divider</name>
|
241
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
242
|
+
</figure>
|
243
|
+
<p>
|
244
|
+
<xref target="N">Figure 1</xref>
|
245
|
+
</p>
|
246
|
+
</clause>
|
247
|
+
<terms id="terms">
|
248
|
+
<title>2</title>
|
249
|
+
</terms>
|
250
|
+
<clause id="widgets">
|
251
|
+
<title depth="1">3
|
252
|
+
<tab/>
|
253
|
+
Widgets</title>
|
254
|
+
<clause id="widgets1" inline-header="true">
|
255
|
+
<title>3.1</title>
|
256
|
+
<figure id="note1">
|
257
|
+
<name>Figure 2 — Split-it-right sample divider</name>
|
258
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
259
|
+
</figure>
|
260
|
+
<figure id="note2">
|
261
|
+
<name>Figure 3 — Split-it-right sample divider</name>
|
262
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
263
|
+
</figure>
|
264
|
+
<p>
|
265
|
+
<xref target="note1">Figure 2</xref>
|
266
|
+
<xref target="note2">Figure 3</xref>
|
267
|
+
</p>
|
268
|
+
</clause>
|
269
|
+
</clause>
|
270
|
+
</sections>
|
271
|
+
<annex id="annex1">
|
272
|
+
<title>
|
273
|
+
<strong>Annex A</strong>
|
274
|
+
<br/>(informative)</title>
|
275
|
+
<clause id="annex1a" inline-header="true">
|
276
|
+
<title>A.1</title>
|
277
|
+
<figure id="AN">
|
278
|
+
<name>Figure A.1 — Split-it-right sample divider</name>
|
279
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
280
|
+
</figure>
|
281
|
+
</clause>
|
282
|
+
<clause id="annex1b" inline-header="true">
|
283
|
+
<title>A.2</title>
|
284
|
+
<figure id="Anote1">
|
285
|
+
<name>Figure A.2 — Split-it-right sample divider</name>
|
286
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
287
|
+
</figure>
|
288
|
+
<figure id="Anote2">
|
289
|
+
<name>Figure A.3 — Split-it-right sample divider</name>
|
290
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
291
|
+
</figure>
|
292
|
+
</clause>
|
293
|
+
</annex>
|
294
|
+
</iso-standard>
|
295
|
+
OUTPUT
|
296
|
+
end
|
270
297
|
|
271
298
|
it "cross-references subfigures (Presentation XML)" do
|
272
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
299
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
300
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
273
301
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
<
|
330
|
-
<
|
331
|
-
<
|
332
|
-
<
|
333
|
-
<xref target=
|
334
|
-
<xref target=
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
<
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
<
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
<
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
<
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
302
|
+
<preface>
|
303
|
+
<foreword id="fwd">
|
304
|
+
<p>
|
305
|
+
<xref target="N"/>
|
306
|
+
<xref target="note1"/>
|
307
|
+
<xref target="note2"/>
|
308
|
+
<xref target="AN"/>
|
309
|
+
<xref target="Anote1"/>
|
310
|
+
<xref target="Anote2"/>
|
311
|
+
</p>
|
312
|
+
</foreword>
|
313
|
+
</preface>
|
314
|
+
<sections>
|
315
|
+
<clause id="scope" type="scope">
|
316
|
+
<title>Scope</title>
|
317
|
+
</clause>
|
318
|
+
<terms id="terms"/>
|
319
|
+
<clause id="widgets">
|
320
|
+
<title>Widgets</title>
|
321
|
+
<clause id="widgets1">
|
322
|
+
<figure id="N">
|
323
|
+
<figure id="note1">
|
324
|
+
<name>Split-it-right sample divider</name>
|
325
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
326
|
+
</figure>
|
327
|
+
<figure id="note2">
|
328
|
+
<name>Split-it-right sample divider</name>
|
329
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
330
|
+
</figure>
|
331
|
+
</figure>
|
332
|
+
<p>
|
333
|
+
<xref target="note1"/>
|
334
|
+
<xref target="note2"/>
|
335
|
+
</p>
|
336
|
+
</clause>
|
337
|
+
</clause>
|
338
|
+
</sections>
|
339
|
+
<annex id="annex1">
|
340
|
+
<clause id="annex1a"/>
|
341
|
+
<clause id="annex1b">
|
342
|
+
<figure id="AN">
|
343
|
+
<figure id="Anote1">
|
344
|
+
<name>Split-it-right sample divider</name>
|
345
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
346
|
+
</figure>
|
347
|
+
<figure id="Anote2">
|
348
|
+
<name>Split-it-right sample divider</name>
|
349
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
350
|
+
</figure>
|
351
|
+
</figure>
|
352
|
+
</clause>
|
353
|
+
</annex>
|
354
|
+
</iso-standard>
|
355
|
+
INPUT
|
356
|
+
<?xml version='1.0'?>
|
357
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
358
|
+
<preface>
|
359
|
+
<foreword id="fwd">
|
360
|
+
<p>
|
361
|
+
<xref target="N">Figure 1</xref>
|
362
|
+
<xref target="note1">Figure 1 a)</xref>
|
363
|
+
<xref target="note2">Figure 1 b)</xref>
|
364
|
+
<xref target="AN">Figure A.1</xref>
|
365
|
+
<xref target="Anote1">Figure A.1 a)</xref>
|
366
|
+
<xref target="Anote2">Figure A.1 b)</xref>
|
367
|
+
</p>
|
368
|
+
</foreword>
|
369
|
+
</preface>
|
370
|
+
<sections>
|
371
|
+
<clause id="scope" type="scope">
|
372
|
+
<title depth="1">1
|
373
|
+
<tab/>
|
374
|
+
Scope</title>
|
375
|
+
</clause>
|
376
|
+
<terms id="terms">
|
377
|
+
<title>2</title>
|
378
|
+
</terms>
|
379
|
+
<clause id="widgets">
|
380
|
+
<title depth="1">3
|
381
|
+
<tab/>
|
382
|
+
Widgets</title>
|
383
|
+
<clause id="widgets1" inline-header="true">
|
384
|
+
<title>3.1</title>
|
385
|
+
<figure id="N">
|
386
|
+
<name>Figure 1</name>
|
387
|
+
<figure id="note1">
|
388
|
+
<name>a) Split-it-right sample divider</name>
|
389
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
390
|
+
</figure>
|
391
|
+
<figure id="note2">
|
392
|
+
<name>b) Split-it-right sample divider</name>
|
393
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
394
|
+
</figure>
|
395
|
+
</figure>
|
396
|
+
<p>
|
397
|
+
<xref target="note1">Figure 1 a)</xref>
|
398
|
+
<xref target="note2">Figure 1 b)</xref>
|
399
|
+
</p>
|
400
|
+
</clause>
|
401
|
+
</clause>
|
402
|
+
</sections>
|
403
|
+
<annex id="annex1">
|
404
|
+
<title>
|
405
|
+
<strong>Annex A</strong>
|
406
|
+
<br/>(informative)</title>
|
407
|
+
<clause id="annex1a" inline-header="true">
|
408
|
+
<title>A.1</title>
|
409
|
+
</clause>
|
410
|
+
<clause id="annex1b" inline-header="true">
|
411
|
+
<title>A.2</title>
|
412
|
+
<figure id="AN">
|
413
|
+
<name>Figure A.1</name>
|
414
|
+
<figure id="Anote1">
|
415
|
+
<name>a) Split-it-right sample divider</name>
|
416
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
417
|
+
</figure>
|
418
|
+
<figure id="Anote2">
|
419
|
+
<name>b) Split-it-right sample divider</name>
|
420
|
+
<image id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png" src="rice_images/rice_image1.png"/>
|
421
|
+
</figure>
|
422
|
+
</figure>
|
423
|
+
</clause>
|
424
|
+
</annex>
|
425
|
+
</iso-standard>
|
426
|
+
OUTPUT
|
383
427
|
end
|
384
428
|
|
385
429
|
it "cross-references examples" do
|
386
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
430
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
431
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
387
432
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
</
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
</
|
413
|
-
|
414
|
-
|
415
|
-
</
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
</
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
</
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
<
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
<
|
446
|
-
<
|
447
|
-
<
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
</
|
501
|
-
|
433
|
+
<preface>
|
434
|
+
<foreword>
|
435
|
+
<p>
|
436
|
+
<xref target="N"/>
|
437
|
+
<xref target="note1"/>
|
438
|
+
<xref target="note2"/>
|
439
|
+
<xref target="AN"/>
|
440
|
+
<xref target="Anote1"/>
|
441
|
+
<xref target="Anote2"/>
|
442
|
+
</p>
|
443
|
+
</foreword>
|
444
|
+
</preface>
|
445
|
+
<sections>
|
446
|
+
<clause id="scope" type="scope">
|
447
|
+
<title>Scope</title>
|
448
|
+
<example id="N">
|
449
|
+
<p>Hello</p>
|
450
|
+
</example>
|
451
|
+
<p>
|
452
|
+
<xref target="N"/>
|
453
|
+
</p>
|
454
|
+
</clause>
|
455
|
+
<terms id="terms"/>
|
456
|
+
<clause id="widgets">
|
457
|
+
<title>Widgets</title>
|
458
|
+
<clause id="widgets1">
|
459
|
+
<example id="note1">
|
460
|
+
<p>Hello</p>
|
461
|
+
</example>
|
462
|
+
<example id="note2">
|
463
|
+
<p>Hello</p>
|
464
|
+
</example>
|
465
|
+
<p>
|
466
|
+
<xref target="note1"/>
|
467
|
+
<xref target="note2"/>
|
468
|
+
</p>
|
469
|
+
</clause>
|
470
|
+
</clause>
|
471
|
+
</sections>
|
472
|
+
<annex id="annex1">
|
473
|
+
<clause id="annex1a">
|
474
|
+
<example id="AN">
|
475
|
+
<p>Hello</p>
|
476
|
+
</example>
|
477
|
+
</clause>
|
478
|
+
<clause id="annex1b">
|
479
|
+
<example id="Anote1">
|
480
|
+
<p>Hello</p>
|
481
|
+
</example>
|
482
|
+
<example id="Anote2">
|
483
|
+
<p>Hello</p>
|
484
|
+
</example>
|
485
|
+
</clause>
|
486
|
+
</annex>
|
487
|
+
</iso-standard>
|
488
|
+
INPUT
|
489
|
+
<?xml version='1.0'?>
|
490
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
491
|
+
<preface>
|
492
|
+
<foreword>
|
493
|
+
<p>
|
494
|
+
<xref target="N">Clause 1, Example</xref>
|
495
|
+
<xref target="note1">3.1, Example 1</xref>
|
496
|
+
<xref target="note2">3.1, Example 2</xref>
|
497
|
+
<xref target="AN">A.1, Example</xref>
|
498
|
+
<xref target="Anote1">A.2, Example 1</xref>
|
499
|
+
<xref target="Anote2">A.2, Example 2</xref>
|
500
|
+
</p>
|
501
|
+
</foreword>
|
502
|
+
</preface>
|
503
|
+
<sections>
|
504
|
+
<clause id="scope" type="scope">
|
505
|
+
<title depth="1">1
|
506
|
+
<tab/>
|
507
|
+
Scope</title>
|
508
|
+
<example id="N">
|
509
|
+
<name>EXAMPLE</name>
|
510
|
+
<p>Hello</p>
|
511
|
+
</example>
|
512
|
+
<p>
|
513
|
+
<xref target="N">Example</xref>
|
514
|
+
</p>
|
515
|
+
</clause>
|
516
|
+
<terms id="terms">
|
517
|
+
<title>2</title>
|
518
|
+
</terms>
|
519
|
+
<clause id="widgets">
|
520
|
+
<title depth="1">3
|
521
|
+
<tab/>
|
522
|
+
Widgets</title>
|
523
|
+
<clause id="widgets1" inline-header="true">
|
524
|
+
<title>3.1</title>
|
525
|
+
<example id="note1">
|
526
|
+
<name>EXAMPLE 1</name>
|
527
|
+
<p>Hello</p>
|
528
|
+
</example>
|
529
|
+
<example id="note2">
|
530
|
+
<name>EXAMPLE 2</name>
|
531
|
+
<p>Hello</p>
|
532
|
+
</example>
|
533
|
+
<p>
|
534
|
+
<xref target="note1">Example 1</xref>
|
535
|
+
<xref target="note2">Example 2</xref>
|
536
|
+
</p>
|
537
|
+
</clause>
|
538
|
+
</clause>
|
539
|
+
</sections>
|
540
|
+
<annex id="annex1">
|
541
|
+
<title>
|
542
|
+
<strong>Annex A</strong>
|
543
|
+
<br/>(informative)</title>
|
544
|
+
<clause id="annex1a" inline-header="true">
|
545
|
+
<title>A.1</title>
|
546
|
+
<example id="AN">
|
547
|
+
<name>EXAMPLE</name>
|
548
|
+
<p>Hello</p>
|
549
|
+
</example>
|
550
|
+
</clause>
|
551
|
+
<clause id="annex1b" inline-header="true">
|
552
|
+
<title>A.2</title>
|
553
|
+
<example id="Anote1">
|
554
|
+
<name>EXAMPLE 1</name>
|
555
|
+
<p>Hello</p>
|
556
|
+
</example>
|
557
|
+
<example id="Anote2">
|
558
|
+
<name>EXAMPLE 2</name>
|
559
|
+
<p>Hello</p>
|
560
|
+
</example>
|
561
|
+
</clause>
|
562
|
+
</annex>
|
563
|
+
</iso-standard>
|
564
|
+
OUTPUT
|
502
565
|
end
|
503
566
|
|
504
567
|
it "cross-references formulae" do
|
505
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
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
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
<
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
<foreword>
|
574
|
-
<p>
|
575
|
-
<xref target='N'>Clause 1, Formula (1)</xref>
|
576
|
-
<xref target='note1'>3.1, Formula (2)</xref>
|
577
|
-
<xref target='note2'>3.1, Formula (3)</xref>
|
578
|
-
<xref target='AN'>A.1, Formula (A.1)</xref>
|
579
|
-
<xref target='Anote1'>A.2, Formula (A.2)</xref>
|
580
|
-
<xref target='Anote2'>A.2, Formula (A.3)</xref>
|
581
|
-
</p>
|
582
|
-
</foreword>
|
583
|
-
</preface>
|
584
|
-
<sections>
|
585
|
-
<clause id='scope' type='scope'>
|
586
|
-
<title depth='1'>1<tab/>Scope</title>
|
587
|
-
<formula id='N'>
|
588
|
-
<name>1</name>
|
589
|
-
<stem type='AsciiMath'>r = 1 %</stem>
|
590
|
-
</formula>
|
591
|
-
<p>
|
592
|
-
<xref target='N'>Formula (1)</xref>
|
593
|
-
</p>
|
594
|
-
</clause>
|
595
|
-
<terms id='terms'><title>2</title></terms>
|
596
|
-
|
597
|
-
<clause id='widgets'>
|
598
|
-
<title depth='1'>3<tab/>Widgets</title>
|
599
|
-
<clause id='widgets1' inline-header='true'><title>3.1</title>
|
600
|
-
<formula id='note1'>
|
601
|
-
<name>2</name>
|
602
|
-
<stem type='AsciiMath'>r = 1 %</stem>
|
603
|
-
</formula>
|
604
|
-
<formula id='note2'>
|
605
|
-
<name>3</name>
|
606
|
-
<stem type='AsciiMath'>r = 1 %</stem>
|
568
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
569
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
570
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
571
|
+
<preface>
|
572
|
+
<foreword>
|
573
|
+
<p>
|
574
|
+
<xref target="N"/>
|
575
|
+
<xref target="note1"/>
|
576
|
+
<xref target="note2"/>
|
577
|
+
<xref target="AN"/>
|
578
|
+
<xref target="Anote1"/>
|
579
|
+
<xref target="Anote2"/>
|
580
|
+
</p>
|
581
|
+
</foreword>
|
582
|
+
</preface>
|
583
|
+
<sections>
|
584
|
+
<clause id="scope" type="scope">
|
585
|
+
<title>Scope</title>
|
586
|
+
<formula id="N">
|
587
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
588
|
+
</formula>
|
589
|
+
<p>
|
590
|
+
<xref target="N"/>
|
591
|
+
</p>
|
592
|
+
</clause>
|
593
|
+
<terms id="terms"/>
|
594
|
+
<clause id="widgets">
|
595
|
+
<title>Widgets</title>
|
596
|
+
<clause id="widgets1">
|
597
|
+
<formula id="note1">
|
598
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
599
|
+
</formula>
|
600
|
+
<formula id="note2">
|
601
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
602
|
+
</formula>
|
603
|
+
<p>
|
604
|
+
<xref target="note1"/>
|
605
|
+
<xref target="note2"/>
|
606
|
+
</p>
|
607
|
+
</clause>
|
608
|
+
</clause>
|
609
|
+
</sections>
|
610
|
+
<annex id="annex1">
|
611
|
+
<clause id="annex1a">
|
612
|
+
<formula id="AN">
|
613
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
614
|
+
</formula>
|
615
|
+
</clause>
|
616
|
+
<clause id="annex1b">
|
617
|
+
<formula id="Anote1">
|
618
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
619
|
+
</formula>
|
620
|
+
<formula id="Anote2">
|
621
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
622
|
+
</formula>
|
623
|
+
</clause>
|
624
|
+
</annex>
|
625
|
+
</iso-standard>
|
626
|
+
<formula id="_be9158af-7e93-4ee2-90c5-26d31c181934">
|
627
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
628
|
+
<dl id="_e4fe94fe-1cde-49d9-b1ad-743293b7e21d">
|
629
|
+
<dt>
|
630
|
+
<stem type="AsciiMath">r</stem>
|
631
|
+
</dt>
|
632
|
+
<dd>
|
633
|
+
<p id="_1b99995d-ff03-40f5-8f2e-ab9665a69b77">is the repeatability limit.</p>
|
634
|
+
</dd>
|
635
|
+
</dl>
|
607
636
|
</formula>
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
637
|
+
</foreword>
|
638
|
+
</preface>
|
639
|
+
</iso-standard>
|
640
|
+
INPUT
|
641
|
+
<?xml version='1.0'?>
|
642
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
643
|
+
<preface>
|
644
|
+
<foreword>
|
645
|
+
<p>
|
646
|
+
<xref target="N">Clause 1, Formula (1)</xref>
|
647
|
+
<xref target="note1">3.1, Formula (2)</xref>
|
648
|
+
<xref target="note2">3.1, Formula (3)</xref>
|
649
|
+
<xref target="AN">A.1, Formula (A.1)</xref>
|
650
|
+
<xref target="Anote1">A.2, Formula (A.2)</xref>
|
651
|
+
<xref target="Anote2">A.2, Formula (A.3)</xref>
|
652
|
+
</p>
|
653
|
+
</foreword>
|
654
|
+
</preface>
|
655
|
+
<sections>
|
656
|
+
<clause id="scope" type="scope">
|
657
|
+
<title depth="1">1
|
658
|
+
<tab/>
|
659
|
+
Scope</title>
|
660
|
+
<formula id="N">
|
661
|
+
<name>1</name>
|
662
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
663
|
+
</formula>
|
664
|
+
<p>
|
665
|
+
<xref target="N">Formula (1)</xref>
|
666
|
+
</p>
|
667
|
+
</clause>
|
668
|
+
<terms id="terms">
|
669
|
+
<title>2</title>
|
670
|
+
</terms>
|
671
|
+
<clause id="widgets">
|
672
|
+
<title depth="1">3
|
673
|
+
<tab/>
|
674
|
+
Widgets</title>
|
675
|
+
<clause id="widgets1" inline-header="true">
|
676
|
+
<title>3.1</title>
|
677
|
+
<formula id="note1">
|
678
|
+
<name>2</name>
|
679
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
680
|
+
</formula>
|
681
|
+
<formula id="note2">
|
682
|
+
<name>3</name>
|
683
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
684
|
+
</formula>
|
685
|
+
<p>
|
686
|
+
<xref target="note1">Formula (2)</xref>
|
687
|
+
<xref target="note2">Formula (3)</xref>
|
688
|
+
</p>
|
689
|
+
</clause>
|
690
|
+
</clause>
|
691
|
+
</sections>
|
692
|
+
<annex id="annex1">
|
693
|
+
<title>
|
694
|
+
<strong>Annex A</strong>
|
695
|
+
<br/>(informative)</title>
|
696
|
+
<clause id="annex1a" inline-header="true">
|
697
|
+
<title>A.1</title>
|
698
|
+
<formula id="AN">
|
699
|
+
<name>A.1</name>
|
700
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
701
|
+
</formula>
|
702
|
+
</clause>
|
703
|
+
<clause id="annex1b" inline-header="true">
|
704
|
+
<title>A.2</title>
|
705
|
+
<formula id="Anote1">
|
706
|
+
<name>A.2</name>
|
707
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
708
|
+
</formula>
|
709
|
+
<formula id="Anote2">
|
710
|
+
<name>A.3</name>
|
711
|
+
<stem type="AsciiMath">r = 1 %</stem>
|
712
|
+
</formula>
|
713
|
+
</clause>
|
714
|
+
</annex>
|
715
|
+
</iso-standard>
|
716
|
+
OUTPUT
|
635
717
|
end
|
636
718
|
|
637
719
|
it "cross-references tables" do
|
638
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
720
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
721
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
639
722
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
640
|
-
<preface>
|
641
|
-
<foreword>
|
642
|
-
<p>
|
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
|
-
</preface>
|
652
|
-
<sections>
|
653
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
654
|
-
<table id="N">
|
655
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
656
|
-
<tbody>
|
657
|
-
<tr>
|
658
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
659
|
-
<td align="center">13</td>
|
660
|
-
<td align="center">11</td>
|
661
|
-
</tr>
|
662
|
-
</tbody>
|
663
|
-
</table>
|
664
|
-
<p><xref target="N"/></p>
|
665
|
-
</clause>
|
666
|
-
<terms id="terms"/>
|
667
|
-
<clause id="widgets"><title>Widgets</title>
|
668
|
-
<clause id="widgets1">
|
669
|
-
<table id="note1">
|
670
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
671
|
-
<tbody>
|
672
|
-
<tr>
|
673
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
674
|
-
<td align="center">13</td>
|
675
|
-
<td align="center">11</td>
|
676
|
-
</tr>
|
677
|
-
</tbody>
|
678
|
-
</table>
|
679
|
-
<table id="note2">
|
680
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
681
|
-
<tbody>
|
682
|
-
<tr>
|
683
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
684
|
-
<td align="center">13</td>
|
685
|
-
<td align="center">11</td>
|
686
|
-
</tr>
|
687
|
-
</tbody>
|
688
|
-
</table>
|
689
|
-
<p> <xref target="note1"/> <xref target="note2"/> </p>
|
690
|
-
</clause>
|
691
|
-
</clause>
|
692
|
-
</sections>
|
693
|
-
<annex id="annex1">
|
694
|
-
<clause id="annex1a">
|
695
|
-
<table id="AN">
|
696
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
697
|
-
<tbody>
|
698
|
-
<tr>
|
699
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
700
|
-
<td align="center">13</td>
|
701
|
-
<td align="center">11</td>
|
702
|
-
</tr>
|
703
|
-
</tbody>
|
704
|
-
</table>
|
705
|
-
</clause>
|
706
|
-
<clause id="annex1b">
|
707
|
-
<table id="Anote1">
|
708
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
709
|
-
<tbody>
|
710
|
-
<tr>
|
711
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
712
|
-
<td align="center">13</td>
|
713
|
-
<td align="center">11</td>
|
714
|
-
</tr>
|
715
|
-
</tbody>
|
716
|
-
</table>
|
717
|
-
<table id="Anote2">
|
718
|
-
<name>Repeatability and reproducibility of husked rice yield</name>
|
719
|
-
<tbody>
|
720
|
-
<tr>
|
721
|
-
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
722
|
-
<td align="center">13</td>
|
723
|
-
<td align="center">11</td>
|
724
|
-
</tr>
|
725
|
-
</tbody>
|
726
|
-
</table>
|
727
|
-
</clause>
|
728
|
-
</annex>
|
729
|
-
</iso-standard>
|
730
|
-
INPUT
|
731
|
-
<?xml version='1.0'?>
|
732
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
733
723
|
<preface>
|
734
724
|
<foreword>
|
735
725
|
<p>
|
736
|
-
<xref target=
|
737
|
-
<xref target=
|
738
|
-
<xref target=
|
739
|
-
<xref target=
|
740
|
-
<xref target=
|
741
|
-
<xref target=
|
726
|
+
<xref target="N"/>
|
727
|
+
<xref target="note1"/>
|
728
|
+
<xref target="note2"/>
|
729
|
+
<xref target="AN"/>
|
730
|
+
<xref target="Anote1"/>
|
731
|
+
<xref target="Anote2"/>
|
742
732
|
</p>
|
743
733
|
</foreword>
|
744
734
|
</preface>
|
745
735
|
<sections>
|
746
|
-
<clause id=
|
747
|
-
<title
|
748
|
-
<table id=
|
749
|
-
<name>
|
736
|
+
<clause id="scope" type="scope">
|
737
|
+
<title>Scope</title>
|
738
|
+
<table id="N">
|
739
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
750
740
|
<tbody>
|
751
741
|
<tr>
|
752
|
-
<td align=
|
753
|
-
<td align=
|
754
|
-
<td align=
|
742
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
743
|
+
<td align="center">13</td>
|
744
|
+
<td align="center">11</td>
|
755
745
|
</tr>
|
756
746
|
</tbody>
|
757
747
|
</table>
|
758
748
|
<p>
|
759
|
-
|
749
|
+
<xref target="N"/>
|
760
750
|
</p>
|
761
751
|
</clause>
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
<name>Table 2 — Repeatability and reproducibility of husked rice yield</name>
|
752
|
+
<terms id="terms"/>
|
753
|
+
<clause id="widgets">
|
754
|
+
<title>Widgets</title>
|
755
|
+
<clause id="widgets1">
|
756
|
+
<table id="note1">
|
757
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
769
758
|
<tbody>
|
770
759
|
<tr>
|
771
|
-
<td align=
|
772
|
-
<td align=
|
773
|
-
<td align=
|
760
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
761
|
+
<td align="center">13</td>
|
762
|
+
<td align="center">11</td>
|
774
763
|
</tr>
|
775
764
|
</tbody>
|
776
765
|
</table>
|
777
|
-
<table id=
|
778
|
-
<name>
|
766
|
+
<table id="note2">
|
767
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
779
768
|
<tbody>
|
780
769
|
<tr>
|
781
|
-
<td align=
|
782
|
-
<td align=
|
783
|
-
<td align=
|
770
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
771
|
+
<td align="center">13</td>
|
772
|
+
<td align="center">11</td>
|
784
773
|
</tr>
|
785
774
|
</tbody>
|
786
775
|
</table>
|
787
776
|
<p>
|
788
|
-
<xref target=
|
789
|
-
<xref target=
|
777
|
+
<xref target="note1"/>
|
778
|
+
<xref target="note2"/>
|
790
779
|
</p>
|
791
780
|
</clause>
|
792
781
|
</clause>
|
793
782
|
</sections>
|
794
|
-
<annex id=
|
795
|
-
<clause
|
796
|
-
<table id=
|
797
|
-
<name>
|
783
|
+
<annex id="annex1">
|
784
|
+
<clause id="annex1a">
|
785
|
+
<table id="AN">
|
786
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
798
787
|
<tbody>
|
799
788
|
<tr>
|
800
|
-
<td align=
|
801
|
-
<td align=
|
802
|
-
<td align=
|
789
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
790
|
+
<td align="center">13</td>
|
791
|
+
<td align="center">11</td>
|
803
792
|
</tr>
|
804
793
|
</tbody>
|
805
794
|
</table>
|
806
795
|
</clause>
|
807
|
-
<clause
|
808
|
-
<table id=
|
809
|
-
<name>
|
796
|
+
<clause id="annex1b">
|
797
|
+
<table id="Anote1">
|
798
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
810
799
|
<tbody>
|
811
800
|
<tr>
|
812
|
-
<td align=
|
813
|
-
<td align=
|
814
|
-
<td align=
|
801
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
802
|
+
<td align="center">13</td>
|
803
|
+
<td align="center">11</td>
|
815
804
|
</tr>
|
816
805
|
</tbody>
|
817
806
|
</table>
|
818
|
-
<table id=
|
819
|
-
<name>
|
807
|
+
<table id="Anote2">
|
808
|
+
<name>Repeatability and reproducibility of husked rice yield</name>
|
820
809
|
<tbody>
|
821
810
|
<tr>
|
822
|
-
<td align=
|
823
|
-
<td align=
|
824
|
-
<td align=
|
811
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
812
|
+
<td align="center">13</td>
|
813
|
+
<td align="center">11</td>
|
814
|
+
</tr>
|
815
|
+
</tbody>
|
816
|
+
</table>
|
817
|
+
</clause>
|
818
|
+
</annex>
|
819
|
+
</iso-standard>
|
820
|
+
INPUT
|
821
|
+
<?xml version='1.0'?>
|
822
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
823
|
+
<preface>
|
824
|
+
<foreword>
|
825
|
+
<p>
|
826
|
+
<xref target="N">Table 1</xref>
|
827
|
+
<xref target="note1">Table 2</xref>
|
828
|
+
<xref target="note2">Table 3</xref>
|
829
|
+
<xref target="AN">Table A.1</xref>
|
830
|
+
<xref target="Anote1">Table A.2</xref>
|
831
|
+
<xref target="Anote2">Table A.3</xref>
|
832
|
+
</p>
|
833
|
+
</foreword>
|
834
|
+
</preface>
|
835
|
+
<sections>
|
836
|
+
<clause id="scope" type="scope">
|
837
|
+
<title depth="1">1
|
838
|
+
<tab/>
|
839
|
+
Scope</title>
|
840
|
+
<table id="N">
|
841
|
+
<name>Table 1 — Repeatability and reproducibility of husked rice yield</name>
|
842
|
+
<tbody>
|
843
|
+
<tr>
|
844
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
845
|
+
<td align="center">13</td>
|
846
|
+
<td align="center">11</td>
|
847
|
+
</tr>
|
848
|
+
</tbody>
|
849
|
+
</table>
|
850
|
+
<p>
|
851
|
+
<xref target="N">Table 1</xref>
|
852
|
+
</p>
|
853
|
+
</clause>
|
854
|
+
<terms id="terms">
|
855
|
+
<title>2</title>
|
856
|
+
</terms>
|
857
|
+
<clause id="widgets">
|
858
|
+
<title depth="1">3
|
859
|
+
<tab/>
|
860
|
+
Widgets</title>
|
861
|
+
<clause id="widgets1" inline-header="true">
|
862
|
+
<title>3.1</title>
|
863
|
+
<table id="note1">
|
864
|
+
<name>Table 2 — Repeatability and reproducibility of husked rice yield</name>
|
865
|
+
<tbody>
|
866
|
+
<tr>
|
867
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
868
|
+
<td align="center">13</td>
|
869
|
+
<td align="center">11</td>
|
870
|
+
</tr>
|
871
|
+
</tbody>
|
872
|
+
</table>
|
873
|
+
<table id="note2">
|
874
|
+
<name>Table 3 — Repeatability and reproducibility of husked rice yield</name>
|
875
|
+
<tbody>
|
876
|
+
<tr>
|
877
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
878
|
+
<td align="center">13</td>
|
879
|
+
<td align="center">11</td>
|
880
|
+
</tr>
|
881
|
+
</tbody>
|
882
|
+
</table>
|
883
|
+
<p>
|
884
|
+
<xref target="note1">Table 2</xref>
|
885
|
+
<xref target="note2">Table 3</xref>
|
886
|
+
</p>
|
887
|
+
</clause>
|
888
|
+
</clause>
|
889
|
+
</sections>
|
890
|
+
<annex id="annex1">
|
891
|
+
<title>
|
892
|
+
<strong>Annex A</strong>
|
893
|
+
<br/>(informative)</title>
|
894
|
+
<clause id="annex1a" inline-header="true">
|
895
|
+
<title>A.1</title>
|
896
|
+
<table id="AN">
|
897
|
+
<name>Table A.1 — Repeatability and reproducibility of husked rice yield</name>
|
898
|
+
<tbody>
|
899
|
+
<tr>
|
900
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
901
|
+
<td align="center">13</td>
|
902
|
+
<td align="center">11</td>
|
903
|
+
</tr>
|
904
|
+
</tbody>
|
905
|
+
</table>
|
906
|
+
</clause>
|
907
|
+
<clause id="annex1b" inline-header="true">
|
908
|
+
<title>A.2</title>
|
909
|
+
<table id="Anote1">
|
910
|
+
<name>Table A.2 — Repeatability and reproducibility of husked rice yield</name>
|
911
|
+
<tbody>
|
912
|
+
<tr>
|
913
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
914
|
+
<td align="center">13</td>
|
915
|
+
<td align="center">11</td>
|
916
|
+
</tr>
|
917
|
+
</tbody>
|
918
|
+
</table>
|
919
|
+
<table id="Anote2">
|
920
|
+
<name>Table A.3 — Repeatability and reproducibility of husked rice yield</name>
|
921
|
+
<tbody>
|
922
|
+
<tr>
|
923
|
+
<td align="left">Number of laboratories retained after eliminating outliers</td>
|
924
|
+
<td align="center">13</td>
|
925
|
+
<td align="center">11</td>
|
825
926
|
</tr>
|
826
927
|
</tbody>
|
827
928
|
</table>
|
@@ -832,504 +933,524 @@ RSpec.describe IsoDoc do
|
|
832
933
|
end
|
833
934
|
|
834
935
|
it "cross-references term notes" do
|
835
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
<
|
852
|
-
|
853
|
-
</
|
854
|
-
<
|
855
|
-
<
|
856
|
-
|
857
|
-
</
|
858
|
-
<
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
<foreword>
|
869
|
-
<p>
|
870
|
-
<xref target='note1'>2.1, Note 1</xref>
|
871
|
-
<xref target='note2'>2.2, Note 1</xref>
|
872
|
-
<xref target='note3'>2.2, Note 2</xref>
|
873
|
-
</p>
|
874
|
-
</foreword>
|
875
|
-
</preface>
|
876
|
-
<sections>
|
877
|
-
<clause id='scope' type='scope'>
|
878
|
-
<title depth='1'>1<tab/>Scope</title>
|
879
|
-
</clause>
|
880
|
-
<terms id='terms'><title>2</title>
|
881
|
-
|
882
|
-
<term id='_waxy_rice'><name>2.1</name>
|
883
|
-
|
884
|
-
<preferred>waxy rice</preferred>
|
885
|
-
<termnote id='note1'>
|
886
|
-
<name>Note 1 to entry</name>
|
887
|
-
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
888
|
-
The starch of waxy rice consists almost entirely of amylopectin. The
|
889
|
-
kernels have a tendency to stick together after cooking.
|
890
|
-
</p>
|
891
|
-
</termnote>
|
892
|
-
</term>
|
893
|
-
<term id='_nonwaxy_rice'> <name>2.2</name>
|
936
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
937
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
938
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
939
|
+
<preface>
|
940
|
+
<foreword>
|
941
|
+
<p>
|
942
|
+
<xref target="note1"/>
|
943
|
+
<xref target="note2"/>
|
944
|
+
<xref target="note3"/>
|
945
|
+
</p>
|
946
|
+
</foreword>
|
947
|
+
</preface>
|
948
|
+
<sections>
|
949
|
+
<clause id="scope" type="scope">
|
950
|
+
<title>Scope</title>
|
951
|
+
</clause>
|
952
|
+
<terms id="terms">
|
953
|
+
<term id="_waxy_rice">
|
954
|
+
<preferred>waxy rice</preferred>
|
955
|
+
<termnote id="note1">
|
956
|
+
<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>
|
957
|
+
</termnote>
|
958
|
+
</term>
|
959
|
+
<term id="_nonwaxy_rice">
|
960
|
+
<preferred>nonwaxy rice</preferred>
|
961
|
+
<termnote id="note2">
|
962
|
+
<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>
|
963
|
+
</termnote>
|
964
|
+
<termnote id="note3">
|
965
|
+
<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>
|
966
|
+
</termnote>
|
967
|
+
</term>
|
968
|
+
</terms>
|
894
969
|
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
</
|
914
|
-
|
970
|
+
</iso-standard>
|
971
|
+
INPUT
|
972
|
+
<?xml version='1.0'?>
|
973
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
974
|
+
<preface>
|
975
|
+
<foreword>
|
976
|
+
<p>
|
977
|
+
<xref target="note1">2.1, Note 1</xref>
|
978
|
+
<xref target="note2">2.2, Note 1</xref>
|
979
|
+
<xref target="note3">2.2, Note 2</xref>
|
980
|
+
</p>
|
981
|
+
</foreword>
|
982
|
+
</preface>
|
983
|
+
<sections>
|
984
|
+
<clause id="scope" type="scope">
|
985
|
+
<title depth="1">1
|
986
|
+
<tab/>
|
987
|
+
Scope</title>
|
988
|
+
</clause>
|
989
|
+
<terms id="terms">
|
990
|
+
<title>2</title>
|
991
|
+
<term id="_waxy_rice">
|
992
|
+
<name>2.1</name>
|
993
|
+
<preferred>waxy rice</preferred>
|
994
|
+
<termnote id="note1">
|
995
|
+
<name>Note 1 to entry</name>
|
996
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
997
|
+
kernels have a tendency to stick together after cooking.
|
998
|
+
</p>
|
999
|
+
</termnote>
|
1000
|
+
</term>
|
1001
|
+
<term id="_nonwaxy_rice">
|
1002
|
+
<name>2.2</name>
|
1003
|
+
<preferred>nonwaxy rice</preferred>
|
1004
|
+
<termnote id="note2">
|
1005
|
+
<name>Note 1 to entry</name>
|
1006
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
1007
|
+
kernels have a tendency to stick together after cooking.
|
1008
|
+
</p>
|
1009
|
+
</termnote>
|
1010
|
+
<termnote id="note3">
|
1011
|
+
<name>Note 2 to entry</name>
|
1012
|
+
<p id="_b0cb3dfd-78fc-47dd-a339-84070d947463">The starch of waxy rice consists almost entirely of amylopectin. The
|
1013
|
+
kernels have a tendency to stick together after cooking.
|
1014
|
+
</p>
|
1015
|
+
</termnote>
|
1016
|
+
</term>
|
1017
|
+
</terms>
|
1018
|
+
</sections>
|
1019
|
+
</iso-standard>
|
1020
|
+
OUTPUT
|
915
1021
|
end
|
916
1022
|
|
917
1023
|
it "cross-references sections" do
|
918
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
919
|
-
|
920
|
-
|
921
|
-
<foreword obligation="informative">
|
922
|
-
<title>Foreword</title>
|
923
|
-
<p id="A">This is a preamble
|
924
|
-
<xref target="C"/>
|
925
|
-
<xref target="C1"/>
|
926
|
-
<xref target="D"/>
|
927
|
-
<xref target="H"/>
|
928
|
-
<xref target="I"/>
|
929
|
-
<xref target="J"/>
|
930
|
-
<xref target="K"/>
|
931
|
-
<xref target="L"/>
|
932
|
-
<xref target="M"/>
|
933
|
-
<xref target="N"/>
|
934
|
-
<xref target="O"/>
|
935
|
-
<xref target="P"/>
|
936
|
-
<xref target="Q"/>
|
937
|
-
<xref target="Q1"/>
|
938
|
-
<xref target="Q2"/>
|
939
|
-
<xref target="Q3"/>
|
940
|
-
<xref target="R"/>
|
941
|
-
</p>
|
942
|
-
</foreword>
|
943
|
-
<introduction id="B" obligation="informative"><title>Introduction</title><clause id="C" inline-header="false" obligation="informative">
|
944
|
-
<title>Introduction Subsection</title>
|
945
|
-
</clause>
|
946
|
-
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
947
|
-
</introduction></preface><sections>
|
948
|
-
<clause id="D" obligation="normative" type="scope">
|
949
|
-
<title>Scope</title>
|
950
|
-
<p id="E">Text</p>
|
951
|
-
</clause>
|
952
|
-
|
953
|
-
<terms id="H" obligation="normative"><title>Terms, definitions, symbols and abbreviated terms</title><terms id="I" obligation="normative">
|
954
|
-
<title>Normal Terms</title>
|
955
|
-
<term id="J">
|
956
|
-
<preferred>Term2</preferred>
|
957
|
-
</term>
|
958
|
-
</terms>
|
959
|
-
<definitions id="K">
|
960
|
-
<dl>
|
961
|
-
<dt>Symbol</dt>
|
962
|
-
<dd>Definition</dd>
|
963
|
-
</dl>
|
964
|
-
</definitions>
|
965
|
-
</terms>
|
966
|
-
<definitions id="L">
|
967
|
-
<dl>
|
968
|
-
<dt>Symbol</dt>
|
969
|
-
<dd>Definition</dd>
|
970
|
-
</dl>
|
971
|
-
</definitions>
|
972
|
-
<clause id="M" inline-header="false" obligation="normative"><title>Clause 4</title><clause id="N" inline-header="false" obligation="normative">
|
973
|
-
<title>Introduction</title>
|
974
|
-
</clause>
|
975
|
-
<clause id="O" inline-header="false" obligation="normative">
|
976
|
-
<title>Clause 4.2</title>
|
977
|
-
</clause></clause>
|
978
|
-
|
979
|
-
</sections><annex id="P" inline-header="false" obligation="normative">
|
980
|
-
<title>Annex</title>
|
981
|
-
<clause id="Q" inline-header="false" obligation="normative">
|
982
|
-
<title>Annex A.1</title>
|
983
|
-
<clause id="Q1" inline-header="false" obligation="normative">
|
984
|
-
<title>Annex A.1a</title>
|
985
|
-
</clause>
|
986
|
-
</clause>
|
987
|
-
<appendix id="Q2" inline-header="false" obligation="normative">
|
988
|
-
<title>An Appendix</title>
|
989
|
-
<clause id='Q3' inline-header='false' obligation='normative'>
|
990
|
-
<title>Appendix subclause</title>
|
991
|
-
</clause>
|
992
|
-
</appendix>
|
993
|
-
</annex><bibliography><references id="R" obligation="informative" normative="true">
|
994
|
-
<title>Normative References</title>
|
995
|
-
</references><clause id="S" obligation="informative">
|
996
|
-
<title>Bibliography</title>
|
997
|
-
<references id="T" obligation="informative" normative="false">
|
998
|
-
<title>Bibliography Subsection</title>
|
999
|
-
</references>
|
1000
|
-
</clause>
|
1001
|
-
</bibliography>
|
1002
|
-
</iso-standard>
|
1003
|
-
INPUT
|
1004
|
-
<?xml version='1.0'?>
|
1005
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1024
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1025
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1026
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1006
1027
|
<preface>
|
1007
|
-
<foreword obligation=
|
1028
|
+
<foreword obligation="informative">
|
1008
1029
|
<title>Foreword</title>
|
1009
|
-
<p id=
|
1010
|
-
|
1011
|
-
<xref target=
|
1012
|
-
<xref target=
|
1013
|
-
<xref target=
|
1014
|
-
<xref target=
|
1015
|
-
<xref target=
|
1016
|
-
<xref target=
|
1017
|
-
<xref target=
|
1018
|
-
<xref target=
|
1019
|
-
<xref target=
|
1020
|
-
<xref target=
|
1021
|
-
<xref target=
|
1022
|
-
<xref target=
|
1023
|
-
<xref target=
|
1024
|
-
<xref target=
|
1025
|
-
<xref target=
|
1026
|
-
<xref target=
|
1027
|
-
<xref target='R'>Clause 2</xref>
|
1028
|
-
</p>
|
1030
|
+
<p id="A">This is a preamble
|
1031
|
+
<xref target="C"/>
|
1032
|
+
<xref target="C1"/>
|
1033
|
+
<xref target="D"/>
|
1034
|
+
<xref target="H"/>
|
1035
|
+
<xref target="I"/>
|
1036
|
+
<xref target="J"/>
|
1037
|
+
<xref target="K"/>
|
1038
|
+
<xref target="L"/>
|
1039
|
+
<xref target="M"/>
|
1040
|
+
<xref target="N"/>
|
1041
|
+
<xref target="O"/>
|
1042
|
+
<xref target="P"/>
|
1043
|
+
<xref target="Q"/>
|
1044
|
+
<xref target="Q1"/>
|
1045
|
+
<xref target="Q2"/>
|
1046
|
+
<xref target="Q3"/>
|
1047
|
+
<xref target="R"/></p>
|
1029
1048
|
</foreword>
|
1030
|
-
<introduction id=
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
Introduction
|
1035
|
-
</title>
|
1036
|
-
<clause id='C' inline-header='false' obligation='informative'>
|
1037
|
-
<title depth='2'>
|
1038
|
-
0.1
|
1039
|
-
<tab/>
|
1040
|
-
Introduction Subsection
|
1041
|
-
</title>
|
1049
|
+
<introduction id="B" obligation="informative">
|
1050
|
+
<title>Introduction</title>
|
1051
|
+
<clause id="C" inline-header="false" obligation="informative">
|
1052
|
+
<title>Introduction Subsection</title>
|
1042
1053
|
</clause>
|
1043
|
-
<clause id=
|
1054
|
+
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
1044
1055
|
</introduction>
|
1045
1056
|
</preface>
|
1046
1057
|
<sections>
|
1047
|
-
<clause id=
|
1048
|
-
<title
|
1049
|
-
<p id=
|
1050
|
-
</clause>
|
1051
|
-
<terms id=
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
</title>
|
1057
|
-
<terms id='I' obligation='normative'>
|
1058
|
-
<title depth='2'>
|
1059
|
-
3.1
|
1060
|
-
<tab/>
|
1061
|
-
Normal Terms
|
1062
|
-
</title>
|
1063
|
-
<term id='J'>
|
1064
|
-
<name>3.1.1</name>
|
1058
|
+
<clause id="D" obligation="normative" type="scope">
|
1059
|
+
<title>Scope</title>
|
1060
|
+
<p id="E">Text</p>
|
1061
|
+
</clause>
|
1062
|
+
<terms id="H" obligation="normative">
|
1063
|
+
<title>Terms, definitions, symbols and abbreviated terms</title>
|
1064
|
+
<terms id="I" obligation="normative">
|
1065
|
+
<title>Normal Terms</title>
|
1066
|
+
<term id="J">
|
1065
1067
|
<preferred>Term2</preferred>
|
1066
1068
|
</term>
|
1067
1069
|
</terms>
|
1068
|
-
<definitions id=
|
1069
|
-
<title>3.2</title>
|
1070
|
+
<definitions id="K">
|
1070
1071
|
<dl>
|
1071
1072
|
<dt>Symbol</dt>
|
1072
1073
|
<dd>Definition</dd>
|
1073
1074
|
</dl>
|
1074
1075
|
</definitions>
|
1075
1076
|
</terms>
|
1076
|
-
<definitions id=
|
1077
|
-
<title>4</title>
|
1077
|
+
<definitions id="L">
|
1078
1078
|
<dl>
|
1079
1079
|
<dt>Symbol</dt>
|
1080
1080
|
<dd>Definition</dd>
|
1081
1081
|
</dl>
|
1082
1082
|
</definitions>
|
1083
|
-
<clause id=
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
Clause 4
|
1088
|
-
</title>
|
1089
|
-
<clause id='N' inline-header='false' obligation='normative'>
|
1090
|
-
<title depth='2'>
|
1091
|
-
5.1
|
1092
|
-
<tab/>
|
1093
|
-
Introduction
|
1094
|
-
</title>
|
1083
|
+
<clause id="M" inline-header="false" obligation="normative">
|
1084
|
+
<title>Clause 4</title>
|
1085
|
+
<clause id="N" inline-header="false" obligation="normative">
|
1086
|
+
<title>Introduction</title>
|
1095
1087
|
</clause>
|
1096
|
-
<clause id=
|
1097
|
-
|
1098
|
-
5.2
|
1099
|
-
<tab/>
|
1100
|
-
Clause 4.2
|
1101
|
-
</title>
|
1088
|
+
<clause id="O" inline-header="false" obligation="normative">
|
1089
|
+
<title>Clause 4.2</title>
|
1102
1090
|
</clause>
|
1103
1091
|
</clause>
|
1104
1092
|
</sections>
|
1105
|
-
<annex id=
|
1106
|
-
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
<br/>
|
1112
|
-
<strong>Annex</strong>
|
1113
|
-
</title>
|
1114
|
-
<clause id='Q' inline-header='false' obligation='normative'>
|
1115
|
-
<title depth='2'>
|
1116
|
-
A.1
|
1117
|
-
<tab/>
|
1118
|
-
Annex A.1
|
1119
|
-
</title>
|
1120
|
-
<clause id='Q1' inline-header='false' obligation='normative'>
|
1121
|
-
<title depth='3'>
|
1122
|
-
A.1.1
|
1123
|
-
<tab/>
|
1124
|
-
Annex A.1a
|
1125
|
-
</title>
|
1093
|
+
<annex id="P" inline-header="false" obligation="normative">
|
1094
|
+
<title>Annex</title>
|
1095
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
1096
|
+
<title>Annex A.1</title>
|
1097
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
1098
|
+
<title>Annex A.1a</title>
|
1126
1099
|
</clause>
|
1127
1100
|
</clause>
|
1128
|
-
<appendix id=
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
</title>
|
1134
|
-
<clause id='Q3' inline-header='false' obligation='normative'>
|
1135
|
-
<title depth='3'>
|
1136
|
-
Appendix 1.1
|
1137
|
-
<tab/>
|
1138
|
-
Appendix subclause
|
1139
|
-
</title>
|
1140
|
-
</clause>
|
1101
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
1102
|
+
<title>An Appendix</title>
|
1103
|
+
<clause id="Q3" inline-header="false" obligation="normative">
|
1104
|
+
<title>Appendix subclause</title>
|
1105
|
+
</clause>
|
1141
1106
|
</appendix>
|
1142
1107
|
</annex>
|
1143
1108
|
<bibliography>
|
1144
|
-
<references id=
|
1145
|
-
|
1146
|
-
2
|
1147
|
-
<tab/>
|
1148
|
-
Normative References
|
1149
|
-
</title>
|
1109
|
+
<references id="R" normative="true" obligation="informative">
|
1110
|
+
<title>Normative References</title>
|
1150
1111
|
</references>
|
1151
|
-
<clause id=
|
1152
|
-
|
1153
|
-
<references id=
|
1154
|
-
|
1112
|
+
<clause id="S" obligation="informative">
|
1113
|
+
<title>Bibliography</title>
|
1114
|
+
<references id="T" normative="false" obligation="informative">
|
1115
|
+
<title>Bibliography Subsection</title>
|
1155
1116
|
</references>
|
1156
1117
|
</clause>
|
1157
1118
|
</bibliography>
|
1158
1119
|
</iso-standard>
|
1159
|
-
|
1120
|
+
INPUT
|
1121
|
+
<?xml version='1.0'?>
|
1122
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
1123
|
+
<preface>
|
1124
|
+
<foreword obligation="informative">
|
1125
|
+
<title>Foreword</title>
|
1126
|
+
<p id="A">This is a preamble
|
1127
|
+
<xref target="C">0.1</xref>
|
1128
|
+
<xref target="C1">0.2</xref>
|
1129
|
+
<xref target="D">Clause 1</xref>
|
1130
|
+
<xref target="H">Clause 3</xref>
|
1131
|
+
<xref target="I">3.1</xref>
|
1132
|
+
<xref target="J">3.1.1</xref>
|
1133
|
+
<xref target="K">3.2</xref>
|
1134
|
+
<xref target="L">Clause 4</xref>
|
1135
|
+
<xref target="M">Clause 5</xref>
|
1136
|
+
<xref target="N">5.1</xref>
|
1137
|
+
<xref target="O">5.2</xref>
|
1138
|
+
<xref target="P">Annex A</xref>
|
1139
|
+
<xref target="Q">A.1</xref>
|
1140
|
+
<xref target="Q1">A.1.1</xref>
|
1141
|
+
<xref target="Q2">Annex A, Appendix 1</xref>
|
1142
|
+
<xref target="Q3">Annex A, Appendix 1.1</xref>
|
1143
|
+
<xref target="R">Clause 2</xref></p>
|
1144
|
+
</foreword>
|
1145
|
+
<introduction id="B" obligation="informative">
|
1146
|
+
<title depth="1">
|
1147
|
+
0
|
1148
|
+
<tab/>
|
1149
|
+
Introduction</title>
|
1150
|
+
<clause id="C" inline-header="false" obligation="informative">
|
1151
|
+
<title depth="2">
|
1152
|
+
0.1
|
1153
|
+
<tab/>
|
1154
|
+
Introduction Subsection</title>
|
1155
|
+
</clause>
|
1156
|
+
<clause id="C1" inline-header="true" obligation="informative">
|
1157
|
+
<title>0.2</title>Text</clause>
|
1158
|
+
</introduction>
|
1159
|
+
</preface>
|
1160
|
+
<sections>
|
1161
|
+
<clause id="D" obligation="normative" type="scope">
|
1162
|
+
<title depth="1">1
|
1163
|
+
<tab/>
|
1164
|
+
Scope</title>
|
1165
|
+
<p id="E">Text</p>
|
1166
|
+
</clause>
|
1167
|
+
<terms id="H" obligation="normative">
|
1168
|
+
<title depth="1">3
|
1169
|
+
<tab/>
|
1170
|
+
Terms, definitions, symbols and abbreviated terms</title>
|
1171
|
+
<terms id="I" obligation="normative">
|
1172
|
+
<title depth="2">3.1
|
1173
|
+
<tab/>
|
1174
|
+
Normal Terms</title>
|
1175
|
+
<term id="J">
|
1176
|
+
<name>3.1.1</name>
|
1177
|
+
<preferred>Term2</preferred>
|
1178
|
+
</term>
|
1179
|
+
</terms>
|
1180
|
+
<definitions id="K" inline-header="true">
|
1181
|
+
<title>3.2</title>
|
1182
|
+
<dl>
|
1183
|
+
<dt>Symbol</dt>
|
1184
|
+
<dd>Definition</dd>
|
1185
|
+
</dl>
|
1186
|
+
</definitions>
|
1187
|
+
</terms>
|
1188
|
+
<definitions id="L">
|
1189
|
+
<title>4</title>
|
1190
|
+
<dl>
|
1191
|
+
<dt>Symbol</dt>
|
1192
|
+
<dd>Definition</dd>
|
1193
|
+
</dl>
|
1194
|
+
</definitions>
|
1195
|
+
<clause id="M" inline-header="false" obligation="normative">
|
1196
|
+
<title depth="1">5
|
1197
|
+
<tab/>
|
1198
|
+
Clause 4</title>
|
1199
|
+
<clause id="N" inline-header="false" obligation="normative">
|
1200
|
+
<title depth="2">5.1
|
1201
|
+
<tab/>
|
1202
|
+
Introduction</title>
|
1203
|
+
</clause>
|
1204
|
+
<clause id="O" inline-header="false" obligation="normative">
|
1205
|
+
<title depth="2">5.2
|
1206
|
+
<tab/>
|
1207
|
+
Clause 4.2</title>
|
1208
|
+
</clause>
|
1209
|
+
</clause>
|
1210
|
+
</sections>
|
1211
|
+
<annex id="P" inline-header="false" obligation="normative">
|
1212
|
+
<title>
|
1213
|
+
<strong>Annex A</strong>
|
1214
|
+
<br/>(normative)
|
1215
|
+
<br/>
|
1216
|
+
<br/>
|
1217
|
+
<strong>Annex</strong></title>
|
1218
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
1219
|
+
<title depth="2">A.1
|
1220
|
+
<tab/>
|
1221
|
+
Annex A.1</title>
|
1222
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
1223
|
+
<title depth="3">A.1.1
|
1224
|
+
<tab/>
|
1225
|
+
Annex A.1a</title>
|
1226
|
+
</clause>
|
1227
|
+
</clause>
|
1228
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
1229
|
+
<title depth="2">Appendix 1
|
1230
|
+
<tab/>
|
1231
|
+
An Appendix</title>
|
1232
|
+
<clause id="Q3" inline-header="false" obligation="normative">
|
1233
|
+
<title depth="3">Appendix 1.1
|
1234
|
+
<tab/>
|
1235
|
+
Appendix subclause</title>
|
1236
|
+
</clause>
|
1237
|
+
</appendix>
|
1238
|
+
</annex>
|
1239
|
+
<bibliography>
|
1240
|
+
<references id="R" normative="true" obligation="informative">
|
1241
|
+
<title depth="1">2
|
1242
|
+
<tab/>
|
1243
|
+
Normative References</title>
|
1244
|
+
</references>
|
1245
|
+
<clause id="S" obligation="informative">
|
1246
|
+
<title depth="1">Bibliography</title>
|
1247
|
+
<references id="T" normative="false" obligation="informative">
|
1248
|
+
<title depth="2">Bibliography Subsection</title>
|
1249
|
+
</references>
|
1250
|
+
</clause>
|
1251
|
+
</bibliography>
|
1252
|
+
</iso-standard>
|
1253
|
+
OUTPUT
|
1160
1254
|
end
|
1161
1255
|
|
1162
1256
|
it "cross-references lists" do
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
</
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
</
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1257
|
+
output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)
|
1258
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1259
|
+
<preface>
|
1260
|
+
<foreword>
|
1261
|
+
<p>
|
1262
|
+
<xref target="N"/>
|
1263
|
+
<xref target="note1"/>
|
1264
|
+
<xref target="note2"/>
|
1265
|
+
<xref target="AN"/>
|
1266
|
+
<xref target="Anote1"/>
|
1267
|
+
<xref target="Anote2"/>
|
1268
|
+
</p>
|
1269
|
+
</foreword>
|
1270
|
+
</preface>
|
1271
|
+
<sections>
|
1272
|
+
<clause id="scope" type="scope">
|
1273
|
+
<title>Scope</title>
|
1274
|
+
<ol id="N">
|
1275
|
+
<li>
|
1276
|
+
<p>A</p>
|
1277
|
+
</li>
|
1278
|
+
</ol>
|
1279
|
+
</clause>
|
1280
|
+
<terms id="terms"/>
|
1281
|
+
<clause id="widgets">
|
1282
|
+
<title>Widgets</title>
|
1283
|
+
<clause id="widgets1">
|
1284
|
+
<ol id="note1">
|
1285
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1286
|
+
</ol>
|
1287
|
+
<ol id="note2">
|
1288
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1289
|
+
</ol>
|
1290
|
+
</clause>
|
1291
|
+
</clause>
|
1292
|
+
</sections>
|
1293
|
+
<annex id="annex1">
|
1294
|
+
<clause id="annex1a">
|
1295
|
+
<ol id="AN">
|
1296
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1297
|
+
</ol>
|
1298
|
+
</clause>
|
1299
|
+
<clause id="annex1b">
|
1300
|
+
<ol id="Anote1">
|
1301
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
|
1302
|
+
</ol>
|
1303
|
+
<ol id="Anote2">
|
1304
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
|
1305
|
+
</ol>
|
1306
|
+
</clause>
|
1307
|
+
</annex>
|
1308
|
+
</iso-standard>
|
1211
1309
|
INPUT
|
1212
|
-
|
1213
|
-
|
1310
|
+
expect(xmlpp(output)).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1311
|
+
<?xml version='1.0'?>
|
1312
|
+
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
1313
|
+
<preface>
|
1314
|
+
<foreword>
|
1315
|
+
<p>
|
1316
|
+
<xref target="N">Clause 1, List</xref>
|
1317
|
+
<xref target="note1">3.1, List 1</xref>
|
1318
|
+
<xref target="note2">3.1, List 2</xref>
|
1319
|
+
<xref target="AN">A.1, List</xref>
|
1320
|
+
<xref target="Anote1">A.2, List 1</xref>
|
1321
|
+
<xref target="Anote2">A.2, List 2</xref>
|
1322
|
+
</p>
|
1323
|
+
</foreword>
|
1324
|
+
</preface>
|
1325
|
+
<sections>
|
1326
|
+
<clause id="scope" type="scope">
|
1327
|
+
<title depth="1">1
|
1328
|
+
<tab/>
|
1329
|
+
Scope</title>
|
1330
|
+
<ol id="N">
|
1331
|
+
<li>
|
1332
|
+
<p>A</p>
|
1333
|
+
</li>
|
1334
|
+
</ol>
|
1335
|
+
</clause>
|
1336
|
+
<terms id="terms">
|
1337
|
+
<title>2</title>
|
1338
|
+
</terms>
|
1339
|
+
<clause id="widgets">
|
1340
|
+
<title depth="1">3
|
1341
|
+
<tab/>
|
1342
|
+
Widgets</title>
|
1343
|
+
<clause id="widgets1" inline-header="true">
|
1344
|
+
<title>3.1</title>
|
1345
|
+
<ol id="note1">
|
1346
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
1347
|
+
types of kernel.
|
1348
|
+
</p>
|
1349
|
+
</ol>
|
1350
|
+
<ol id="note2">
|
1351
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
1352
|
+
types of kernel.
|
1353
|
+
</p>
|
1354
|
+
</ol>
|
1355
|
+
</clause>
|
1356
|
+
</clause>
|
1357
|
+
</sections>
|
1358
|
+
<annex id="annex1">
|
1359
|
+
<title>
|
1360
|
+
<strong>Annex A</strong>
|
1361
|
+
<br/>(informative)</title>
|
1362
|
+
<clause id="annex1a" inline-header="true">
|
1363
|
+
<title>A.1</title>
|
1364
|
+
<ol id="AN">
|
1365
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
1366
|
+
types of kernel.
|
1367
|
+
</p>
|
1368
|
+
</ol>
|
1369
|
+
</clause>
|
1370
|
+
<clause id="annex1b" inline-header="true">
|
1371
|
+
<title>A.2</title>
|
1372
|
+
<ol id="Anote1">
|
1373
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different
|
1374
|
+
types of kernel.
|
1375
|
+
</p>
|
1376
|
+
</ol>
|
1377
|
+
<ol id="Anote2">
|
1378
|
+
<p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different
|
1379
|
+
types of kernel.
|
1380
|
+
</p>
|
1381
|
+
</ol>
|
1382
|
+
</clause>
|
1383
|
+
</annex>
|
1384
|
+
</iso-standard>
|
1385
|
+
OUTPUT
|
1386
|
+
end
|
1387
|
+
|
1388
|
+
it "cross-references list items" do
|
1389
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1390
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1391
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1214
1392
|
<preface>
|
1215
1393
|
<foreword>
|
1216
1394
|
<p>
|
1217
|
-
<xref target=
|
1218
|
-
<xref target=
|
1219
|
-
<xref target=
|
1220
|
-
<xref target=
|
1221
|
-
<xref target=
|
1222
|
-
<xref target=
|
1395
|
+
<xref target="N"/>
|
1396
|
+
<xref target="note1"/>
|
1397
|
+
<xref target="note2"/>
|
1398
|
+
<xref target="AN"/>
|
1399
|
+
<xref target="Anote1"/>
|
1400
|
+
<xref target="Anote2"/>
|
1223
1401
|
</p>
|
1224
1402
|
</foreword>
|
1225
1403
|
</preface>
|
1226
1404
|
<sections>
|
1227
|
-
<clause id=
|
1228
|
-
<title
|
1229
|
-
<ol id=
|
1230
|
-
<li>
|
1405
|
+
<clause id="scope" type="scope">
|
1406
|
+
<title>Scope</title>
|
1407
|
+
<ol id="N1">
|
1408
|
+
<li id="N">
|
1231
1409
|
<p>A</p>
|
1232
1410
|
</li>
|
1233
1411
|
</ol>
|
1234
1412
|
</clause>
|
1235
|
-
|
1236
|
-
<clause id=
|
1237
|
-
|
1238
|
-
<clause id=
|
1239
|
-
<ol id=
|
1240
|
-
<
|
1241
|
-
|
1242
|
-
|
1243
|
-
</p>
|
1413
|
+
<terms id="terms"/>
|
1414
|
+
<clause id="widgets">
|
1415
|
+
<title>Widgets</title>
|
1416
|
+
<clause id="widgets1">
|
1417
|
+
<ol id="note1l">
|
1418
|
+
<li id="note1">
|
1419
|
+
<p>A</p>
|
1420
|
+
</li>
|
1244
1421
|
</ol>
|
1245
|
-
<ol id=
|
1246
|
-
<
|
1247
|
-
|
1248
|
-
|
1249
|
-
</p>
|
1422
|
+
<ol id="note2l">
|
1423
|
+
<li id="note2">
|
1424
|
+
<p>A</p>
|
1425
|
+
</li>
|
1250
1426
|
</ol>
|
1251
1427
|
</clause>
|
1252
1428
|
</clause>
|
1253
1429
|
</sections>
|
1254
|
-
<annex id=
|
1255
|
-
<clause
|
1256
|
-
<ol id=
|
1257
|
-
<
|
1258
|
-
|
1259
|
-
|
1260
|
-
</p>
|
1430
|
+
<annex id="annex1">
|
1431
|
+
<clause id="annex1a">
|
1432
|
+
<ol id="ANl">
|
1433
|
+
<li id="AN">
|
1434
|
+
<p>A</p>
|
1435
|
+
</li>
|
1261
1436
|
</ol>
|
1262
1437
|
</clause>
|
1263
|
-
<clause
|
1264
|
-
<ol id=
|
1265
|
-
<
|
1266
|
-
|
1267
|
-
|
1268
|
-
</p>
|
1438
|
+
<clause id="annex1b">
|
1439
|
+
<ol id="Anote1l">
|
1440
|
+
<li id="Anote1">
|
1441
|
+
<p>A</p>
|
1442
|
+
</li>
|
1269
1443
|
</ol>
|
1270
|
-
<ol id=
|
1271
|
-
<
|
1272
|
-
|
1273
|
-
|
1274
|
-
</p>
|
1444
|
+
<ol id="Anote2l">
|
1445
|
+
<li id="Anote2">
|
1446
|
+
<p>A</p>
|
1447
|
+
</li>
|
1275
1448
|
</ol>
|
1276
1449
|
</clause>
|
1277
1450
|
</annex>
|
1278
1451
|
</iso-standard>
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
it "cross-references list items" do
|
1283
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1284
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1285
|
-
<preface>
|
1286
|
-
<foreword>
|
1287
|
-
<p>
|
1288
|
-
<xref target="N"/>
|
1289
|
-
<xref target="note1"/>
|
1290
|
-
<xref target="note2"/>
|
1291
|
-
<xref target="AN"/>
|
1292
|
-
<xref target="Anote1"/>
|
1293
|
-
<xref target="Anote2"/>
|
1294
|
-
</p>
|
1295
|
-
</foreword>
|
1296
|
-
</preface>
|
1297
|
-
<sections>
|
1298
|
-
<clause id="scope" type="scope"><title>Scope</title>
|
1299
|
-
<ol id="N1">
|
1300
|
-
<li id="N"><p>A</p></li>
|
1301
|
-
</ol>
|
1302
|
-
</clause>
|
1303
|
-
<terms id="terms"/>
|
1304
|
-
<clause id="widgets"><title>Widgets</title>
|
1305
|
-
<clause id="widgets1">
|
1306
|
-
<ol id="note1l">
|
1307
|
-
<li id="note1"><p>A</p></li>
|
1308
|
-
</ol>
|
1309
|
-
<ol id="note2l">
|
1310
|
-
<li id="note2"><p>A</p></li>
|
1311
|
-
</ol>
|
1312
|
-
</clause>
|
1313
|
-
</clause>
|
1314
|
-
</sections>
|
1315
|
-
<annex id="annex1">
|
1316
|
-
<clause id="annex1a">
|
1317
|
-
<ol id="ANl">
|
1318
|
-
<li id="AN"><p>A</p></li>
|
1319
|
-
</ol>
|
1320
|
-
</clause>
|
1321
|
-
<clause id="annex1b">
|
1322
|
-
<ol id="Anote1l">
|
1323
|
-
<li id="Anote1"><p>A</p></li>
|
1324
|
-
</ol>
|
1325
|
-
<ol id="Anote2l">
|
1326
|
-
<li id="Anote2"><p>A</p></li>
|
1327
|
-
</ol>
|
1328
|
-
</clause>
|
1329
|
-
</annex>
|
1330
|
-
</iso-standard>
|
1331
|
-
INPUT
|
1332
|
-
<?xml version='1.0'?>
|
1452
|
+
INPUT
|
1453
|
+
<?xml version='1.0'?>
|
1333
1454
|
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1334
1455
|
<preface>
|
1335
1456
|
<foreword>
|
@@ -1352,7 +1473,7 @@ RSpec.describe IsoDoc do
|
|
1352
1473
|
</li>
|
1353
1474
|
</ol>
|
1354
1475
|
</clause>
|
1355
|
-
|
1476
|
+
<terms id='terms'><title>2</title></terms>
|
1356
1477
|
<clause id='widgets'>
|
1357
1478
|
<title depth='1'>3<tab/>Widgets</title>
|
1358
1479
|
<clause inline-header="true" id='widgets1'><title>3.1</title>
|
@@ -1391,83 +1512,101 @@ RSpec.describe IsoDoc do
|
|
1391
1512
|
</clause>
|
1392
1513
|
</annex>
|
1393
1514
|
</iso-standard>
|
1394
|
-
|
1515
|
+
OUTPUT
|
1395
1516
|
end
|
1396
1517
|
|
1397
1518
|
it "cross-references nested list items" do
|
1398
|
-
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1519
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
|
1520
|
+
.convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1521
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1522
|
+
<preface>
|
1523
|
+
<foreword>
|
1524
|
+
<p>
|
1525
|
+
<xref target="N"/>
|
1526
|
+
<xref target="note1"/>
|
1527
|
+
<xref target="note2"/>
|
1528
|
+
<xref target="AN"/>
|
1529
|
+
<xref target="Anote1"/>
|
1530
|
+
<xref target="Anote2"/>
|
1531
|
+
</p>
|
1532
|
+
</foreword>
|
1533
|
+
</preface>
|
1534
|
+
<sections>
|
1535
|
+
<clause id="scope" type="scope">
|
1536
|
+
<title>Scope</title>
|
1537
|
+
<ol id="N1">
|
1538
|
+
<li id="N">
|
1539
|
+
<p>A</p>
|
1540
|
+
<ol>
|
1541
|
+
<li id="note1">
|
1542
|
+
<p>A</p>
|
1543
|
+
<ol>
|
1544
|
+
<li id="note2">
|
1545
|
+
<p>A</p>
|
1546
|
+
<ol>
|
1547
|
+
<li id="AN">
|
1548
|
+
<p>A</p>
|
1549
|
+
<ol>
|
1550
|
+
<li id="Anote1">
|
1551
|
+
<p>A</p>
|
1552
|
+
<ol>
|
1553
|
+
<li id="Anote2">
|
1554
|
+
<p>A</p>
|
1555
|
+
</li>
|
1556
|
+
</ol>
|
1557
|
+
</li>
|
1558
|
+
</ol>
|
1559
|
+
</li>
|
1560
|
+
</ol>
|
1561
|
+
</li>
|
1562
|
+
</ol>
|
1563
|
+
</li>
|
1564
|
+
</ol>
|
1565
|
+
</li>
|
1566
|
+
</ol>
|
1567
|
+
</clause>
|
1568
|
+
</sections>
|
1569
|
+
</iso-standard>
|
1570
|
+
INPUT
|
1436
1571
|
<?xml version='1.0'?>
|
1437
|
-
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
<p>A</p>
|
1456
|
-
<ol>
|
1457
|
-
<li id='note1'>
|
1458
|
-
<p>A</p>
|
1459
|
-
<ol>
|
1460
|
-
<li id='note2'>
|
1572
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
|
1573
|
+
<preface>
|
1574
|
+
<foreword>
|
1575
|
+
<p>
|
1576
|
+
<xref target='N'>Clause 1 a)</xref>
|
1577
|
+
<xref target='note1'>Clause 1 a.1)</xref>
|
1578
|
+
<xref target='note2'>Clause 1 a.1.i)</xref>
|
1579
|
+
<xref target='AN'>Clause 1 a.1.i.A)</xref>
|
1580
|
+
<xref target='Anote1'>Clause 1 a.1.i.A.I)</xref>
|
1581
|
+
<xref target='Anote2'>Clause 1 a.1.i.A.I.a)</xref>
|
1582
|
+
</p>
|
1583
|
+
</foreword>
|
1584
|
+
</preface>
|
1585
|
+
<sections>
|
1586
|
+
<clause id='scope' type='scope'>
|
1587
|
+
<title depth='1'>1<tab/>Scope</title>
|
1588
|
+
<ol id='N1'>
|
1589
|
+
<li id='N'>
|
1461
1590
|
<p>A</p>
|
1462
1591
|
<ol>
|
1463
|
-
<li id='
|
1592
|
+
<li id='note1'>
|
1464
1593
|
<p>A</p>
|
1465
1594
|
<ol>
|
1466
|
-
<li id='
|
1595
|
+
<li id='note2'>
|
1467
1596
|
<p>A</p>
|
1468
1597
|
<ol>
|
1469
|
-
<li id='
|
1598
|
+
<li id='AN'>
|
1470
1599
|
<p>A</p>
|
1600
|
+
<ol>
|
1601
|
+
<li id='Anote1'>
|
1602
|
+
<p>A</p>
|
1603
|
+
<ol>
|
1604
|
+
<li id='Anote2'>
|
1605
|
+
<p>A</p>
|
1606
|
+
</li>
|
1607
|
+
</ol>
|
1608
|
+
</li>
|
1609
|
+
</ol>
|
1471
1610
|
</li>
|
1472
1611
|
</ol>
|
1473
1612
|
</li>
|
@@ -1476,14 +1615,9 @@ RSpec.describe IsoDoc do
|
|
1476
1615
|
</ol>
|
1477
1616
|
</li>
|
1478
1617
|
</ol>
|
1479
|
-
</
|
1480
|
-
</
|
1481
|
-
</
|
1482
|
-
|
1483
|
-
</clause>
|
1484
|
-
</sections>
|
1485
|
-
</iso-standard>
|
1486
|
-
OUTPUT
|
1618
|
+
</clause>
|
1619
|
+
</sections>
|
1620
|
+
</iso-standard>
|
1621
|
+
OUTPUT
|
1487
1622
|
end
|
1488
|
-
|
1489
1623
|
end
|