isodoc 0.5.5 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CODE_OF_CONDUCT.md +46 -0
  3. data/LICENSE +25 -0
  4. data/README.adoc +1 -1
  5. data/Rakefile +6 -0
  6. data/isodoc.gemspec +1 -0
  7. data/lib/isodoc.rb +4 -95
  8. data/lib/isodoc/cleanup.rb +14 -10
  9. data/lib/isodoc/{notes.rb → comments.rb} +0 -73
  10. data/lib/isodoc/convert.rb +97 -0
  11. data/lib/isodoc/footnotes.rb +74 -0
  12. data/lib/isodoc/html.rb +41 -4
  13. data/lib/isodoc/i18n-en.yaml +1 -0
  14. data/lib/isodoc/i18n-fr.yaml +1 -0
  15. data/lib/isodoc/i18n-zh-Hans.yaml +1 -0
  16. data/lib/isodoc/i18n.rb +1 -0
  17. data/lib/isodoc/inline.rb +4 -12
  18. data/lib/isodoc/iso2wordhtml.rb +26 -13
  19. data/lib/isodoc/metadata.rb +23 -10
  20. data/lib/isodoc/references.rb +20 -22
  21. data/lib/isodoc/section.rb +4 -3
  22. data/lib/isodoc/table.rb +0 -2
  23. data/lib/isodoc/terms.rb +2 -13
  24. data/lib/isodoc/utils.rb +24 -3
  25. data/lib/isodoc/version.rb +1 -1
  26. data/lib/isodoc/wordconvert/comments.rb +155 -0
  27. data/lib/isodoc/wordconvert/convert.rb +31 -0
  28. data/lib/isodoc/wordconvert/footnotes.rb +80 -0
  29. data/lib/isodoc/wordconvert/wordconvertmodule.rb +212 -0
  30. data/lib/isodoc/xref_gen.rb +50 -79
  31. data/lib/isodoc/xref_sect_gen.rb +82 -0
  32. data/spec/assets/header.html +7 -0
  33. data/spec/assets/html.css +2 -0
  34. data/spec/assets/htmlcover.html +4 -0
  35. data/spec/assets/htmlintro.html +5 -0
  36. data/spec/assets/i18n.yaml +2 -0
  37. data/spec/assets/iso.xml +8 -0
  38. data/spec/assets/rice_image1.png +0 -0
  39. data/spec/assets/std.css +2 -0
  40. data/spec/assets/word.css +2 -0
  41. data/spec/assets/wordcover.html +3 -0
  42. data/spec/assets/wordintro.html +4 -0
  43. data/spec/isodoc/blocks_spec.rb +130 -47
  44. data/spec/isodoc/cleanup_spec.rb +693 -0
  45. data/spec/isodoc/footnotes_spec.rb +282 -0
  46. data/spec/isodoc/i18n_spec.rb +662 -0
  47. data/spec/isodoc/inline_spec.rb +344 -0
  48. data/spec/isodoc/lists_spec.rb +81 -18
  49. data/spec/isodoc/metadata_spec.rb +141 -0
  50. data/spec/isodoc/postproc_spec.rb +444 -0
  51. data/spec/isodoc/ref_spec.rb +158 -0
  52. data/spec/isodoc/section_spec.rb +275 -112
  53. data/spec/isodoc/table_spec.rb +146 -8
  54. data/spec/isodoc/terms_spec.rb +118 -0
  55. data/spec/isodoc/xref_spec.rb +490 -114
  56. metadata +46 -4
  57. data/lib/isodoc/postprocessing.rb +0 -176
@@ -17,7 +17,143 @@ RSpec.describe IsoDoc do
17
17
  <td align="center">Drago<fn reference="a">
18
18
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
19
19
  </fn></td>
20
- <td align="center">Balilla</td>
20
+ <td align="center">Balilla<fn reference="a">
21
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
22
+ </fn></td>
23
+ <td align="center">Thaibonnet</td>
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ <tr>
28
+ <td align="left">Number of laboratories retained after eliminating outliers</td>
29
+ <td align="center">13</td>
30
+ <td align="center">11</td>
31
+ <td align="center">13</td>
32
+ <td align="center">13</td>
33
+ </tr>
34
+ <tr>
35
+ <td align="left">Mean value, g/100 g</td>
36
+ <td align="center">81,2</td>
37
+ <td align="center">82,0</td>
38
+ <td align="center">81,8</td>
39
+ <td align="center">77,7</td>
40
+ </tr>
41
+ </tbody>
42
+ <tfoot>
43
+ <tr>
44
+ <td align="left">Reproducibility limit, <stem type="AsciiMath">R</stem> (= 2,83 <stem type="AsciiMath">s_R</stem>)</td>
45
+ <td align="center">2,89</td>
46
+ <td align="center">0,57</td>
47
+ <td align="center">2,26</td>
48
+ <td align="center">6,06</td>
49
+ </tr>
50
+ </tfoot>
51
+ <dl>
52
+ <dt>Drago</dt>
53
+ <dd>A type of rice</dd>
54
+ </dl>
55
+ <note><p>This is a table about rice</p></note>
56
+ </table>
57
+ </foreword>
58
+ </iso-standard>
59
+ INPUT
60
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
61
+ <head>
62
+ <title>test</title>
63
+ <body lang="EN-US" link="blue" vlink="#954F72">
64
+ <div class="WordSection1">
65
+ <p>&#160;</p>
66
+ </div>
67
+ <br/>
68
+ <div class="WordSection2">
69
+ <br/>
70
+ <div>
71
+ <h1 class="ForewordTitle">Foreword</h1>
72
+ <p class="TableTitle" align="center">
73
+ <b>Table 1&#160;&#8212; Repeatability and reproducibility of husked rice yield</b>
74
+ </p>
75
+ <table id="tableD-1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
76
+ <thead>
77
+ <tr>
78
+ <td rowspan="2" align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Description</td>
79
+ <td colspan="4" align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Rice sample</td>
80
+ </tr>
81
+ <tr>
82
+ <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Arborio</td>
83
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a&#160; </a>
84
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
85
+ </div></aside></td>
86
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
87
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Thaibonnet</td>
88
+ </tr>
89
+ </thead>
90
+ <tbody>
91
+ <tr>
92
+ <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">Number of laboratories retained after eliminating outliers</td>
93
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
94
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">11</td>
95
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
96
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.0pt;">13</td>
97
+ </tr>
98
+ <tr>
99
+ <td align="left" style="border-top:none;border-bottom:solid windowtext 1.5pt;">Mean value, g/100 g</td>
100
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,2</td>
101
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">82,0</td>
102
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">81,8</td>
103
+ <td align="center" style="border-top:none;border-bottom:solid windowtext 1.5pt;">77,7</td>
104
+ </tr>
105
+ </tbody>
106
+ <tfoot>
107
+ <tr>
108
+ <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Reproducibility limit, <span class="stem">(#(R)#)</span> (= 2,83 <span class="stem">(#(s_R)#)</span>)</td>
109
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,89</td>
110
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">0,57</td>
111
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">2,26</td>
112
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">6,06</td>
113
+ </tr>
114
+ </tfoot>
115
+ <dl>
116
+ <dt>
117
+ <p>Drago</p>
118
+ </dt>
119
+ <dd>A type of rice</dd>
120
+ </dl>
121
+ <div id="" class="Note">
122
+ <p class="Note">NOTE&#160; This is a table about rice</p>
123
+ </div>
124
+ </table>
125
+ </div>
126
+ <p>&#160;</p>
127
+ </div>
128
+ <br/>
129
+ <div class="WordSection3">
130
+ <p class="zzSTDTitle1"/>
131
+ </div>
132
+ </body>
133
+ </head>
134
+ </html>
135
+ OUTPUT
136
+ end
137
+
138
+ it "processes IsoXML tables (Word)" do
139
+ expect(IsoDoc::WordConvert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
140
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
141
+ <foreword>
142
+ <table id="tableD-1">
143
+ <name>Repeatability and reproducibility of husked rice yield</name>
144
+ <thead>
145
+ <tr>
146
+ <td rowspan="2" align="left">Description</td>
147
+ <td colspan="4" align="center">Rice sample</td>
148
+ </tr>
149
+ <tr>
150
+ <td align="left">Arborio</td>
151
+ <td align="center">Drago<fn reference="a">
152
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
153
+ </fn></td>
154
+ <td align="center">Balilla<fn reference="a">
155
+ <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
156
+ </fn></td>
21
157
  <td align="center">Thaibonnet</td>
22
158
  </tr>
23
159
  </thead>
@@ -81,7 +217,7 @@ RSpec.describe IsoDoc do
81
217
  <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Drago<a href="#tableD-1a" class="TableFootnoteRef">a</a><aside><div id="ftntableD-1a"><a id="tableD-1a" class="TableFootnoteRef">a<span style="mso-tab-count:1">&#160; </span></a>
82
218
  <p id="_0fe65e9a-5531-408e-8295-eeff35f41a55">Parboiled rice.</p>
83
219
  </div></aside></td>
84
- <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Balilla</td>
220
+ <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Balilla<a href="#tableD-1a" class="TableFootnoteRef">a</a></td>
85
221
  <td align="center" style="border-top:none;mso-border-top-alt:none;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Thaibonnet</td>
86
222
  </tr>
87
223
  </thead>
@@ -110,12 +246,14 @@ RSpec.describe IsoDoc do
110
246
  <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">6,06</td>
111
247
  </tr>
112
248
  </tfoot>
113
- <dl>
114
- <dt>
115
- <p>Drago</p>
116
- </dt>
117
- <dd>A type of rice</dd>
118
- </dl>
249
+ <table class="dl">
250
+ <tr>
251
+ <td valign="top" align="left">
252
+ <p style="text-align: left;">Drago</p>
253
+ </td>
254
+ <td valign="top">A type of rice</td>
255
+ </tr>
256
+ </table>
119
257
  <div id="" class="Note">
120
258
  <p class="Note">NOTE<span style="mso-tab-count:1">&#160; </span>This is a table about rice</p>
121
259
  </div>
@@ -0,0 +1,118 @@
1
+ require "spec_helper"
2
+
3
+ RSpec.describe IsoDoc do
4
+ it "processes IsoXML terms" do
5
+ expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
6
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
7
+ <sections>
8
+ <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
9
+
10
+ <term id="paddy1"><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>
24
+
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></term>
31
+
32
+ <term id="paddy"><preferred>paddy</preferred><admitted>paddy rice</admitted>
33
+ <admitted>rough rice</admitted>
34
+ <deprecates>cargo rice</deprecates>
35
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
36
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
37
+ <ul>
38
+ <li>A</li>
39
+ </ul>
40
+ </termexample>
41
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
42
+ <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>
43
+ </termnote>
44
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
45
+ <ul><li>A</li></ul>
46
+ <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>
47
+ </termnote>
48
+ <termsource status="identical">
49
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301: 2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
50
+ </termsource></term>
51
+ </terms>
52
+ </sections>
53
+ </iso-standard>
54
+ INPUT
55
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
56
+ <head>
57
+ <title>test</title>
58
+ <body lang="EN-US" link="blue" vlink="#954F72">
59
+ <div class="WordSection1">
60
+ <p>&#160;</p>
61
+ </div>
62
+ <br/>
63
+ <div class="WordSection2">
64
+ <p>&#160;</p>
65
+ </div>
66
+ <br/>
67
+ <div class="WordSection3">
68
+ <p class="zzSTDTitle1"/>
69
+ <div id="_terms_and_definitions"><h1>3.&#160; Terms and Definitions</h1><p>For the purposes of this document,
70
+ the following terms and definitions apply.</p>
71
+ <p>ISO and IEC maintain terminological databases for use in
72
+ standardization at the following addresses:</p>
73
+
74
+ <ul>
75
+ <li> <p>ISO Online browsing platform: available at
76
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
77
+ <li> <p>IEC Electropedia: available at
78
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
79
+ </p> </li> </ul>
80
+ <p class="TermNum" id="paddy1">3.1</p><p class="Terms">paddy</p>
81
+
82
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
83
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 1</td><td valign="top">
84
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
85
+ <ul>
86
+ <li>A</li>
87
+ </ul>
88
+ </td></tr></table>
89
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 2</td><td valign="top">
90
+ <ul>
91
+ <li>A</li>
92
+ </ul>
93
+ </td></tr></table>
94
+
95
+ <p>[TERMREF]
96
+ <a href="#ISO7301">ISO 7301: 2011, 3.1</a>
97
+ [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
98
+ [/TERMREF]</p><p class="TermNum" id="paddy">3.2</p><p class="Terms">paddy</p><p class="AltTerms">paddy rice</p>
99
+ <p class="AltTerms">rough rice</p>
100
+ <p class="DeprecatedTerms">DEPRECATED: cargo rice</p>
101
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
102
+ <table id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 1</td><td valign="top">
103
+ <ul>
104
+ <li>A</li>
105
+ </ul>
106
+ </td></tr></table>
107
+ <div 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>
108
+ <div 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>
109
+ <p>[TERMREF]
110
+ <a href="#ISO7301">ISO 7301: 2011, 3.1</a>
111
+ [/TERMREF]</p></div>
112
+ </div>
113
+ </body>
114
+ </head>
115
+ </html>
116
+ OUTPUT
117
+ end
118
+ end
@@ -2,7 +2,7 @@ require "spec_helper"
2
2
 
3
3
  RSpec.describe IsoDoc do
4
4
  it "cross-references notes" do
5
- expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
5
+ expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)). to be_equivalent_to <<~"OUTPUT"
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <foreword>
8
8
  <p>
@@ -19,6 +19,8 @@ RSpec.describe IsoDoc do
19
19
  <note id="N">
20
20
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
21
21
  </note>
22
+ <p><xref target="N"/></p>
23
+
22
24
  </clause>
23
25
  <terms id="terms"/>
24
26
  <clause id="widgets"><title>Widgets</title>
@@ -29,6 +31,8 @@ RSpec.describe IsoDoc do
29
31
  <note id="note2">
30
32
  <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
31
33
  </note>
34
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
35
+
32
36
  </subsection>
33
37
  </clause>
34
38
  </sections>
@@ -49,16 +53,16 @@ RSpec.describe IsoDoc do
49
53
  </annex>
50
54
  </iso-standard>
51
55
  INPUT
52
- <html xmlns:epub="http://www.idpf.org/2007/ops">
53
- <head>
54
- <title>test</title>
55
- <body lang="EN-US" link="blue" vlink="#954F72">
56
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
57
+ <head>
58
+ <title>test</title>
59
+ <body lang="EN-US" link="blue" vlink="#954F72">
56
60
  <div class="WordSection1">
57
61
  <p>&#160;</p>
58
62
  </div>
59
- <br clear="all" class="section"/>
63
+ <br/>
60
64
  <div class="WordSection2">
61
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
65
+ <br/>
62
66
  <div>
63
67
  <h1 class="ForewordTitle">Foreword</h1>
64
68
  <p>
@@ -72,16 +76,19 @@ RSpec.describe IsoDoc do
72
76
  </div>
73
77
  <p>&#160;</p>
74
78
  </div>
75
- <br clear="all" class="section"/>
79
+ <br/>
76
80
  <div class="WordSection3">
77
81
  <p class="zzSTDTitle1"/>
78
82
  <div id="scope">
79
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
83
+ <h1>1.&#160; Scope</h1>
80
84
  <div id="N" class="Note">
81
- <p class="Note">NOTE<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p>
85
+ <p class="Note">NOTE&#160; These results are based on a study carried out on three different types of kernel.</p>
82
86
  </div>
87
+ <p>
88
+ <a href="#N">Note</a>
89
+ </p>
83
90
  </div>
84
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
91
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
85
92
  <p>ISO and IEC maintain terminological databases for use in
86
93
  standardization at the following addresses:</p>
87
94
 
@@ -93,20 +100,22 @@ RSpec.describe IsoDoc do
93
100
  </p> </li> </ul>
94
101
  </div>
95
102
  <div id="widgets">
96
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
103
+ <h1>4.&#160; Widgets</h1>
97
104
  <div id="widgets1">
98
- <div id="note1" class="Note"><p class="Note">NOTE 1<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p></div>
99
- <div id="note2" class="Note"><p class="Note">NOTE 2<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p></div>
105
+ <div id="note1" class="Note"><p class="Note">NOTE 1&#160; These results are based on a study carried out on three different types of kernel.</p></div>
106
+ <div id="note2" class="Note"><p class="Note">NOTE 2&#160; These results are based on a study carried out on three different types of kernel.</p></div>
107
+ <p> <a href="#note1">Note 1</a> <a href="#note2">Note 2</a> </p>
108
+
100
109
  </div>
101
110
  </div>
102
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
111
+ <br/>
103
112
  <div id="annex1" class="Section3">
104
113
  <div id="annex1a">
105
- <div id="AN" class="Note"><p class="Note">NOTE<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p></div>
114
+ <div id="AN" class="Note"><p class="Note">NOTE&#160; These results are based on a study carried out on three different types of kernel.</p></div>
106
115
  </div>
107
116
  <div id="annex1b">
108
- <div id="Anote1" class="Note"><p class="Note">NOTE 1<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p></div>
109
- <div id="Anote2" class="Note"><p class="Note">NOTE 2<span style="mso-tab-count:1">&#160; </span>These results are based on a study carried out on three different types of kernel.</p></div>
117
+ <div id="Anote1" class="Note"><p class="Note">NOTE 1&#160; These results are based on a study carried out on three different types of kernel.</p></div>
118
+ <div id="Anote2" class="Note"><p class="Note">NOTE 2&#160; These results are based on a study carried out on three different types of kernel.</p></div>
110
119
  </div>
111
120
  </div>
112
121
  </div>
@@ -135,6 +144,7 @@ RSpec.describe IsoDoc do
135
144
  <name>Split-it-right sample divider</name>
136
145
  <image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
137
146
  </figure>
147
+ <p><xref target="N"/></p>
138
148
  </clause>
139
149
  <terms id="terms"/>
140
150
  <clause id="widgets"><title>Widgets</title>
@@ -147,6 +157,7 @@ RSpec.describe IsoDoc do
147
157
  <name>Split-it-right sample divider</name>
148
158
  <image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
149
159
  </figure>
160
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
150
161
  </subsection>
151
162
  </clause>
152
163
  </sections>
@@ -177,33 +188,36 @@ RSpec.describe IsoDoc do
177
188
  <div class="WordSection1">
178
189
  <p>&#160;</p>
179
190
  </div>
180
- <br clear="all" class="section"/>
191
+ <br/>
181
192
  <div class="WordSection2">
182
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
193
+ <br/>
183
194
  <div id="fwd">
184
195
  <h1 class="ForewordTitle">Foreword</h1>
185
196
  <p>
186
- <a href="#N">Figure 1</a>
187
- <a href="#note1">Figure 2</a>
188
- <a href="#note2">Figure 3</a>
189
- <a href="#AN">Figure A.1</a>
190
- <a href="#Anote1">Figure A.2</a>
191
- <a href="#Anote2">Figure A.3</a>
192
- </p>
197
+ <a href="#N">Figure 1</a>
198
+ <a href="#note1">Figure 2</a>
199
+ <a href="#note2">Figure 3</a>
200
+ <a href="#AN">Figure A.1</a>
201
+ <a href="#Anote1">Figure A.2</a>
202
+ <a href="#Anote2">Figure A.3</a>
203
+ </p>
193
204
  </div>
194
205
  <p>&#160;</p>
195
206
  </div>
196
- <br clear="all" class="section"/>
207
+ <br/>
197
208
  <div class="WordSection3">
198
209
  <p class="zzSTDTitle1"/>
199
210
  <div id="scope">
200
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
211
+ <h1>1.&#160; Scope</h1>
201
212
  <div id="N" class="figure">
202
213
 
203
- <img src="rice_images/rice_image1.png"/>
204
- <p class="FigureTitle" align="center"><b>Figure 1&#160;&#8212; Split-it-right sample divider</b></p></div>
214
+ <img src="rice_images/rice_image1.png"/>
215
+ <p class="FigureTitle" align="center"><b>Figure 1&#160;&#8212; Split-it-right sample divider</b></p></div>
216
+ <p>
217
+ <a href="#N">Figure 1</a>
218
+ </p>
205
219
  </div>
206
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
220
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
207
221
  <p>ISO and IEC maintain terminological databases for use in
208
222
  standardization at the following addresses:</p>
209
223
 
@@ -215,36 +229,37 @@ RSpec.describe IsoDoc do
215
229
  </p> </li> </ul>
216
230
  </div>
217
231
  <div id="widgets">
218
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
232
+ <h1>4.&#160; Widgets</h1>
219
233
  <div id="widgets1">
220
- <div id="note1" class="figure">
234
+ <div id="note1" class="figure">
221
235
 
222
- <img src="rice_images/rice_image1.png"/>
223
- <p class="FigureTitle" align="center"><b>Figure 2&#160;&#8212; Split-it-right sample divider</b></p></div>
224
- <div id="note2" class="figure">
236
+ <img src="rice_images/rice_image1.png"/>
237
+ <p class="FigureTitle" align="center"><b>Figure 2&#160;&#8212; Split-it-right sample divider</b></p></div>
238
+ <div id="note2" class="figure">
225
239
 
226
- <img src="rice_images/rice_image1.png"/>
227
- <p class="FigureTitle" align="center"><b>Figure 3&#160;&#8212; Split-it-right sample divider</b></p></div>
228
- </div>
240
+ <img src="rice_images/rice_image1.png"/>
241
+ <p class="FigureTitle" align="center"><b>Figure 3&#160;&#8212; Split-it-right sample divider</b></p></div>
242
+ <p> <a href="#note1">Figure 2</a> <a href="#note2">Figure 3</a> </p>
243
+ </div>
229
244
  </div>
230
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
245
+ <br/>
231
246
  <div id="annex1" class="Section3">
232
247
  <div id="annex1a">
233
- <div id="AN" class="figure">
248
+ <div id="AN" class="figure">
234
249
 
235
- <img src="rice_images/rice_image1.png"/>
236
- <p class="FigureTitle" align="center"><b>Figure A.1&#160;&#8212; Split-it-right sample divider</b></p></div>
237
- </div>
250
+ <img src="rice_images/rice_image1.png"/>
251
+ <p class="FigureTitle" align="center"><b>Figure A.1&#160;&#8212; Split-it-right sample divider</b></p></div>
252
+ </div>
238
253
  <div id="annex1b">
239
- <div id="Anote1" class="figure">
254
+ <div id="Anote1" class="figure">
240
255
 
241
- <img src="rice_images/rice_image1.png"/>
242
- <p class="FigureTitle" align="center"><b>Figure A.2&#160;&#8212; Split-it-right sample divider</b></p></div>
243
- <div id="Anote2" class="figure">
256
+ <img src="rice_images/rice_image1.png"/>
257
+ <p class="FigureTitle" align="center"><b>Figure A.2&#160;&#8212; Split-it-right sample divider</b></p></div>
258
+ <div id="Anote2" class="figure">
244
259
 
245
- <img src="rice_images/rice_image1.png"/>
246
- <p class="FigureTitle" align="center"><b>Figure A.3&#160;&#8212; Split-it-right sample divider</b></p></div>
247
- </div>
260
+ <img src="rice_images/rice_image1.png"/>
261
+ <p class="FigureTitle" align="center"><b>Figure A.3&#160;&#8212; Split-it-right sample divider</b></p></div>
262
+ </div>
248
263
  </div>
249
264
  </div>
250
265
  </body>
@@ -282,6 +297,7 @@ RSpec.describe IsoDoc do
282
297
  <image src="rice_images/rice_image1.png" id="_8357ede4-6d44-4672-bac4-9a85e82ab7f0" imagetype="PNG"/>
283
298
  </figure>
284
299
  </figure>
300
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
285
301
  </subsection>
286
302
  </clause>
287
303
  </sections>
@@ -310,9 +326,9 @@ RSpec.describe IsoDoc do
310
326
  <div class="WordSection1">
311
327
  <p>&#160;</p>
312
328
  </div>
313
- <br clear="all" class="section"/>
329
+ <br/>
314
330
  <div class="WordSection2">
315
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
331
+ <br/>
316
332
  <div id="fwd">
317
333
  <h1 class="ForewordTitle">Foreword</h1>
318
334
  <p>
@@ -326,13 +342,13 @@ RSpec.describe IsoDoc do
326
342
  </div>
327
343
  <p>&#160;</p>
328
344
  </div>
329
- <br clear="all" class="section"/>
345
+ <br/>
330
346
  <div class="WordSection3">
331
347
  <p class="zzSTDTitle1"/>
332
348
  <div id="scope">
333
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
349
+ <h1>1.&#160; Scope</h1>
334
350
  </div>
335
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
351
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
336
352
  <p>ISO and IEC maintain terminological databases for use in
337
353
  standardization at the following addresses:</p>
338
354
 
@@ -344,7 +360,7 @@ RSpec.describe IsoDoc do
344
360
  </p> </li> </ul>
345
361
  </div>
346
362
  <div id="widgets">
347
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
363
+ <h1>4.&#160; Widgets</h1>
348
364
  <div id="widgets1">
349
365
  <div id="N" class="figure">
350
366
  <div id="note1" class="figure">
@@ -356,9 +372,10 @@ RSpec.describe IsoDoc do
356
372
  <img src="rice_images/rice_image1.png"/>
357
373
  <p class="FigureTitle" align="center"><b>Figure 1-2&#160;&#8212; Split-it-right sample divider</b></p></div>
358
374
  </div>
375
+ <p> <a href="#note1">Figure 1-1</a> <a href="#note2">Figure 1-2</a> </p>
359
376
  </div>
360
377
  </div>
361
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
378
+ <br/>
362
379
  <div id="annex1" class="Section3">
363
380
  <div id="annex1a">
364
381
  </div>
@@ -400,6 +417,7 @@ RSpec.describe IsoDoc do
400
417
  <example id="N">
401
418
  <p>Hello</p>
402
419
  </example>
420
+ <p><xref target="N"/></p>
403
421
  </clause>
404
422
  <terms id="terms"/>
405
423
  <clause id="widgets"><title>Widgets</title>
@@ -410,6 +428,7 @@ RSpec.describe IsoDoc do
410
428
  <example id="note2">
411
429
  <p>Hello</p>
412
430
  </example>
431
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
413
432
  </subsection>
414
433
  </clause>
415
434
  </sections>
@@ -437,9 +456,9 @@ RSpec.describe IsoDoc do
437
456
  <div class="WordSection1">
438
457
  <p>&#160;</p>
439
458
  </div>
440
- <br clear="all" class="section"/>
459
+ <br/>
441
460
  <div class="WordSection2">
442
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
461
+ <br/>
443
462
  <div>
444
463
  <h1 class="ForewordTitle">Foreword</h1>
445
464
  <p>
@@ -453,11 +472,11 @@ RSpec.describe IsoDoc do
453
472
  </div>
454
473
  <p>&#160;</p>
455
474
  </div>
456
- <br clear="all" class="section"/>
475
+ <br/>
457
476
  <div class="WordSection3">
458
477
  <p class="zzSTDTitle1"/>
459
478
  <div id="scope">
460
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
479
+ <h1>1.&#160; Scope</h1>
461
480
  <table id="N" class="example">
462
481
  <tr>
463
482
  <td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE</td>
@@ -466,8 +485,11 @@ RSpec.describe IsoDoc do
466
485
  </td>
467
486
  </tr>
468
487
  </table>
488
+ <p>
489
+ <a href="#N">Example</a>
490
+ </p>
469
491
  </div>
470
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
492
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
471
493
  <p>ISO and IEC maintain terminological databases for use in
472
494
  standardization at the following addresses:</p>
473
495
 
@@ -479,7 +501,7 @@ RSpec.describe IsoDoc do
479
501
  </p> </li> </ul>
480
502
  </div>
481
503
  <div id="widgets">
482
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
504
+ <h1>4.&#160; Widgets</h1>
483
505
  <div id="widgets1">
484
506
  <table id="note1" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 1</td><td valign="top">
485
507
  <p>Hello</p>
@@ -487,9 +509,10 @@ RSpec.describe IsoDoc do
487
509
  <table id="note2" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE 2</td><td valign="top">
488
510
  <p>Hello</p>
489
511
  </td></tr></table>
512
+ <p> <a href="#note1">Example 1</a> <a href="#note2">Example 2</a> </p>
490
513
  </div>
491
514
  </div>
492
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
515
+ <br/>
493
516
  <div id="annex1" class="Section3">
494
517
  <div id="annex1a">
495
518
  <table id="AN" class="example"><tr><td width="110pt" valign="top" style="width:82.8pt;padding:.75pt .75pt .75pt .75pt">EXAMPLE</td><td valign="top">
@@ -530,6 +553,7 @@ RSpec.describe IsoDoc do
530
553
  <formula id="N">
531
554
  <stem type="AsciiMath">r = 1 %</stem>
532
555
  </formula>
556
+ <p><xref target="N"/></p>
533
557
  </clause>
534
558
  <terms id="terms"/>
535
559
  <clause id="widgets"><title>Widgets</title>
@@ -540,6 +564,7 @@ RSpec.describe IsoDoc do
540
564
  <formula id="note2">
541
565
  <stem type="AsciiMath">r = 1 %</stem>
542
566
  </formula>
567
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
543
568
  </subsection>
544
569
  </clause>
545
570
  </sections>
@@ -580,9 +605,9 @@ RSpec.describe IsoDoc do
580
605
  <div class="WordSection1">
581
606
  <p>&#160;</p>
582
607
  </div>
583
- <br clear="all" class="section"/>
608
+ <br/>
584
609
  <div class="WordSection2">
585
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
610
+ <br/>
586
611
  <div>
587
612
  <h1 class="ForewordTitle">Foreword</h1>
588
613
  <p>
@@ -596,14 +621,17 @@ RSpec.describe IsoDoc do
596
621
  </div>
597
622
  <p>&#160;</p>
598
623
  </div>
599
- <br clear="all" class="section"/>
624
+ <br/>
600
625
  <div class="WordSection3">
601
626
  <p class="zzSTDTitle1"/>
602
627
  <div id="scope">
603
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
604
- <div id="N" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(1)</div>
628
+ <h1>1.&#160; Scope</h1>
629
+ <div id="N" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (1)</div>
630
+ <p>
631
+ <a href="#N">Formula (1)</a>
632
+ </p>
605
633
  </div>
606
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
634
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
607
635
  <p>ISO and IEC maintain terminological databases for use in
608
636
  standardization at the following addresses:</p>
609
637
 
@@ -615,20 +643,21 @@ RSpec.describe IsoDoc do
615
643
  </p> </li> </ul>
616
644
  </div>
617
645
  <div id="widgets">
618
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
646
+ <h1>4.&#160; Widgets</h1>
619
647
  <div id="widgets1">
620
- <div id="note1" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(2)</div>
621
- <div id="note2" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(3)</div>
648
+ <div id="note1" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (2)</div>
649
+ <div id="note2" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (3)</div>
650
+ <p> <a href="#note1">Formula (2)</a> <a href="#note2">Formula (3)</a> </p>
622
651
  </div>
623
652
  </div>
624
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
653
+ <br/>
625
654
  <div id="annex1" class="Section3">
626
655
  <div id="annex1a">
627
- <div id="AN" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(A.1)</div>
656
+ <div id="AN" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.1)</div>
628
657
  </div>
629
658
  <div id="annex1b">
630
- <div id="Anote1" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(A.2)</div>
631
- <div id="Anote2" class="formula"><span class="stem">(#(r = 1 %)#)</span><span style="mso-tab-count:1">&#160; </span>(A.3)</div>
659
+ <div id="Anote1" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.2)</div>
660
+ <div id="Anote2" class="formula"><span class="stem">(#(r = 1 %)#)</span>&#160; (A.3)</div>
632
661
  </div>
633
662
  </div>
634
663
  </div>
@@ -663,6 +692,7 @@ RSpec.describe IsoDoc do
663
692
  </tr>
664
693
  </tbody>
665
694
  </table>
695
+ <p><xref target="N"/></p>
666
696
  </clause>
667
697
  <terms id="terms"/>
668
698
  <clause id="widgets"><title>Widgets</title>
@@ -687,6 +717,7 @@ RSpec.describe IsoDoc do
687
717
  </tr>
688
718
  </tbody>
689
719
  </table>
720
+ <p> <xref target="note1"/> <xref target="note2"/> </p>
690
721
  </subsection>
691
722
  </clause>
692
723
  </sections>
@@ -735,9 +766,9 @@ RSpec.describe IsoDoc do
735
766
  <div class="WordSection1">
736
767
  <p>&#160;</p>
737
768
  </div>
738
- <br clear="all" class="section"/>
769
+ <br/>
739
770
  <div class="WordSection2">
740
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
771
+ <br/>
741
772
  <div>
742
773
  <h1 class="ForewordTitle">Foreword</h1>
743
774
  <p>
@@ -751,29 +782,32 @@ RSpec.describe IsoDoc do
751
782
  </div>
752
783
  <p>&#160;</p>
753
784
  </div>
754
- <br clear="all" class="section"/>
785
+ <br/>
755
786
  <div class="WordSection3">
756
787
  <p class="zzSTDTitle1"/>
757
788
  <div id="scope">
758
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
789
+ <h1>1.&#160; Scope</h1>
759
790
  <p class="TableTitle" align="center">
760
791
  <b>Table 1&#160;&#8212; Repeatability and reproducibility of husked rice yield</b>
761
792
  </p>
762
793
  <table id="N" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0">
763
794
  <tbody>
764
795
  <tr>
765
- <td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td>
766
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td>
767
- <td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td>
796
+ <td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td>
797
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td>
798
+ <td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td>
768
799
  </tr>
769
800
  </tbody>
770
801
  </table>
802
+ <p>
803
+ <a href="#N">Table 1</a>
804
+ </p>
771
805
  </div>
772
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
806
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
773
807
  <p>ISO and IEC maintain terminological databases for use in
774
808
  standardization at the following addresses:</p>
775
809
 
776
- <ul>
810
+ <ul>
777
811
  <li> <p>ISO Online browsing platform: available at
778
812
  <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
779
813
  <li> <p>IEC Electropedia: available at
@@ -781,20 +815,21 @@ RSpec.describe IsoDoc do
781
815
  </p> </li> </ul>
782
816
  </div>
783
817
  <div id="widgets">
784
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Widgets</h1>
818
+ <h1>4.&#160; Widgets</h1>
785
819
  <div id="widgets1">
786
- <p class="TableTitle" align="center"><b>Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="note1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td></tr></tbody></table>
787
- <p class="TableTitle" align="center"><b>Table 3&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="note2" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td></tr></tbody></table>
820
+ <p class="TableTitle" align="center"><b>Table 2&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="note1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
821
+ <p class="TableTitle" align="center"><b>Table 3&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="note2" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
822
+ <p> <a href="#note1">Table 2</a> <a href="#note2">Table 3</a> </p>
788
823
  </div>
789
824
  </div>
790
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
825
+ <br/>
791
826
  <div id="annex1" class="Section3">
792
827
  <div id="annex1a">
793
- <p class="TableTitle" align="center"><b>Table A.1&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="AN" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td></tr></tbody></table>
828
+ <p class="TableTitle" align="center"><b>Table A.1&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="AN" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
794
829
  </div>
795
830
  <div id="annex1b">
796
- <p class="TableTitle" align="center"><b>Table A.2&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="Anote1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td></tr></tbody></table>
797
- <p class="TableTitle" align="center"><b>Table A.3&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="Anote2" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;mso-border-top-alt:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;mso-border-bottom-alt:solid windowtext 1.5pt;">11</td></tr></tbody></table>
831
+ <p class="TableTitle" align="center"><b>Table A.2&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="Anote1" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
832
+ <p class="TableTitle" align="center"><b>Table A.3&#160;&#8212; Repeatability and reproducibility of husked rice yield</b></p><table id="Anote2" class="MsoISOTable" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td align="left" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">Number of laboratories retained after eliminating outliers</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">13</td><td align="center" style="border-top:solid windowtext 1.5pt;border-bottom:solid windowtext 1.5pt;">11</td></tr></tbody></table>
798
833
  </div>
799
834
  </div>
800
835
  </div>
@@ -840,9 +875,9 @@ RSpec.describe IsoDoc do
840
875
  <div class="WordSection1">
841
876
  <p>&#160;</p>
842
877
  </div>
843
- <br clear="all" class="section"/>
878
+ <br/>
844
879
  <div class="WordSection2">
845
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
880
+ <br/>
846
881
  <div>
847
882
  <h1 class="ForewordTitle">Foreword</h1>
848
883
  <p>
@@ -853,13 +888,13 @@ RSpec.describe IsoDoc do
853
888
  </div>
854
889
  <p>&#160;</p>
855
890
  </div>
856
- <br clear="all" class="section"/>
891
+ <br/>
857
892
  <div class="WordSection3">
858
893
  <p class="zzSTDTitle1"/>
859
894
  <div id="scope">
860
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
895
+ <h1>1.&#160; Scope</h1>
861
896
  </div>
862
- <div id="terms"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document,
897
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>For the purposes of this document,
863
898
  the following terms and definitions apply.</p>
864
899
  <p>ISO and IEC maintain terminological databases for use in
865
900
  standardization at the following addresses:</p>
@@ -966,9 +1001,9 @@ RSpec.describe IsoDoc do
966
1001
  <div class="WordSection1">
967
1002
  <p>&#160;</p>
968
1003
  </div>
969
- <br clear="all" class="section"/>
1004
+ <br/>
970
1005
  <div class="WordSection2">
971
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1006
+ <br/>
972
1007
  <div>
973
1008
  <h1 class="ForewordTitle">Foreword</h1>
974
1009
  <p id="A">This is a preamble
@@ -988,9 +1023,9 @@ RSpec.describe IsoDoc do
988
1023
  <a href="#R">Clause 2</a>
989
1024
  </p>
990
1025
  </div>
991
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1026
+ <br/>
992
1027
  <div class="Section3" id="B">
993
- <h1 class="IntroTitle">0.<span style="mso-tab-count:1">&#160; </span>Introduction</h1>
1028
+ <h1 class="IntroTitle">0.&#160; Introduction</h1>
994
1029
  <div id="C">
995
1030
  <h2>0.1. Introduction Subsection</h2>
996
1031
  </div>
@@ -998,18 +1033,18 @@ RSpec.describe IsoDoc do
998
1033
  </div>
999
1034
  <p>&#160;</p>
1000
1035
  </div>
1001
- <br clear="all" class="section"/>
1036
+ <br/>
1002
1037
  <div class="WordSection3">
1003
1038
  <p class="zzSTDTitle1"/>
1004
1039
  <div id="D">
1005
- <h1>1.<span style="mso-tab-count:1">&#160; </span>Scope</h1>
1040
+ <h1>1.&#160; Scope</h1>
1006
1041
  <p id="E">Text</p>
1007
1042
  </div>
1008
1043
  <div>
1009
- <h1>2.<span style="mso-tab-count:1">&#160; </span>Normative References</h1>
1044
+ <h1>2.&#160; Normative References</h1>
1010
1045
  <p>There are no normative references in this document.</p>
1011
1046
  </div>
1012
- <div id="H"><h1>3.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document,
1047
+ <div id="H"><h1>3.&#160; Terms and Definitions</h1><p>For the purposes of this document,
1013
1048
  the following terms and definitions apply.</p>
1014
1049
  <p>ISO and IEC maintain terminological databases for use in
1015
1050
  standardization at the following addresses:</p>
@@ -1029,7 +1064,7 @@ RSpec.describe IsoDoc do
1029
1064
  <dl><dt><p>Symbol</p></dt><dd>Definition</dd></dl>
1030
1065
  </div></div>
1031
1066
  <div id="L" class="Symbols">
1032
- <h1>4.<span style="mso-tab-count:1">&#160; </span>Symbols and Abbreviated Terms</h1>
1067
+ <h1>4.&#160; Symbols and Abbreviated Terms</h1>
1033
1068
  <dl>
1034
1069
  <dt>
1035
1070
  <p>Symbol</p>
@@ -1038,7 +1073,7 @@ RSpec.describe IsoDoc do
1038
1073
  </dl>
1039
1074
  </div>
1040
1075
  <div id="M">
1041
- <h1>5.<span style="mso-tab-count:1">&#160; </span>Clause 4</h1>
1076
+ <h1>5.&#160; Clause 4</h1>
1042
1077
  <div id="N">
1043
1078
  <h2>5.1. Introduction</h2>
1044
1079
  </div>
@@ -1046,7 +1081,7 @@ RSpec.describe IsoDoc do
1046
1081
  <h2>5.2. Clause 4.2</h2>
1047
1082
  </div>
1048
1083
  </div>
1049
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1084
+ <br/>
1050
1085
  <div id="P" class="Section3">
1051
1086
  <h1 class="Annex"><b>Annex A</b><br/>(normative)<br/><br/><b>Annex</b></h1>
1052
1087
  <div id="Q">
@@ -1056,7 +1091,7 @@ RSpec.describe IsoDoc do
1056
1091
  </div>
1057
1092
  </div>
1058
1093
  </div>
1059
- <br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
1094
+ <br/>
1060
1095
  <div>
1061
1096
  <h1 class="Section3">Bibliography</h1>
1062
1097
  <div>
@@ -1067,7 +1102,348 @@ RSpec.describe IsoDoc do
1067
1102
  </body>
1068
1103
  </head>
1069
1104
  </html>
1070
- OUTPUT
1071
- end
1105
+ OUTPUT
1106
+ end
1107
+
1108
+ it "cross-references lists" do
1109
+ expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
1110
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1111
+ <foreword>
1112
+ <p>
1113
+ <xref target="N"/>
1114
+ <xref target="note1"/>
1115
+ <xref target="note2"/>
1116
+ <xref target="AN"/>
1117
+ <xref target="Anote1"/>
1118
+ <xref target="Anote2"/>
1119
+ </p>
1120
+ </foreword>
1121
+ <sections>
1122
+ <clause id="scope"><title>Scope</title>
1123
+ <ol id="N">
1124
+ <li><p>A</p></li>
1125
+ </ol>
1126
+ </clause>
1127
+ <terms id="terms"/>
1128
+ <clause id="widgets"><title>Widgets</title>
1129
+ <subsection id="widgets1">
1130
+ <ol id="note1">
1131
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1132
+ </ol>
1133
+ <ol id="note2">
1134
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1135
+ </ol>
1136
+ </subsection>
1137
+ </clause>
1138
+ </sections>
1139
+ <annex id="annex1">
1140
+ <subsection id="annex1a">
1141
+ <ol id="AN">
1142
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1143
+ </ol>
1144
+ </subsection>
1145
+ <subsection id="annex1b">
1146
+ <ol id="Anote1">
1147
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1148
+ </ol>
1149
+ <ol id="Anote2">
1150
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1151
+ </ol>
1152
+ </subsection>
1153
+ </annex>
1154
+ </iso-standard>
1155
+ INPUT
1156
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
1157
+ <head>
1158
+ <title>test</title>
1159
+ <body lang="EN-US" link="blue" vlink="#954F72">
1160
+ <div class="WordSection1">
1161
+ <p>&#160;</p>
1162
+ </div>
1163
+ <br/>
1164
+ <div class="WordSection2">
1165
+ <br/>
1166
+ <div>
1167
+ <h1 class="ForewordTitle">Foreword</h1>
1168
+ <p>
1169
+ <a href="#N">Clause 1, List</a>
1170
+ <a href="#note1">4.1, List 1</a>
1171
+ <a href="#note2">4.1, List 2</a>
1172
+ <a href="#AN">A.1, List</a>
1173
+ <a href="#Anote1">A.2, List 1</a>
1174
+ <a href="#Anote2">A.2, List 2</a>
1175
+ </p>
1176
+ </div>
1177
+ <p>&#160;</p>
1178
+ </div>
1179
+ <br/>
1180
+ <div class="WordSection3">
1181
+ <p class="zzSTDTitle1"/>
1182
+ <div id="scope">
1183
+ <h1>1.&#160; Scope</h1>
1184
+ <ol type="a">
1185
+ <li><p>A</p></li>
1186
+ </ol>
1187
+ </div>
1188
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
1189
+ <p>ISO and IEC maintain terminological databases for use in
1190
+ standardization at the following addresses:</p>
1191
+
1192
+ <ul>
1193
+ <li> <p>ISO Online browsing platform: available at
1194
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
1195
+ <li> <p>IEC Electropedia: available at
1196
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1197
+ </p> </li> </ul>
1198
+ </div>
1199
+ <div id="widgets">
1200
+ <h1>4.&#160; Widgets</h1>
1201
+ <div id="widgets1">
1202
+ <ol type="a">
1203
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1204
+ </ol>
1205
+ <ol type="a">
1206
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1207
+ </ol>
1208
+ </div>
1209
+ </div>
1210
+ <br/>
1211
+ <div id="annex1" class="Section3">
1212
+ <div id="annex1a">
1213
+ <ol type="a">
1214
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1215
+ </ol>
1216
+ </div>
1217
+ <div id="annex1b">
1218
+ <ol type="a">
1219
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f">These results are based on a study carried out on three different types of kernel.</p>
1220
+ </ol>
1221
+ <ol type="a">
1222
+ <p id="_f06fd0d1-a203-4f3d-a515-0bdba0f8d83a">These results are based on a study carried out on three different types of kernel.</p>
1223
+ </ol>
1224
+ </div>
1225
+ </div>
1226
+ </div>
1227
+ </body>
1228
+ </head>
1229
+ </html>
1230
+ OUTPUT
1231
+ end
1232
+
1233
+ it "cross-references list items" do
1234
+ expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
1235
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1236
+ <foreword>
1237
+ <p>
1238
+ <xref target="N"/>
1239
+ <xref target="note1"/>
1240
+ <xref target="note2"/>
1241
+ <xref target="AN"/>
1242
+ <xref target="Anote1"/>
1243
+ <xref target="Anote2"/>
1244
+ </p>
1245
+ </foreword>
1246
+ <sections>
1247
+ <clause id="scope"><title>Scope</title>
1248
+ <ol id="N1">
1249
+ <li id="N"><p>A</p></li>
1250
+ </ol>
1251
+ </clause>
1252
+ <terms id="terms"/>
1253
+ <clause id="widgets"><title>Widgets</title>
1254
+ <subsection id="widgets1">
1255
+ <ol id="note1l">
1256
+ <li id="note1"><p>A</p></li>
1257
+ </ol>
1258
+ <ol id="note2l">
1259
+ <li id="note2"><p>A</p></li>
1260
+ </ol>
1261
+ </subsection>
1262
+ </clause>
1263
+ </sections>
1264
+ <annex id="annex1">
1265
+ <subsection id="annex1a">
1266
+ <ol id="ANl">
1267
+ <li id="AN"><p>A</p></li>
1268
+ </ol>
1269
+ </subsection>
1270
+ <subsection id="annex1b">
1271
+ <ol id="Anote1l">
1272
+ <li id="Anote1"><p>A</p></li>
1273
+ </ol>
1274
+ <ol id="Anote2l">
1275
+ <li id="Anote2"><p>A</p></li>
1276
+ </ol>
1277
+ </subsection>
1278
+ </annex>
1279
+ </iso-standard>
1280
+ INPUT
1281
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
1282
+ <head>
1283
+ <title>test</title>
1284
+ <body lang="EN-US" link="blue" vlink="#954F72">
1285
+ <div class="WordSection1">
1286
+ <p>&#160;</p>
1287
+ </div>
1288
+ <br/>
1289
+ <div class="WordSection2">
1290
+ <br/>
1291
+ <div>
1292
+ <h1 class="ForewordTitle">Foreword</h1>
1293
+ <p>
1294
+ <a href="#N">Clause 1, a)</a>
1295
+ <a href="#note1">4.1, List 1 a)</a>
1296
+ <a href="#note2">4.1, List 2 a)</a>
1297
+ <a href="#AN">A.1, a)</a>
1298
+ <a href="#Anote1">A.2, List 1 a)</a>
1299
+ <a href="#Anote2">A.2, List 2 a)</a>
1300
+ </p>
1301
+ </div>
1302
+ <p>&#160;</p>
1303
+ </div>
1304
+ <br/>
1305
+ <div class="WordSection3">
1306
+ <p class="zzSTDTitle1"/>
1307
+ <div id="scope">
1308
+ <h1>1.&#160; Scope</h1>
1309
+ <ol type="a">
1310
+ <li><p>A</p></li>
1311
+ </ol>
1312
+ </div>
1313
+ <div id="terms"><h1>3.&#160; Terms and Definitions</h1><p>No terms and definitions are listed in this document.</p>
1314
+ <p>ISO and IEC maintain terminological databases for use in
1315
+ standardization at the following addresses:</p>
1316
+
1317
+ <ul>
1318
+ <li> <p>ISO Online browsing platform: available at
1319
+ <a href="http://www.iso.org/obp">http://www.iso.org/obp</a></p> </li>
1320
+ <li> <p>IEC Electropedia: available at
1321
+ <a href="http://www.electropedia.org">http://www.electropedia.org</a>
1322
+ </p> </li> </ul>
1323
+ </div>
1324
+ <div id="widgets">
1325
+ <h1>4.&#160; Widgets</h1>
1326
+ <div id="widgets1">
1327
+ <ol type="a">
1328
+ <li><p>A</p></li>
1329
+ </ol>
1330
+ <ol type="a">
1331
+ <li><p>A</p></li>
1332
+ </ol>
1333
+ </div>
1334
+ </div>
1335
+ <br/>
1336
+ <div id="annex1" class="Section3">
1337
+ <div id="annex1a">
1338
+ <ol type="a">
1339
+ <li><p>A</p></li>
1340
+ </ol>
1341
+ </div>
1342
+ <div id="annex1b">
1343
+ <ol type="a">
1344
+ <li><p>A</p></li>
1345
+ </ol>
1346
+ <ol type="a">
1347
+ <li><p>A</p></li>
1348
+ </ol>
1349
+ </div>
1350
+ </div>
1351
+ </div>
1352
+ </body>
1353
+ </head>
1354
+ </html>
1355
+ OUTPUT
1356
+ end
1357
+
1358
+ it "cross-references nested list items" do
1359
+ expect(IsoDoc::Convert.new({}).convert_file(<<~"INPUT", "test", true)).to be_equivalent_to <<~"OUTPUT"
1360
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
1361
+ <foreword>
1362
+ <p>
1363
+ <xref target="N"/>
1364
+ <xref target="note1"/>
1365
+ <xref target="note2"/>
1366
+ <xref target="AN"/>
1367
+ <xref target="Anote1"/>
1368
+ <xref target="Anote2"/>
1369
+ </p>
1370
+ </foreword>
1371
+ <sections>
1372
+ <clause id="scope"><title>Scope</title>
1373
+ <ol id="N1">
1374
+ <li id="N"><p>A</p>
1375
+ <ol>
1376
+ <li id="note1"><p>A</p>
1377
+ <ol>
1378
+ <li id="note2"><p>A</p>
1379
+ <ol>
1380
+ <li id="AN"><p>A</p>
1381
+ <ol>
1382
+ <li id="Anote1"><p>A</p>
1383
+ <ol>
1384
+ <li id="Anote2"><p>A</p></li>
1385
+ </ol></li>
1386
+ </ol></li>
1387
+ </ol></li>
1388
+ </ol></li>
1389
+ </ol></li>
1390
+ </ol>
1391
+ </clause>
1392
+ </sections>
1393
+ </iso-standard>
1394
+ INPUT
1395
+ <html xmlns:epub="http://www.idpf.org/2007/ops">
1396
+ <head>
1397
+ <title>test</title>
1398
+ <body lang="EN-US" link="blue" vlink="#954F72">
1399
+ <div class="WordSection1">
1400
+ <p>&#160;</p>
1401
+ </div>
1402
+ <br/>
1403
+ <div class="WordSection2">
1404
+ <br/>
1405
+ <div>
1406
+ <h1 class="ForewordTitle">Foreword</h1>
1407
+ <p>
1408
+ <a href="#N">Clause 1, a)</a>
1409
+ <a href="#note1">Clause 1, a.1)</a>
1410
+ <a href="#note2">Clause 1, a.1.i)</a>
1411
+ <a href="#AN">Clause 1, a.1.i.A)</a>
1412
+ <a href="#Anote1">Clause 1, a.1.i.A.I)</a>
1413
+ <a href="#Anote2">Clause 1, a.1.i.A.I.a)</a>
1414
+ </p>
1415
+ </div>
1416
+ <p>&#160;</p>
1417
+ </div>
1418
+ <br/>
1419
+ <div class="WordSection3">
1420
+ <p class="zzSTDTitle1"/>
1421
+ <div id="scope">
1422
+ <h1>1.&#160; Scope</h1>
1423
+ <ol type="a">
1424
+ <li><p>A</p>
1425
+ <ol type="1">
1426
+ <li><p>A</p>
1427
+ <ol type="i">
1428
+ <li><p>A</p>
1429
+ <ol type="A">
1430
+ <li><p>A</p>
1431
+ <ol type="I">
1432
+ <li><p>A</p>
1433
+ <ol type="a">
1434
+ <li><p>A</p></li>
1435
+ </ol></li>
1436
+ </ol></li>
1437
+ </ol></li>
1438
+ </ol></li>
1439
+ </ol></li>
1440
+ </ol>
1441
+ </div>
1442
+ </div>
1443
+ </body>
1444
+ </head>
1445
+ </html>
1446
+ OUTPUT
1447
+ end
1072
1448
 
1073
1449
  end