metanorma-iso 1.4.1 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Rakefile +2 -0
- data/lib/asciidoctor/iso/base.rb +8 -19
- data/lib/asciidoctor/iso/cleanup.rb +2 -3
- data/lib/asciidoctor/iso/front.rb +0 -1
- data/lib/asciidoctor/iso/front_id.rb +1 -1
- data/lib/asciidoctor/iso/isodoc.rng +12 -6
- data/lib/asciidoctor/iso/section.rb +5 -11
- data/lib/asciidoctor/iso/term_lookup_cleanup.rb +0 -1
- data/lib/asciidoctor/iso/validate_section.rb +30 -44
- data/lib/isodoc/iso/base_convert.rb +3 -64
- data/lib/isodoc/iso/html/htmlstyle.css +47 -0
- data/lib/isodoc/iso/html/htmlstyle.scss +0 -1
- data/lib/isodoc/iso/html/isodoc.css +862 -0
- data/lib/isodoc/iso/html/isodoc.scss +0 -1
- data/lib/isodoc/iso/html/style-human.css +968 -0
- data/lib/isodoc/iso/html/style-iso.css +996 -0
- data/lib/isodoc/iso/html/wordstyle.css +1515 -0
- data/lib/isodoc/iso/html/wordstyle.scss +0 -1
- data/lib/isodoc/iso/html_convert.rb +2 -1
- data/lib/{asciidoctor → isodoc}/iso/i18n-en.yaml +0 -0
- data/lib/{asciidoctor → isodoc}/iso/i18n-fr.yaml +0 -0
- data/lib/{asciidoctor → isodoc}/iso/i18n-zh-Hans.yaml +0 -0
- data/lib/isodoc/iso/i18n.rb +19 -0
- data/lib/isodoc/iso/init.rb +33 -0
- data/lib/isodoc/iso/iso.amendment.xsl +1261 -1705
- data/lib/isodoc/iso/iso.international-standard.xsl +1261 -1705
- data/lib/isodoc/iso/metadata.rb +1 -1
- data/lib/isodoc/iso/presentation_xml_convert.rb +99 -1
- data/lib/isodoc/iso/sections.rb +3 -8
- data/lib/isodoc/iso/word_convert.rb +2 -1
- data/lib/isodoc/iso/xref.rb +2 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +4 -3
- data/spec/asciidoctor-iso/cleanup_spec.rb +4 -4
- data/spec/asciidoctor-iso/inline_spec.rb +1 -1
- data/spec/asciidoctor-iso/refs_spec.rb +3 -3
- data/spec/asciidoctor-iso/section_spec.rb +9 -6
- data/spec/asciidoctor-iso/validate_spec.rb +13 -21
- data/spec/isodoc/amd_spec.rb +309 -153
- data/spec/isodoc/blocks_spec.rb +362 -28
- data/spec/isodoc/i18n_spec.rb +468 -108
- data/spec/isodoc/inline_spec.rb +99 -31
- data/spec/isodoc/iso_spec.rb +95 -29
- data/spec/isodoc/postproc_spec.rb +114 -149
- data/spec/isodoc/ref_spec.rb +175 -3
- data/spec/isodoc/section_spec.rb +148 -82
- data/spec/isodoc/table_spec.rb +142 -5
- data/spec/isodoc/terms_spec.rb +78 -53
- data/spec/isodoc/xref_spec.rb +831 -658
- data/spec/metanorma/processor_spec.rb +2 -1
- metadata +34 -13
data/spec/isodoc/table_spec.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
|
-
it "processes IsoXML tables" do
|
5
|
-
|
6
|
-
IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", false)
|
4
|
+
it "processes IsoXML tables (Presentation XML)" do
|
5
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
7
6
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
8
7
|
<preface>
|
9
8
|
<foreword>
|
@@ -57,6 +56,144 @@ RSpec.describe IsoDoc do
|
|
57
56
|
<note><p>This is a table about rice</p></note>
|
58
57
|
</table>
|
59
58
|
|
59
|
+
</foreword>
|
60
|
+
</preface>
|
61
|
+
</iso-standard>
|
62
|
+
INPUT
|
63
|
+
<?xml version='1.0'?>
|
64
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
65
|
+
<preface>
|
66
|
+
<foreword>
|
67
|
+
<table id='tableD-1' alt='tool tip' summary='long desc'>
|
68
|
+
<name>
|
69
|
+
Table 1 — Repeatability and reproducibility of
|
70
|
+
<em>husked</em>
|
71
|
+
rice yield
|
72
|
+
</name>
|
73
|
+
<thead>
|
74
|
+
<tr>
|
75
|
+
<td rowspan='2' align='left'>Description</td>
|
76
|
+
<td colspan='4' align='center'>Rice sample</td>
|
77
|
+
</tr>
|
78
|
+
<tr>
|
79
|
+
<td align='left'>Arborio</td>
|
80
|
+
<td align='center'>
|
81
|
+
Drago
|
82
|
+
<fn reference='a'>
|
83
|
+
<p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
|
84
|
+
</fn>
|
85
|
+
</td>
|
86
|
+
<td align='center'>
|
87
|
+
Balilla
|
88
|
+
<fn reference='a'>
|
89
|
+
<p id='_0fe65e9a-5531-408e-8295-eeff35f41a55'>Parboiled rice.</p>
|
90
|
+
</fn>
|
91
|
+
</td>
|
92
|
+
<td align='center'>Thaibonnet</td>
|
93
|
+
</tr>
|
94
|
+
</thead>
|
95
|
+
<tbody>
|
96
|
+
<tr>
|
97
|
+
<th align='left'>Number of laboratories retained after eliminating outliers</th>
|
98
|
+
<td align='center'>13</td>
|
99
|
+
<td align='center'>11</td>
|
100
|
+
<td align='center'>13</td>
|
101
|
+
<td align='center'>13</td>
|
102
|
+
</tr>
|
103
|
+
<tr>
|
104
|
+
<td align='left'>Mean value, g/100 g</td>
|
105
|
+
<td align='center'>81,2</td>
|
106
|
+
<td align='center'>82,0</td>
|
107
|
+
<td align='center'>81,8</td>
|
108
|
+
<td align='center'>77,7</td>
|
109
|
+
</tr>
|
110
|
+
</tbody>
|
111
|
+
<tfoot>
|
112
|
+
<tr>
|
113
|
+
<td align='left'>
|
114
|
+
Reproducibility limit,
|
115
|
+
<stem type='AsciiMath'>R</stem>
|
116
|
+
(= 2,83
|
117
|
+
<stem type='AsciiMath'>s_R</stem>
|
118
|
+
)
|
119
|
+
</td>
|
120
|
+
<td align='center'>2,89</td>
|
121
|
+
<td align='center'>0,57</td>
|
122
|
+
<td align='center'>2,26</td>
|
123
|
+
<td align='center'>6,06</td>
|
124
|
+
</tr>
|
125
|
+
</tfoot>
|
126
|
+
<dl>
|
127
|
+
<dt>Drago</dt>
|
128
|
+
<dd>A type of rice</dd>
|
129
|
+
</dl>
|
130
|
+
<note>
|
131
|
+
<name>NOTE</name>
|
132
|
+
<p>This is a table about rice</p>
|
133
|
+
</note>
|
134
|
+
</table>
|
135
|
+
</foreword>
|
136
|
+
</preface>
|
137
|
+
</iso-standard>
|
138
|
+
OUTPUT
|
139
|
+
end
|
140
|
+
|
141
|
+
it "processes IsoXML tables (HTML)" do
|
142
|
+
FileUtils.rm_f("test.html")
|
143
|
+
IsoDoc::Iso::HtmlConvert.new({}).convert("test", <<~"INPUT", false)
|
144
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
145
|
+
<preface>
|
146
|
+
<foreword>
|
147
|
+
<table id="tableD-1" alt="tool tip" summary="long desc">
|
148
|
+
<name>Table 1 — Repeatability and reproducibility of <em>husked</em> rice yield</name>
|
149
|
+
<thead>
|
150
|
+
<tr>
|
151
|
+
<td rowspan="2" align="left">Description</td>
|
152
|
+
<td colspan="4" align="center">Rice sample</td>
|
153
|
+
</tr>
|
154
|
+
<tr>
|
155
|
+
<td align="left">Arborio</td>
|
156
|
+
<td align="center">Drago<fn reference="a">
|
157
|
+
<p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
|
158
|
+
</fn></td>
|
159
|
+
<td align="center">Balilla<fn reference="a">
|
160
|
+
<p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
|
161
|
+
</fn></td>
|
162
|
+
<td align="center">Thaibonnet</td>
|
163
|
+
</tr>
|
164
|
+
</thead>
|
165
|
+
<tbody>
|
166
|
+
<tr>
|
167
|
+
<th align="left">Number of laboratories retained after eliminating outliers</th>
|
168
|
+
<td align="center">13</td>
|
169
|
+
<td align="center">11</td>
|
170
|
+
<td align="center">13</td>
|
171
|
+
<td align="center">13</td>
|
172
|
+
</tr>
|
173
|
+
<tr>
|
174
|
+
<td align="left">Mean value, g/100 g</td>
|
175
|
+
<td align="center">81,2</td>
|
176
|
+
<td align="center">82,0</td>
|
177
|
+
<td align="center">81,8</td>
|
178
|
+
<td align="center">77,7</td>
|
179
|
+
</tr>
|
180
|
+
</tbody>
|
181
|
+
<tfoot>
|
182
|
+
<tr>
|
183
|
+
<td align="left">Reproducibility limit, <stem type="AsciiMath">R</stem> (= 2,83 <stem type="AsciiMath">s_R</stem>)</td>
|
184
|
+
<td align="center">2,89</td>
|
185
|
+
<td align="center">0,57</td>
|
186
|
+
<td align="center">2,26</td>
|
187
|
+
<td align="center">6,06</td>
|
188
|
+
</tr>
|
189
|
+
</tfoot>
|
190
|
+
<dl>
|
191
|
+
<dt>Drago</dt>
|
192
|
+
<dd>A type of rice</dd>
|
193
|
+
</dl>
|
194
|
+
<note><name>NOTE</name><p>This is a table about rice</p></note>
|
195
|
+
</table>
|
196
|
+
|
60
197
|
</foreword>
|
61
198
|
</preface>
|
62
199
|
</iso-standard>
|
@@ -168,7 +305,7 @@ OUTPUT
|
|
168
305
|
<preface>
|
169
306
|
<foreword>
|
170
307
|
<table id="tableD-1" alt="tool tip" summary="long desc">
|
171
|
-
<name>Repeatability and reproducibility of <em>husked</em> rice yield</name>
|
308
|
+
<name>Table 1 — Repeatability and reproducibility of <em>husked</em> rice yield</name>
|
172
309
|
<thead>
|
173
310
|
<tr>
|
174
311
|
<td rowspan="2" align="left">Description</td>
|
@@ -214,7 +351,7 @@ OUTPUT
|
|
214
351
|
<dt>Drago</dt>
|
215
352
|
<dd>A type of rice</dd>
|
216
353
|
</dl>
|
217
|
-
<note><p>This is a table about rice</p></note>
|
354
|
+
<note><name>NOTE</name><p>This is a table about rice</p></note>
|
218
355
|
</table>
|
219
356
|
|
220
357
|
</foreword>
|
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "processes IsoXML terms" do
|
5
|
-
|
5
|
+
input = <<~INPUT
|
6
6
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
7
|
<sections>
|
8
8
|
<terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
|
@@ -52,6 +52,79 @@ RSpec.describe IsoDoc do
|
|
52
52
|
</sections>
|
53
53
|
</iso-standard>
|
54
54
|
INPUT
|
55
|
+
presxml = <<~OUTPUT
|
56
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
57
|
+
<sections>
|
58
|
+
<terms id='_terms_and_definitions' obligation='normative'>
|
59
|
+
<title depth='1'>1<tab/>Terms and Definitions</title>
|
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
|
126
|
+
|
127
|
+
html = <<~OUTPUT
|
55
128
|
#{HTML_HDR}
|
56
129
|
<p class="zzSTDTitle1"/>
|
57
130
|
<div id="_terms_and_definitions"><h1>1  Terms and Definitions</h1>
|
@@ -88,59 +161,8 @@ RSpec.describe IsoDoc do
|
|
88
161
|
</body>
|
89
162
|
</html>
|
90
163
|
OUTPUT
|
91
|
-
end
|
92
164
|
|
93
|
-
|
94
|
-
expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", <<~"INPUT", true).sub(%r{^.*<p class="zzSTDTitle1"/>}m, "").sub(%r{</div>\s*<br.*$}m, ""))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
95
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
96
|
-
<sections>
|
97
|
-
<terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
|
98
|
-
|
99
|
-
<term id="paddy1"><preferred>paddy</preferred>
|
100
|
-
<domain>rice</domain>
|
101
|
-
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
102
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
|
103
|
-
<p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
|
104
|
-
<ul>
|
105
|
-
<li>A</li>
|
106
|
-
</ul>
|
107
|
-
</termexample>
|
108
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
|
109
|
-
<ul>
|
110
|
-
<li>A</li>
|
111
|
-
</ul>
|
112
|
-
</termexample>
|
113
|
-
|
114
|
-
<termsource status="modified">
|
115
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
116
|
-
<modification>
|
117
|
-
<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>
|
118
|
-
</modification>
|
119
|
-
</termsource></term>
|
120
|
-
|
121
|
-
<term id="paddy"><preferred>paddy</preferred><admitted>paddy rice</admitted>
|
122
|
-
<admitted>rough rice</admitted>
|
123
|
-
<deprecates>cargo rice</deprecates>
|
124
|
-
<definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
|
125
|
-
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
|
126
|
-
<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>
|
127
|
-
</termnote>
|
128
|
-
<termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
|
129
|
-
<ul><li>A</li></ul>
|
130
|
-
<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>
|
131
|
-
</termnote>
|
132
|
-
<termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
|
133
|
-
<ul>
|
134
|
-
<li>A</li>
|
135
|
-
</ul>
|
136
|
-
</termexample>
|
137
|
-
<termsource status="identical">
|
138
|
-
<origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
|
139
|
-
</termsource></term>
|
140
|
-
</terms>
|
141
|
-
</sections>
|
142
|
-
</iso-standard>
|
143
|
-
INPUT
|
165
|
+
word = <<~OUTPUT
|
144
166
|
<div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">  </span>Terms and Definitions</h1>
|
145
167
|
<p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
|
146
168
|
|
@@ -173,5 +195,8 @@ OUTPUT
|
|
173
195
|
[/TERMREF]</p></div>
|
174
196
|
|
175
197
|
OUTPUT
|
198
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
|
199
|
+
expect(xmlpp(IsoDoc::Iso::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
|
200
|
+
expect(xmlpp(IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true).sub(%r{^.*<p class="zzSTDTitle1"/>}m, "").sub(%r{</div>\s*<br.*$}m, ""))).to be_equivalent_to xmlpp(word)
|
176
201
|
end
|
177
202
|
end
|
data/spec/isodoc/xref_spec.rb
CHANGED
@@ -2,7 +2,7 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
RSpec.describe IsoDoc do
|
4
4
|
it "cross-references notes" do
|
5
|
-
expect(xmlpp(IsoDoc::Iso::
|
5
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
6
6
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
7
7
|
<preface>
|
8
8
|
<foreword>
|
@@ -17,7 +17,7 @@ RSpec.describe IsoDoc do
|
|
17
17
|
</foreword>
|
18
18
|
</preface>
|
19
19
|
<sections>
|
20
|
-
<clause id="scope"><title>Scope</title>
|
20
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
21
21
|
<note id="N">
|
22
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
23
|
</note>
|
@@ -55,66 +55,96 @@ RSpec.describe IsoDoc do
|
|
55
55
|
</annex>
|
56
56
|
</iso-standard>
|
57
57
|
INPUT
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
<p><span class="note_label">NOTE</span>  These results are based on a study carried out on three different types of kernel.</p>
|
76
|
-
</div>
|
77
|
-
<p>
|
78
|
-
<a href="#N">Note</a>
|
79
|
-
</p>
|
80
|
-
</div>
|
81
|
-
<div id="terms"><h1>2  </h1>
|
82
|
-
</div>
|
83
|
-
<div id="widgets">
|
84
|
-
<h1>3  Widgets</h1>
|
85
|
-
<div id="widgets1"><span class='zzMoveToFollowing'><b>3.1  </b></span>
|
86
|
-
<div id="note1" class="Note"><p><span class="note_label">NOTE 1</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
87
|
-
<div id="note2" class="Note"><p><span class="note_label">NOTE 2</span>  These results are based on a study carried out on three different types of kernel.</p></div>
|
88
|
-
<p> <a href="#note1">Note 1</a> <a href="#note2">Note 2</a> </p>
|
58
|
+
<?xml version='1.0'?>
|
59
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
60
|
+
<preface>
|
61
|
+
<foreword>
|
62
|
+
<p>
|
63
|
+
<xref target='N'>Clause 1, Note</xref>
|
64
|
+
<xref target='note1'>3.1, Note 1</xref>
|
65
|
+
<xref target='note2'>3.1, Note 2</xref>
|
66
|
+
<xref target='AN'>A.1, Note</xref>
|
67
|
+
<xref target='Anote1'>A.2, Note 1</xref>
|
68
|
+
<xref target='Anote2'>A.2, Note 2</xref>
|
69
|
+
</p>
|
70
|
+
</foreword>
|
71
|
+
</preface>
|
72
|
+
<sections>
|
73
|
+
<clause id='scope' type='scope'>
|
74
|
+
<title depth='1'>1<tab/>Scope</title>
|
89
75
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
</
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
76
|
+
<note id='N'>
|
77
|
+
<name>NOTE</name>
|
78
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
79
|
+
These results are based on a study carried out on three different
|
80
|
+
types of kernel.
|
81
|
+
</p>
|
82
|
+
</note>
|
83
|
+
<p>
|
84
|
+
<xref target='N'>Note</xref>
|
85
|
+
</p>
|
86
|
+
</clause>
|
87
|
+
<terms id='terms'><title>2</title></terms>
|
88
|
+
<clause id='widgets'>
|
89
|
+
<title depth='1'>3<tab/>Widgets</title>
|
90
|
+
|
91
|
+
<clause id='widgets1' inline-header='true'><title>3.1</title>
|
92
|
+
<note id='note1'>
|
93
|
+
<name>NOTE 1</name>
|
94
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
95
|
+
These results are based on a study carried out on three different
|
96
|
+
types of kernel.
|
97
|
+
</p>
|
98
|
+
</note>
|
99
|
+
<note id='note2'>
|
100
|
+
<name>NOTE 2</name>
|
101
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a'>
|
102
|
+
These results are based on a study carried out on three different
|
103
|
+
types of kernel.
|
104
|
+
</p>
|
105
|
+
</note>
|
106
|
+
<p>
|
107
|
+
<xref target='note1'>Note 1</xref>
|
108
|
+
<xref target='note2'>Note 2</xref>
|
109
|
+
</p>
|
110
|
+
</clause>
|
111
|
+
</clause>
|
112
|
+
</sections>
|
113
|
+
<annex id='annex1'>
|
114
|
+
<title><strong>Annex A</strong><br/>(informative)</title>
|
115
|
+
<clause id='annex1a' inline-header='true'><title>A.1</title>
|
116
|
+
<note id='AN'>
|
117
|
+
<name>NOTE</name>
|
118
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
119
|
+
These results are based on a study carried out on three different
|
120
|
+
types of kernel.
|
121
|
+
</p>
|
122
|
+
</note>
|
123
|
+
</clause>
|
124
|
+
<clause id='annex1b' inline-header='true'>
|
125
|
+
<title>A.2</title>
|
126
|
+
<note id='Anote1'>
|
127
|
+
<name>NOTE 1</name>
|
128
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
129
|
+
These results are based on a study carried out on three different
|
130
|
+
types of kernel.
|
131
|
+
</p>
|
132
|
+
</note>
|
133
|
+
<note id='Anote2'>
|
134
|
+
<name>NOTE 2</name>
|
135
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a'>
|
136
|
+
These results are based on a study carried out on three different
|
137
|
+
types of kernel.
|
138
|
+
</p>
|
139
|
+
</note>
|
140
|
+
</clause>
|
141
|
+
</annex>
|
142
|
+
</iso-standard>
|
113
143
|
OUTPUT
|
114
144
|
end
|
115
145
|
|
116
|
-
|
117
|
-
expect(xmlpp(IsoDoc::Iso::
|
146
|
+
it "cross-references figures (Presentation XML)" do
|
147
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
118
148
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
119
149
|
<preface>
|
120
150
|
<foreword id="fwd">
|
@@ -129,7 +159,7 @@ RSpec.describe IsoDoc do
|
|
129
159
|
</foreword>
|
130
160
|
</preface>
|
131
161
|
<sections>
|
132
|
-
<clause id="scope"><title>Scope</title>
|
162
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
133
163
|
<figure id="N">
|
134
164
|
<name>Split-it-right sample divider</name>
|
135
165
|
<image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" mimetype="image/png"/>
|
@@ -171,81 +201,75 @@ RSpec.describe IsoDoc do
|
|
171
201
|
</annex>
|
172
202
|
</iso-standard>
|
173
203
|
INPUT
|
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
|
-
<p>
|
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
|
-
<p class="FigureTitle" style="text-align:center;">Figure A.3 — Split-it-right sample divider</p></div>
|
239
|
-
</div>
|
240
|
-
</div>
|
241
|
-
</div>
|
242
|
-
</body>
|
243
|
-
</html>
|
204
|
+
<?xml version='1.0'?>
|
205
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
206
|
+
<preface>
|
207
|
+
<foreword id='fwd'>
|
208
|
+
<p>
|
209
|
+
<xref target='N'>Figure 1</xref>
|
210
|
+
<xref target='note1'>Figure 2</xref>
|
211
|
+
<xref target='note2'>Figure 3</xref>
|
212
|
+
<xref target='AN'>Figure A.1</xref>
|
213
|
+
<xref target='Anote1'>Figure A.2</xref>
|
214
|
+
<xref target='Anote2'>Figure A.3</xref>
|
215
|
+
</p>
|
216
|
+
</foreword>
|
217
|
+
</preface>
|
218
|
+
<sections>
|
219
|
+
<clause id='scope' type='scope'>
|
220
|
+
<title depth='1'>1<tab/>Scope</title>
|
221
|
+
<figure id='N'>
|
222
|
+
<name>Figure 1 — Split-it-right sample divider</name>
|
223
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
224
|
+
</figure>
|
225
|
+
<p>
|
226
|
+
<xref target='N'>Figure 1</xref>
|
227
|
+
</p>
|
228
|
+
</clause>
|
229
|
+
<terms id='terms'><title>2</title></terms>
|
230
|
+
<clause id='widgets'>
|
231
|
+
<title depth='1'>3<tab/>Widgets</title>
|
232
|
+
<clause inline-header="true" id='widgets1'><title>3.1</title>
|
233
|
+
<figure id='note1'>
|
234
|
+
<name>Figure 2 — Split-it-right sample divider</name>
|
235
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
236
|
+
</figure>
|
237
|
+
<figure id='note2'>
|
238
|
+
<name>Figure 3 — Split-it-right sample divider</name>
|
239
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
240
|
+
</figure>
|
241
|
+
<p>
|
242
|
+
<xref target='note1'>Figure 2</xref>
|
243
|
+
<xref target='note2'>Figure 3</xref>
|
244
|
+
</p>
|
245
|
+
</clause>
|
246
|
+
</clause>
|
247
|
+
</sections>
|
248
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
249
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
250
|
+
<figure id='AN'>
|
251
|
+
<name>Figure A.1 — Split-it-right sample divider</name>
|
252
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
253
|
+
</figure>
|
254
|
+
</clause>
|
255
|
+
<clause inline-header="true" id='annex1b'>
|
256
|
+
<title>A.2</title>
|
257
|
+
<figure id='Anote1'>
|
258
|
+
<name>Figure A.2 — Split-it-right sample divider</name>
|
259
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
260
|
+
</figure>
|
261
|
+
<figure id='Anote2'>
|
262
|
+
<name>Figure A.3 — Split-it-right sample divider</name>
|
263
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
264
|
+
</figure>
|
265
|
+
</clause>
|
266
|
+
</annex>
|
267
|
+
</iso-standard>
|
244
268
|
OUTPUT
|
245
|
-
|
269
|
+
end
|
246
270
|
|
247
|
-
it "cross-references subfigures" do
|
248
|
-
expect(xmlpp(IsoDoc::Iso::
|
271
|
+
it "cross-references subfigures (Presentation XML)" do
|
272
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
249
273
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
250
274
|
<preface>
|
251
275
|
<foreword id="fwd">
|
@@ -260,7 +284,7 @@ RSpec.describe IsoDoc do
|
|
260
284
|
</foreword>
|
261
285
|
</preface>
|
262
286
|
<sections>
|
263
|
-
<clause id="scope"><title>Scope</title>
|
287
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
264
288
|
</clause>
|
265
289
|
<terms id="terms"/>
|
266
290
|
<clause id="widgets"><title>Widgets</title>
|
@@ -297,80 +321,69 @@ RSpec.describe IsoDoc do
|
|
297
321
|
</annex>
|
298
322
|
</iso-standard>
|
299
323
|
INPUT
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
<div id="widgets">
|
320
|
-
<h1>3  Widgets</h1>
|
321
|
-
<div id="widgets1"><span class='zzMoveToFollowing'><b>3.1  </b></span>
|
322
|
-
<div id="N" class="figure">
|
323
|
-
<div id="note1" class="figure">
|
324
|
-
|
325
|
-
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
326
|
-
<p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
|
327
|
-
</div>
|
328
|
-
<div id="note2" class="figure">
|
329
|
-
|
330
|
-
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
331
|
-
<p class='FigureTitle' style='text-align:center;'>b) — Split-it-right sample divider</p>
|
332
|
-
</div>
|
333
|
-
<p class='FigureTitle' style='text-align:center;'>Figure 1</p>
|
334
|
-
</div>
|
335
|
-
<p> <a href="#note1">Figure 1 a)</a> <a href="#note2">Figure 1 b)</a> </p>
|
336
|
-
</div>
|
337
|
-
</div>
|
338
|
-
<br/>
|
339
|
-
<div id="annex1" class="Section3">
|
340
|
-
<h1 class='Annex'>
|
341
|
-
<b>Annex A</b>
|
342
|
-
<br/>
|
343
|
-
(informative)
|
344
|
-
<br/>
|
345
|
-
<br/>
|
346
|
-
<b/>
|
347
|
-
</h1>
|
348
|
-
<div id="annex1a"><span class='zzMoveToFollowing'><b>A.1  </b></span>
|
349
|
-
</div>
|
350
|
-
<div id="annex1b"><span class='zzMoveToFollowing'><b>A.2  </b></span>
|
351
|
-
<div id="AN" class="figure">
|
352
|
-
<div id="Anote1" class="figure">
|
353
|
-
|
354
|
-
<img src="rice_images/rice_image1.png" height="auto" width="auto"/>
|
355
|
-
<p class='FigureTitle' style='text-align:center;'>a) — Split-it-right sample divider</p>
|
356
|
-
</div>
|
357
|
-
<div id="Anote2" class="figure">
|
324
|
+
<?xml version='1.0'?>
|
325
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
326
|
+
<preface>
|
327
|
+
<foreword id='fwd'>
|
328
|
+
<p>
|
329
|
+
<xref target='N'>Figure 1</xref>
|
330
|
+
<xref target='note1'>Figure 1 a)</xref>
|
331
|
+
<xref target='note2'>Figure 1 b)</xref>
|
332
|
+
<xref target='AN'>Figure A.1</xref>
|
333
|
+
<xref target='Anote1'>Figure A.1 a)</xref>
|
334
|
+
<xref target='Anote2'>Figure A.1 b)</xref>
|
335
|
+
</p>
|
336
|
+
</foreword>
|
337
|
+
</preface>
|
338
|
+
<sections>
|
339
|
+
<clause id='scope' type='scope'>
|
340
|
+
<title depth='1'>1<tab/>Scope</title>
|
341
|
+
</clause>
|
342
|
+
<terms id='terms'><title>2</title></terms>
|
358
343
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
344
|
+
<clause id='widgets'>
|
345
|
+
<title depth='1'>3<tab/>Widgets</title>
|
346
|
+
<clause inline-header="true" id='widgets1'><title>3.1</title>
|
347
|
+
<figure id='N'>
|
348
|
+
<name>Figure 1</name>
|
349
|
+
<figure id='note1'>
|
350
|
+
<name>a)  Split-it-right sample divider</name>
|
351
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
352
|
+
</figure>
|
353
|
+
<figure id='note2'>
|
354
|
+
<name>b)  Split-it-right sample divider</name>
|
355
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
356
|
+
</figure>
|
357
|
+
</figure>
|
358
|
+
<p>
|
359
|
+
<xref target='note1'>Figure 1 a)</xref>
|
360
|
+
<xref target='note2'>Figure 1 b)</xref>
|
361
|
+
</p>
|
362
|
+
</clause>
|
363
|
+
</clause>
|
364
|
+
</sections>
|
365
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
366
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title></clause>
|
367
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
368
|
+
<figure id='AN'>
|
369
|
+
<name>Figure A.1</name>
|
370
|
+
<figure id='Anote1'>
|
371
|
+
<name>a)  Split-it-right sample divider</name>
|
372
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
373
|
+
</figure>
|
374
|
+
<figure id='Anote2'>
|
375
|
+
<name>b)  Split-it-right sample divider</name>
|
376
|
+
<image src='rice_images/rice_image1.png' id='_8357ede4-6d44-4672-bac4-9a85e82ab7f0' mimetype='image/png'/>
|
377
|
+
</figure>
|
378
|
+
</figure>
|
379
|
+
</clause>
|
380
|
+
</annex>
|
381
|
+
</iso-standard>
|
369
382
|
OUTPUT
|
370
383
|
end
|
371
384
|
|
372
385
|
it "cross-references examples" do
|
373
|
-
expect(xmlpp(IsoDoc::Iso::
|
386
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
374
387
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
375
388
|
<preface>
|
376
389
|
<foreword>
|
@@ -385,7 +398,7 @@ RSpec.describe IsoDoc do
|
|
385
398
|
</foreword>
|
386
399
|
</preface>
|
387
400
|
<sections>
|
388
|
-
<clause id="scope"><title>Scope</title>
|
401
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
389
402
|
<example id="N">
|
390
403
|
<p>Hello</p>
|
391
404
|
</example>
|
@@ -421,66 +434,75 @@ RSpec.describe IsoDoc do
|
|
421
434
|
</annex>
|
422
435
|
</iso-standard>
|
423
436
|
INPUT
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
</
|
437
|
+
<?xml version='1.0'?>
|
438
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
439
|
+
<preface>
|
440
|
+
<foreword>
|
441
|
+
<p>
|
442
|
+
<xref target='N'>Clause 1, Example</xref>
|
443
|
+
<xref target='note1'>3.1, Example 1</xref>
|
444
|
+
<xref target='note2'>3.1, Example 2</xref>
|
445
|
+
<xref target='AN'>A.1, Example</xref>
|
446
|
+
<xref target='Anote1'>A.2, Example 1</xref>
|
447
|
+
<xref target='Anote2'>A.2, Example 2</xref>
|
448
|
+
</p>
|
449
|
+
</foreword>
|
450
|
+
</preface>
|
451
|
+
<sections>
|
452
|
+
<clause id='scope' type='scope'>
|
453
|
+
<title depth='1'>1<tab/>Scope</title>
|
454
|
+
<example id='N'>
|
455
|
+
<name>EXAMPLE</name>
|
456
|
+
<p>Hello</p>
|
457
|
+
</example>
|
458
|
+
<p>
|
459
|
+
<xref target='N'>Example</xref>
|
460
|
+
</p>
|
461
|
+
</clause>
|
462
|
+
<terms id='terms'><title>2</title></terms>
|
463
|
+
|
464
|
+
<clause id='widgets'>
|
465
|
+
<title depth='1'>3<tab/>Widgets</title>
|
466
|
+
<clause inline-header='true' id='widgets1'><title>3.1</title>
|
467
|
+
<example id='note1'>
|
468
|
+
<name>EXAMPLE 1</name>
|
469
|
+
<p>Hello</p>
|
470
|
+
</example>
|
471
|
+
<example id='note2'>
|
472
|
+
<name>EXAMPLE 2</name>
|
473
|
+
<p>Hello</p>
|
474
|
+
</example>
|
443
475
|
<p>
|
444
|
-
|
476
|
+
<xref target='note1'>Example 1</xref>
|
477
|
+
<xref target='note2'>Example 2</xref>
|
445
478
|
</p>
|
446
|
-
</
|
447
|
-
|
448
|
-
</
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
<
|
453
|
-
<
|
454
|
-
|
455
|
-
</
|
456
|
-
|
457
|
-
<
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
</
|
467
|
-
|
468
|
-
<div id="AN" class="example"><p><span class="example_label">EXAMPLE</span>  Hello</p></div>
|
469
|
-
</div>
|
470
|
-
<div id="annex1b"><span class='zzMoveToFollowing'><b>A.2  </b></span>
|
471
|
-
<div id="Anote1" class="example"><p><span class="example_label">EXAMPLE 1</span>  Hello</p></div>
|
472
|
-
<div id="Anote2" class="example"><p><span class="example_label">EXAMPLE 2</span>  Hello</p></div>
|
473
|
-
</div>
|
474
|
-
</div>
|
475
|
-
</div>
|
476
|
-
</body>
|
477
|
-
</html>
|
478
|
-
|
479
|
+
</clause>
|
480
|
+
</clause>
|
481
|
+
</sections>
|
482
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
483
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
484
|
+
<example id='AN'>
|
485
|
+
<name>EXAMPLE</name>
|
486
|
+
<p>Hello</p>
|
487
|
+
</example>
|
488
|
+
</clause>
|
489
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
490
|
+
<example id='Anote1'>
|
491
|
+
<name>EXAMPLE 1</name>
|
492
|
+
<p>Hello</p>
|
493
|
+
</example>
|
494
|
+
<example id='Anote2'>
|
495
|
+
<name>EXAMPLE 2</name>
|
496
|
+
<p>Hello</p>
|
497
|
+
</example>
|
498
|
+
</clause>
|
499
|
+
</annex>
|
500
|
+
</iso-standard>
|
479
501
|
OUTPUT
|
480
502
|
end
|
481
503
|
|
482
504
|
it "cross-references formulae" do
|
483
|
-
expect(xmlpp(IsoDoc::Iso::
|
505
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
484
506
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
485
507
|
<preface>
|
486
508
|
<foreword>
|
@@ -495,7 +517,7 @@ RSpec.describe IsoDoc do
|
|
495
517
|
</foreword>
|
496
518
|
</preface>
|
497
519
|
<sections>
|
498
|
-
<clause id="scope"><title>Scope</title>
|
520
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
499
521
|
<formula id="N">
|
500
522
|
<stem type="AsciiMath">r = 1 %</stem>
|
501
523
|
</formula>
|
@@ -545,63 +567,75 @@ RSpec.describe IsoDoc do
|
|
545
567
|
</preface>
|
546
568
|
</iso-standard>
|
547
569
|
INPUT
|
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
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
</
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
570
|
+
<?xml version='1.0'?>
|
571
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
572
|
+
<preface>
|
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>
|
607
|
+
</formula>
|
608
|
+
<p>
|
609
|
+
<xref target='note1'>Formula (2)</xref>
|
610
|
+
<xref target='note2'>Formula (3)</xref>
|
611
|
+
</p>
|
612
|
+
</clause>
|
613
|
+
</clause>
|
614
|
+
</sections>
|
615
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
616
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
617
|
+
<formula id='AN'>
|
618
|
+
<name>A.1</name>
|
619
|
+
<stem type='AsciiMath'>r = 1 %</stem>
|
620
|
+
</formula>
|
621
|
+
</clause>
|
622
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
623
|
+
<formula id='Anote1'>
|
624
|
+
<name>A.2</name>
|
625
|
+
<stem type='AsciiMath'>r = 1 %</stem>
|
626
|
+
</formula>
|
627
|
+
<formula id='Anote2'>
|
628
|
+
<name>A.3</name>
|
629
|
+
<stem type='AsciiMath'>r = 1 %</stem>
|
630
|
+
</formula>
|
631
|
+
</clause>
|
632
|
+
</annex>
|
633
|
+
</iso-standard>
|
600
634
|
OUTPUT
|
601
635
|
end
|
602
636
|
|
603
637
|
it "cross-references tables" do
|
604
|
-
expect(xmlpp(IsoDoc::Iso::
|
638
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
605
639
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
606
640
|
<preface>
|
607
641
|
<foreword>
|
@@ -616,7 +650,7 @@ RSpec.describe IsoDoc do
|
|
616
650
|
</foreword>
|
617
651
|
</preface>
|
618
652
|
<sections>
|
619
|
-
<clause id="scope"><title>Scope</title>
|
653
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
620
654
|
<table id="N">
|
621
655
|
<name>Repeatability and reproducibility of husked rice yield</name>
|
622
656
|
<tbody>
|
@@ -694,74 +728,111 @@ RSpec.describe IsoDoc do
|
|
694
728
|
</annex>
|
695
729
|
</iso-standard>
|
696
730
|
INPUT
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
</
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
731
|
+
<?xml version='1.0'?>
|
732
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
733
|
+
<preface>
|
734
|
+
<foreword>
|
735
|
+
<p>
|
736
|
+
<xref target='N'>Table 1</xref>
|
737
|
+
<xref target='note1'>Table 2</xref>
|
738
|
+
<xref target='note2'>Table 3</xref>
|
739
|
+
<xref target='AN'>Table A.1</xref>
|
740
|
+
<xref target='Anote1'>Table A.2</xref>
|
741
|
+
<xref target='Anote2'>Table A.3</xref>
|
742
|
+
</p>
|
743
|
+
</foreword>
|
744
|
+
</preface>
|
745
|
+
<sections>
|
746
|
+
<clause id='scope' type='scope'>
|
747
|
+
<title depth='1'>1<tab/>Scope</title>
|
748
|
+
<table id='N'>
|
749
|
+
<name>Table 1 — Repeatability and reproducibility of husked rice yield</name>
|
750
|
+
<tbody>
|
751
|
+
<tr>
|
752
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
753
|
+
<td align='center'>13</td>
|
754
|
+
<td align='center'>11</td>
|
755
|
+
</tr>
|
756
|
+
</tbody>
|
757
|
+
</table>
|
758
|
+
<p>
|
759
|
+
<xref target='N'>Table 1</xref>
|
760
|
+
</p>
|
761
|
+
</clause>
|
762
|
+
<terms id='terms'><title>2</title></terms>
|
763
|
+
|
764
|
+
<clause id='widgets'>
|
765
|
+
<title depth='1'>3<tab/>Widgets</title>
|
766
|
+
<clause id='widgets1' inline-header="true"><title>3.1</title>
|
767
|
+
<table id='note1'>
|
768
|
+
<name>Table 2 — Repeatability and reproducibility of husked rice yield</name>
|
769
|
+
<tbody>
|
770
|
+
<tr>
|
771
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
772
|
+
<td align='center'>13</td>
|
773
|
+
<td align='center'>11</td>
|
774
|
+
</tr>
|
775
|
+
</tbody>
|
776
|
+
</table>
|
777
|
+
<table id='note2'>
|
778
|
+
<name>Table 3 — Repeatability and reproducibility of husked rice yield</name>
|
779
|
+
<tbody>
|
780
|
+
<tr>
|
781
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
782
|
+
<td align='center'>13</td>
|
783
|
+
<td align='center'>11</td>
|
784
|
+
</tr>
|
785
|
+
</tbody>
|
786
|
+
</table>
|
787
|
+
<p>
|
788
|
+
<xref target='note1'>Table 2</xref>
|
789
|
+
<xref target='note2'>Table 3</xref>
|
790
|
+
</p>
|
791
|
+
</clause>
|
792
|
+
</clause>
|
793
|
+
</sections>
|
794
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
795
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
796
|
+
<table id='AN'>
|
797
|
+
<name>Table A.1 — Repeatability and reproducibility of husked rice yield</name>
|
798
|
+
<tbody>
|
799
|
+
<tr>
|
800
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
801
|
+
<td align='center'>13</td>
|
802
|
+
<td align='center'>11</td>
|
803
|
+
</tr>
|
804
|
+
</tbody>
|
805
|
+
</table>
|
806
|
+
</clause>
|
807
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
808
|
+
<table id='Anote1'>
|
809
|
+
<name>Table A.2 — Repeatability and reproducibility of husked rice yield</name>
|
810
|
+
<tbody>
|
811
|
+
<tr>
|
812
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
813
|
+
<td align='center'>13</td>
|
814
|
+
<td align='center'>11</td>
|
815
|
+
</tr>
|
816
|
+
</tbody>
|
817
|
+
</table>
|
818
|
+
<table id='Anote2'>
|
819
|
+
<name>Table A.3 — Repeatability and reproducibility of husked rice yield</name>
|
820
|
+
<tbody>
|
821
|
+
<tr>
|
822
|
+
<td align='left'>Number of laboratories retained after eliminating outliers</td>
|
823
|
+
<td align='center'>13</td>
|
824
|
+
<td align='center'>11</td>
|
825
|
+
</tr>
|
826
|
+
</tbody>
|
827
|
+
</table>
|
828
|
+
</clause>
|
829
|
+
</annex>
|
830
|
+
</iso-standard>
|
760
831
|
OUTPUT
|
761
832
|
end
|
762
833
|
|
763
834
|
it "cross-references term notes" do
|
764
|
-
expect(xmlpp(IsoDoc::Iso::
|
835
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
765
836
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
766
837
|
<preface>
|
767
838
|
<foreword>
|
@@ -773,7 +844,7 @@ RSpec.describe IsoDoc do
|
|
773
844
|
</foreword>
|
774
845
|
</preface>
|
775
846
|
<sections>
|
776
|
-
<clause id="scope"><title>Scope</title>
|
847
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
777
848
|
</clause>
|
778
849
|
<terms id="terms">
|
779
850
|
<term id="_waxy_rice"><preferred>waxy rice</preferred>
|
@@ -791,33 +862,60 @@ RSpec.describe IsoDoc do
|
|
791
862
|
|
792
863
|
</iso-standard>
|
793
864
|
INPUT
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
865
|
+
<?xml version='1.0'?>
|
866
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
867
|
+
<preface>
|
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>
|
894
|
+
|
895
|
+
<preferred>nonwaxy rice</preferred>
|
896
|
+
<termnote id='note2'>
|
897
|
+
<name>Note 1 to entry</name>
|
898
|
+
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
899
|
+
The starch of waxy rice consists almost entirely of amylopectin. The
|
900
|
+
kernels have a tendency to stick together after cooking.
|
901
|
+
</p>
|
902
|
+
</termnote>
|
903
|
+
<termnote id='note3'>
|
904
|
+
<name>Note 2 to entry</name>
|
905
|
+
<p id='_b0cb3dfd-78fc-47dd-a339-84070d947463'>
|
906
|
+
The starch of waxy rice consists almost entirely of amylopectin. The
|
907
|
+
kernels have a tendency to stick together after cooking.
|
908
|
+
</p>
|
909
|
+
</termnote>
|
910
|
+
</term>
|
911
|
+
</terms>
|
912
|
+
</sections>
|
913
|
+
</iso-standard>
|
816
914
|
OUTPUT
|
817
915
|
end
|
818
916
|
|
819
917
|
it "cross-references sections" do
|
820
|
-
expect(xmlpp(IsoDoc::Iso::
|
918
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
821
919
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
822
920
|
<preface>
|
823
921
|
<foreword obligation="informative">
|
@@ -846,7 +944,7 @@ RSpec.describe IsoDoc do
|
|
846
944
|
</clause>
|
847
945
|
<clause id="C1" inline-header="false" obligation="informative">Text</clause>
|
848
946
|
</introduction></preface><sections>
|
849
|
-
<clause id="D" obligation="normative">
|
947
|
+
<clause id="D" obligation="normative" type="scope">
|
850
948
|
<title>Scope</title>
|
851
949
|
<p id="E">Text</p>
|
852
950
|
</clause>
|
@@ -899,103 +997,158 @@ RSpec.describe IsoDoc do
|
|
899
997
|
</bibliography>
|
900
998
|
</iso-standard>
|
901
999
|
INPUT
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
1000
|
+
<?xml version='1.0'?>
|
1001
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1002
|
+
<preface>
|
1003
|
+
<foreword obligation='informative'>
|
1004
|
+
<title>Foreword</title>
|
1005
|
+
<p id='A'>
|
1006
|
+
This is a preamble
|
1007
|
+
<xref target='C'>0.1</xref>
|
1008
|
+
<xref target='C1'>0.2</xref>
|
1009
|
+
<xref target='D'>Clause 1</xref>
|
1010
|
+
<xref target='H'>Clause 3</xref>
|
1011
|
+
<xref target='I'>3.1</xref>
|
1012
|
+
<xref target='J'>3.1.1</xref>
|
1013
|
+
<xref target='K'>3.2</xref>
|
1014
|
+
<xref target='L'>Clause 4</xref>
|
1015
|
+
<xref target='M'>Clause 5</xref>
|
1016
|
+
<xref target='N'>5.1</xref>
|
1017
|
+
<xref target='O'>5.2</xref>
|
1018
|
+
<xref target='P'>Annex A</xref>
|
1019
|
+
<xref target='Q'>A.1</xref>
|
1020
|
+
<xref target='Q1'>A.1.1</xref>
|
1021
|
+
<xref target='Q2'>Annex A, Appendix 1</xref>
|
1022
|
+
<xref target='R'>Clause 2</xref>
|
1023
|
+
</p>
|
1024
|
+
</foreword>
|
1025
|
+
<introduction id='B' obligation='informative'>
|
1026
|
+
<title depth='1'>
|
1027
|
+
0
|
1028
|
+
<tab/>
|
1029
|
+
Introduction
|
1030
|
+
</title>
|
1031
|
+
<clause id='C' inline-header='false' obligation='informative'>
|
1032
|
+
<title depth='2'>
|
1033
|
+
0.1
|
1034
|
+
<tab/>
|
1035
|
+
Introduction Subsection
|
1036
|
+
</title>
|
1037
|
+
</clause>
|
1038
|
+
<clause id='C1' inline-header='true' obligation='informative'><title>0.2</title>Text</clause>
|
1039
|
+
</introduction>
|
1040
|
+
</preface>
|
1041
|
+
<sections>
|
1042
|
+
<clause id='D' obligation='normative' type="scope">
|
1043
|
+
<title depth='1'>1<tab/>Scope</title>
|
1044
|
+
<p id='E'>Text</p>
|
1045
|
+
</clause>
|
1046
|
+
<terms id='H' obligation='normative'>
|
1047
|
+
<title depth='1'>
|
1048
|
+
3
|
1049
|
+
<tab/>
|
1050
|
+
Terms, definitions, symbols and abbreviated terms
|
1051
|
+
</title>
|
1052
|
+
<terms id='I' obligation='normative'>
|
1053
|
+
<title depth='2'>
|
1054
|
+
3.1
|
1055
|
+
<tab/>
|
1056
|
+
Normal Terms
|
1057
|
+
</title>
|
1058
|
+
<term id='J'>
|
1059
|
+
<name>3.1.1</name>
|
1060
|
+
<preferred>Term2</preferred>
|
1061
|
+
</term>
|
1062
|
+
</terms>
|
1063
|
+
<definitions id='K' inline-header="true">
|
1064
|
+
<title>3.2</title>
|
1065
|
+
<dl>
|
1066
|
+
<dt>Symbol</dt>
|
1067
|
+
<dd>Definition</dd>
|
1068
|
+
</dl>
|
1069
|
+
</definitions>
|
1070
|
+
</terms>
|
1071
|
+
<definitions id='L'>
|
1072
|
+
<title>4</title>
|
1073
|
+
<dl>
|
1074
|
+
<dt>Symbol</dt>
|
1075
|
+
<dd>Definition</dd>
|
1076
|
+
</dl>
|
1077
|
+
</definitions>
|
1078
|
+
<clause id='M' inline-header='false' obligation='normative'>
|
1079
|
+
<title depth='1'>
|
1080
|
+
5
|
1081
|
+
<tab/>
|
1082
|
+
Clause 4
|
1083
|
+
</title>
|
1084
|
+
<clause id='N' inline-header='false' obligation='normative'>
|
1085
|
+
<title depth='2'>
|
1086
|
+
5.1
|
1087
|
+
<tab/>
|
1088
|
+
Introduction
|
1089
|
+
</title>
|
1090
|
+
</clause>
|
1091
|
+
<clause id='O' inline-header='false' obligation='normative'>
|
1092
|
+
<title depth='2'>
|
1093
|
+
5.2
|
1094
|
+
<tab/>
|
1095
|
+
Clause 4.2
|
1096
|
+
</title>
|
1097
|
+
</clause>
|
1098
|
+
</clause>
|
1099
|
+
</sections>
|
1100
|
+
<annex id='P' inline-header='false' obligation='normative'>
|
1101
|
+
<title>
|
1102
|
+
<strong>Annex A</strong>
|
1103
|
+
<br/>
|
1104
|
+
(normative)
|
1105
|
+
<br/>
|
1106
|
+
<br/>
|
1107
|
+
<strong>Annex</strong>
|
1108
|
+
</title>
|
1109
|
+
<clause id='Q' inline-header='false' obligation='normative'>
|
1110
|
+
<title depth='2'>
|
1111
|
+
A.1
|
1112
|
+
<tab/>
|
1113
|
+
Annex A.1
|
1114
|
+
</title>
|
1115
|
+
<clause id='Q1' inline-header='false' obligation='normative'>
|
1116
|
+
<title depth='3'>
|
1117
|
+
A.1.1
|
1118
|
+
<tab/>
|
1119
|
+
Annex A.1a
|
1120
|
+
</title>
|
1121
|
+
</clause>
|
1122
|
+
</clause>
|
1123
|
+
<appendix id='Q2' inline-header='false' obligation='normative'>
|
1124
|
+
<title depth='2'>
|
1125
|
+
Appendix 1
|
1126
|
+
<tab/>
|
1127
|
+
An Appendix
|
1128
|
+
</title>
|
1129
|
+
</appendix>
|
1130
|
+
</annex>
|
1131
|
+
<bibliography>
|
1132
|
+
<references id='R' obligation='informative' normative='true'>
|
1133
|
+
<title depth='1'>
|
1134
|
+
2
|
1135
|
+
<tab/>
|
1136
|
+
Normative References
|
1137
|
+
</title>
|
1138
|
+
</references>
|
1139
|
+
<clause id='S' obligation='informative'>
|
1140
|
+
<title depth='1'>Bibliography</title>
|
1141
|
+
<references id='T' obligation='informative' normative='false'>
|
1142
|
+
<title depth='2'>Bibliography Subsection</title>
|
1143
|
+
</references>
|
1144
|
+
</clause>
|
1145
|
+
</bibliography>
|
1146
|
+
</iso-standard>
|
994
1147
|
OUTPUT
|
995
1148
|
end
|
996
1149
|
|
997
1150
|
it "cross-references lists" do
|
998
|
-
expect(xmlpp(IsoDoc::Iso::
|
1151
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
999
1152
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1000
1153
|
<preface>
|
1001
1154
|
<foreword>
|
@@ -1010,7 +1163,7 @@ Text</div>
|
|
1010
1163
|
</foreword>
|
1011
1164
|
</preface>
|
1012
1165
|
<sections>
|
1013
|
-
<clause id="scope"><title>Scope</title>
|
1166
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
1014
1167
|
<ol id="N">
|
1015
1168
|
<li><p>A</p></li>
|
1016
1169
|
</ol>
|
@@ -1044,72 +1197,78 @@ Text</div>
|
|
1044
1197
|
</annex>
|
1045
1198
|
</iso-standard>
|
1046
1199
|
INPUT
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
</
|
1090
|
-
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1200
|
+
<?xml version='1.0'?>
|
1201
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1202
|
+
<preface>
|
1203
|
+
<foreword>
|
1204
|
+
<p>
|
1205
|
+
<xref target='N'>Clause 1, List</xref>
|
1206
|
+
<xref target='note1'>3.1, List 1</xref>
|
1207
|
+
<xref target='note2'>3.1, List 2</xref>
|
1208
|
+
<xref target='AN'>A.1, List</xref>
|
1209
|
+
<xref target='Anote1'>A.2, List 1</xref>
|
1210
|
+
<xref target='Anote2'>A.2, List 2</xref>
|
1211
|
+
</p>
|
1212
|
+
</foreword>
|
1213
|
+
</preface>
|
1214
|
+
<sections>
|
1215
|
+
<clause id='scope' type='scope'>
|
1216
|
+
<title depth='1'>1<tab/>Scope</title>
|
1217
|
+
<ol id='N'>
|
1218
|
+
<li>
|
1219
|
+
<p>A</p>
|
1220
|
+
</li>
|
1221
|
+
</ol>
|
1222
|
+
</clause>
|
1223
|
+
<terms id='terms'><title>2</title></terms>
|
1224
|
+
<clause id='widgets'>
|
1225
|
+
<title depth='1'>3<tab/>Widgets</title>
|
1226
|
+
<clause id='widgets1' inline-header='true'><title>3.1</title>
|
1227
|
+
<ol id='note1'>
|
1228
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
1229
|
+
These results are based on a study carried out on three different
|
1230
|
+
types of kernel.
|
1231
|
+
</p>
|
1232
|
+
</ol>
|
1233
|
+
<ol id='note2'>
|
1234
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a'>
|
1235
|
+
These results are based on a study carried out on three different
|
1236
|
+
types of kernel.
|
1237
|
+
</p>
|
1238
|
+
</ol>
|
1239
|
+
</clause>
|
1240
|
+
</clause>
|
1241
|
+
</sections>
|
1242
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
1243
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
1244
|
+
<ol id='AN'>
|
1245
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
1246
|
+
These results are based on a study carried out on three different
|
1247
|
+
types of kernel.
|
1248
|
+
</p>
|
1249
|
+
</ol>
|
1250
|
+
</clause>
|
1251
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
1252
|
+
<ol id='Anote1'>
|
1253
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
|
1254
|
+
These results are based on a study carried out on three different
|
1255
|
+
types of kernel.
|
1256
|
+
</p>
|
1257
|
+
</ol>
|
1258
|
+
<ol id='Anote2'>
|
1259
|
+
<p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a'>
|
1260
|
+
These results are based on a study carried out on three different
|
1261
|
+
types of kernel.
|
1262
|
+
</p>
|
1263
|
+
</ol>
|
1264
|
+
</clause>
|
1265
|
+
</annex>
|
1266
|
+
</iso-standard>
|
1108
1267
|
OUTPUT
|
1109
1268
|
end
|
1110
1269
|
|
1111
1270
|
it "cross-references list items" do
|
1112
|
-
expect(xmlpp(IsoDoc::Iso::
|
1271
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1113
1272
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1114
1273
|
<preface>
|
1115
1274
|
<foreword>
|
@@ -1124,7 +1283,7 @@ Text</div>
|
|
1124
1283
|
</foreword>
|
1125
1284
|
</preface>
|
1126
1285
|
<sections>
|
1127
|
-
<clause id="scope"><title>Scope</title>
|
1286
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
1128
1287
|
<ol id="N1">
|
1129
1288
|
<li id="N"><p>A</p></li>
|
1130
1289
|
</ol>
|
@@ -1158,71 +1317,73 @@ Text</div>
|
|
1158
1317
|
</annex>
|
1159
1318
|
</iso-standard>
|
1160
1319
|
INPUT
|
1161
|
-
|
1162
|
-
|
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
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1320
|
+
<?xml version='1.0'?>
|
1321
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1322
|
+
<preface>
|
1323
|
+
<foreword>
|
1324
|
+
<p>
|
1325
|
+
<xref target='N'>Clause 1 a)</xref>
|
1326
|
+
<xref target='note1'>3.1 List 1 a)</xref>
|
1327
|
+
<xref target='note2'>3.1 List 2 a)</xref>
|
1328
|
+
<xref target='AN'>A.1 a)</xref>
|
1329
|
+
<xref target='Anote1'>A.2 List 1 a)</xref>
|
1330
|
+
<xref target='Anote2'>A.2 List 2 a)</xref>
|
1331
|
+
</p>
|
1332
|
+
</foreword>
|
1333
|
+
</preface>
|
1334
|
+
<sections>
|
1335
|
+
<clause id='scope' type='scope'>
|
1336
|
+
<title depth='1'>1<tab/>Scope</title>
|
1337
|
+
<ol id='N1'>
|
1338
|
+
<li id='N'>
|
1339
|
+
<p>A</p>
|
1340
|
+
</li>
|
1341
|
+
</ol>
|
1342
|
+
</clause>
|
1343
|
+
<terms id='terms'><title>2</title></terms>
|
1344
|
+
<clause id='widgets'>
|
1345
|
+
<title depth='1'>3<tab/>Widgets</title>
|
1346
|
+
<clause inline-header="true" id='widgets1'><title>3.1</title>
|
1347
|
+
<ol id='note1l'>
|
1348
|
+
<li id='note1'>
|
1349
|
+
<p>A</p>
|
1350
|
+
</li>
|
1351
|
+
</ol>
|
1352
|
+
<ol id='note2l'>
|
1353
|
+
<li id='note2'>
|
1354
|
+
<p>A</p>
|
1355
|
+
</li>
|
1356
|
+
</ol>
|
1357
|
+
</clause>
|
1358
|
+
</clause>
|
1359
|
+
</sections>
|
1360
|
+
<annex id='annex1'><title><strong>Annex A</strong><br/>(informative)</title>
|
1361
|
+
<clause inline-header="true" id='annex1a'><title>A.1</title>
|
1362
|
+
<ol id='ANl'>
|
1363
|
+
<li id='AN'>
|
1364
|
+
<p>A</p>
|
1365
|
+
</li>
|
1366
|
+
</ol>
|
1367
|
+
</clause>
|
1368
|
+
<clause inline-header="true" id='annex1b'><title>A.2</title>
|
1369
|
+
<ol id='Anote1l'>
|
1370
|
+
<li id='Anote1'>
|
1371
|
+
<p>A</p>
|
1372
|
+
</li>
|
1373
|
+
</ol>
|
1374
|
+
<ol id='Anote2l'>
|
1375
|
+
<li id='Anote2'>
|
1376
|
+
<p>A</p>
|
1377
|
+
</li>
|
1378
|
+
</ol>
|
1379
|
+
</clause>
|
1380
|
+
</annex>
|
1381
|
+
</iso-standard>
|
1221
1382
|
OUTPUT
|
1222
1383
|
end
|
1223
1384
|
|
1224
1385
|
it "cross-references nested list items" do
|
1225
|
-
expect(xmlpp(IsoDoc::Iso::
|
1386
|
+
expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
|
1226
1387
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1227
1388
|
<preface>
|
1228
1389
|
<foreword>
|
@@ -1237,7 +1398,7 @@ Text</div>
|
|
1237
1398
|
</foreword>
|
1238
1399
|
</preface>
|
1239
1400
|
<sections>
|
1240
|
-
<clause id="scope"><title>Scope</title>
|
1401
|
+
<clause id="scope" type="scope"><title>Scope</title>
|
1241
1402
|
<ol id="N1">
|
1242
1403
|
<li id="N"><p>A</p>
|
1243
1404
|
<ol>
|
@@ -1260,44 +1421,56 @@ Text</div>
|
|
1260
1421
|
</sections>
|
1261
1422
|
</iso-standard>
|
1262
1423
|
INPUT
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
<
|
1269
|
-
<
|
1270
|
-
<
|
1271
|
-
<
|
1272
|
-
<
|
1273
|
-
<
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1424
|
+
<?xml version='1.0'?>
|
1425
|
+
<iso-standard xmlns='http://riboseinc.com/isoxml'>
|
1426
|
+
<preface>
|
1427
|
+
<foreword>
|
1428
|
+
<p>
|
1429
|
+
<xref target='N'>Clause 1 a)</xref>
|
1430
|
+
<xref target='note1'>Clause 1 a.1)</xref>
|
1431
|
+
<xref target='note2'>Clause 1 a.1.i)</xref>
|
1432
|
+
<xref target='AN'>Clause 1 a.1.i.A)</xref>
|
1433
|
+
<xref target='Anote1'>Clause 1 a.1.i.A.I)</xref>
|
1434
|
+
<xref target='Anote2'>Clause 1 a.1.i.A.I.a)</xref>
|
1435
|
+
</p>
|
1436
|
+
</foreword>
|
1437
|
+
</preface>
|
1438
|
+
<sections>
|
1439
|
+
<clause id='scope' type='scope'>
|
1440
|
+
<title depth='1'>1<tab/>Scope</title>
|
1441
|
+
<ol id='N1'>
|
1442
|
+
<li id='N'>
|
1443
|
+
<p>A</p>
|
1444
|
+
<ol>
|
1445
|
+
<li id='note1'>
|
1446
|
+
<p>A</p>
|
1447
|
+
<ol>
|
1448
|
+
<li id='note2'>
|
1449
|
+
<p>A</p>
|
1450
|
+
<ol>
|
1451
|
+
<li id='AN'>
|
1452
|
+
<p>A</p>
|
1453
|
+
<ol>
|
1454
|
+
<li id='Anote1'>
|
1455
|
+
<p>A</p>
|
1456
|
+
<ol>
|
1457
|
+
<li id='Anote2'>
|
1458
|
+
<p>A</p>
|
1459
|
+
</li>
|
1460
|
+
</ol>
|
1461
|
+
</li>
|
1462
|
+
</ol>
|
1463
|
+
</li>
|
1464
|
+
</ol>
|
1465
|
+
</li>
|
1466
|
+
</ol>
|
1467
|
+
</li>
|
1468
|
+
</ol>
|
1469
|
+
</li>
|
1470
|
+
</ol>
|
1471
|
+
</clause>
|
1472
|
+
</sections>
|
1473
|
+
</iso-standard>
|
1301
1474
|
OUTPUT
|
1302
1475
|
end
|
1303
1476
|
|