isodoc 1.5.5 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,266 +3,262 @@ require "spec_helper"
3
3
  RSpec.describe IsoDoc do
4
4
  it "processes IsoXML terms" do
5
5
  input = <<~"INPUT"
6
- <iso-standard xmlns="http://riboseinc.com/isoxml">
7
- <sections>
8
- <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
9
- <p>For the purposes of this document, the following terms and definitions apply.</p>
10
-
11
- <term id="paddy1"><preferred>paddy</preferred>
12
- <domain>rice</domain>
13
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
14
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" keep-with-next="true" keep-lines-together="true">
15
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
16
- <ul>
17
- <li>A</li>
18
- </ul>
19
- </termexample>
20
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
21
- <ul>
22
- <li>A</li>
23
- </ul>
24
- </termexample>
25
-
26
- <termsource status="modified">
27
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
28
- <modification>
29
- <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>
30
- </modification>
31
- </termsource>
32
-
33
- <termsource status='identical'>
34
- <origin citeas=''>
35
- <termref base='IEV' target='xyz'>t1</termref>
36
- </origin>
37
- </termsource>
38
-
39
- <termsource status='modified'>
40
- <origin citeas=''>
41
- <termref base='IEV' target='xyz'/>
42
- </origin>
43
- <modification>
44
- <p id='_'>with adjustments</p>
45
- </modification>
46
- </termsource>
47
-
48
-
49
-
50
- </term>
51
-
52
- <term id="paddy"><preferred>paddy</preferred><admitted>paddy rice</admitted>
53
- <admitted>rough rice</admitted>
54
- <deprecates>cargo rice</deprecates>
55
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
56
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
57
- <ul>
58
- <li>A</li>
59
- </ul>
60
- </termexample>
61
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e" keep-with-next="true" keep-lines-together="true">
62
- <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>
63
- </termnote>
64
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
65
- <ul><li>A</li></ul>
66
- <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>
67
- </termnote>
68
- <termsource status="identical">
69
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
70
- </termsource></term>
71
- </terms>
72
- </sections>
73
- </iso-standard>
6
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
7
+ <sections>
8
+ <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
9
+ <p>For the purposes of this document, the following terms and definitions apply.</p>
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" keep-with-next="true" keep-lines-together="true">
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
+ <termsource status="modified">
25
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
26
+ <modification>
27
+ <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>
28
+ </modification>
29
+ </termsource>
30
+ <termsource status='identical'>
31
+ <origin citeas=''>
32
+ <termref base='IEV' target='xyz'>t1</termref>
33
+ </origin>
34
+ </termsource>
35
+ <termsource status='modified'>
36
+ <origin citeas=''>
37
+ <termref base='IEV' target='xyz'/>
38
+ </origin>
39
+ <modification>
40
+ <p id='_'>with adjustments</p>
41
+ </modification>
42
+ </termsource>
43
+ </term>
44
+ <term id="paddy"><preferred>paddy</preferred><admitted>paddy rice</admitted>
45
+ <admitted>rough rice</admitted>
46
+ <deprecates>cargo rice</deprecates>
47
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
48
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
49
+ <ul>
50
+ <li>A</li>
51
+ </ul>
52
+ </termexample>
53
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e" keep-with-next="true" keep-lines-together="true">
54
+ <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>
55
+ </termnote>
56
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
57
+ <ul><li>A</li></ul>
58
+ <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>
59
+ </termnote>
60
+ <termsource status="identical">
61
+ <origin bibitemid="ISO7301" type="inline" droploc="true" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
62
+ <origin bibitemid="ISO7301" type="inline" case="lowercase" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
63
+ </termsource></term>
64
+ </terms>
65
+ </sections>
66
+ </iso-standard>
74
67
  INPUT
75
68
 
76
69
  presxml = <<~"PRESXML"
77
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
78
- <sections>
79
- <terms id='_terms_and_definitions' obligation='normative'>
80
- <title depth='1'>
81
- 1.
82
- <tab/>
83
- Terms and Definitions
84
- </title>
85
- <p>For the purposes of this document, the following terms and definitions apply.</p>
86
- <term id='paddy1'><name>1.1.</name>
87
- <preferred>paddy</preferred>
88
- <domain>rice</domain>
89
- <definition>
90
- <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
91
- </definition>
92
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f892' keep-with-next='true' keep-lines-together='true'>
93
- <name>EXAMPLE 1</name>
94
- <p id='_65c9a509-9a89-4b54-a890-274126aeb55c'>Foreign seeds, husks, bran, sand, dust.</p>
95
- <ul>
96
- <li>A</li>
97
- </ul>
98
- </termexample>
99
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f894'>
100
- <name>EXAMPLE 2</name>
101
- <ul>
102
- <li>A</li>
103
- </ul>
104
- </termexample>
105
- <termsource status='modified'>
106
- <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'>
107
- <referenceFrom>3.1</referenceFrom>
108
- </locality>ISO 7301:2011, Clause 3.1</origin>
109
- <modification>
110
- <p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>
111
- The term "cargo rice" is shown as deprecated, and Note 1 to entry
112
- is not included here
113
- </p>
114
- </modification>
115
- </termsource>
116
- <termsource status='identical'>
117
- <origin citeas=''>
118
- <termref base='IEV' target='xyz'>t1</termref>
119
- </origin>
120
- </termsource>
121
- <termsource status='modified'>
122
- <origin citeas=''>
123
- <termref base='IEV' target='xyz'/>
124
- </origin>
125
- <modification>
126
- <p id='_'>with adjustments</p>
127
- </modification>
128
- </termsource>
129
- </term>
130
- <term id='paddy'><name>1.2.</name>
131
- <preferred>paddy</preferred>
132
- <admitted>paddy rice</admitted>
133
- <admitted>rough rice</admitted>
134
- <deprecates>cargo rice</deprecates>
135
- <definition>
136
- <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
137
- </definition>
138
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f893'>
139
- <name>EXAMPLE</name>
140
- <ul>
141
- <li>A</li>
142
- </ul>
143
- </termexample>
144
- <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e' keep-with-next='true' keep-lines-together='true'>
145
- <name>Note 1 to entry</name>
146
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
147
- The starch of waxy rice consists almost entirely of amylopectin. The
148
- kernels have a tendency to stick together after cooking.
149
- </p>
150
- </termnote>
151
- <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74f'>
152
- <name>Note 2 to entry</name>
153
- <ul>
154
- <li>A</li>
155
- </ul>
156
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
157
- The starch of waxy rice consists almost entirely of amylopectin. The
158
- kernels have a tendency to stick together after cooking.
159
- </p>
160
- </termnote>
161
- <termsource status='identical'>
162
- <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'>
163
- <referenceFrom>3.1</referenceFrom>
164
- </locality>ISO 7301:2011, Clause 3.1</origin>
165
- </termsource>
166
- </term>
167
- </terms>
168
- </sections>
169
- </iso-standard>
170
- PRESXML
171
-
172
- html = <<~"OUTPUT"
173
- #{HTML_HDR}
174
- <p class="zzSTDTitle1"/>
175
- <div id="_terms_and_definitions">
176
- <h1> 1. &#160; Terms and Definitions </h1>
177
- <p>For the purposes of this document,
178
- the following terms and definitions apply.</p>
179
- <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
180
-
181
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
182
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" style='page-break-after: avoid;page-break-inside: avoid;'><p class="example-title">EXAMPLE 1</p>
183
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
184
- <ul>
185
- <li>A</li>
186
- </ul>
187
- </div>
188
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
189
- <ul>
190
- <li>A</li>
191
- </ul>
192
- </div>
193
-
194
- <p>[TERMREF]
195
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
196
- [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
197
- [/TERMREF]</p>
198
- <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
199
- <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
200
- <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
201
- <p class="AltTerms" style="text-align:left;">rough rice</p>
202
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
203
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
204
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
205
- <ul>
206
- <li>A</li>
207
- </ul>
208
- </div>
209
- <div class="Note" id='_671a1994-4783-40d0-bc81-987d06ffb74e' style='page-break-after: avoid;page-break-inside: avoid;'><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
210
- <div class="Note" id='_671a1994-4783-40d0-bc81-987d06ffb74f'><p>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>
211
- <p>[TERMREF]
212
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
213
- [/TERMREF]</p></div>
214
- </div>
215
- </body>
216
- </html>
217
- OUTPUT
218
-
219
- word = <<~"WORD"
220
- #{WORD_HDR}
221
- <p class="zzSTDTitle1"/>
222
- <div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document,
223
- the following terms and definitions apply.</p>
224
- <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
225
-
226
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
227
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" style='page-break-after: avoid;page-break-inside: avoid;'><p class="example-title">EXAMPLE 1</p>
228
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
229
- <ul>
230
- <li>A</li>
231
- </ul>
232
- </div>
233
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
234
- <ul>
235
- <li>A</li>
236
- </ul>
237
- </div>
70
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
71
+ <sections>
72
+ <terms id='_terms_and_definitions' obligation='normative'>
73
+ <title depth='1'>
74
+ 1.
75
+ <tab/>
76
+ Terms and Definitions
77
+ </title>
78
+ <p>For the purposes of this document, the following terms and definitions apply.</p>
79
+ <term id='paddy1'><name>1.1.</name>
80
+ <preferred>paddy</preferred>
81
+ <domain>rice</domain>
82
+ <definition>
83
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
84
+ </definition>
85
+ <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f892' keep-with-next='true' keep-lines-together='true'>
86
+ <name>EXAMPLE 1</name>
87
+ <p id='_65c9a509-9a89-4b54-a890-274126aeb55c'>Foreign seeds, husks, bran, sand, dust.</p>
88
+ <ul>
89
+ <li>A</li>
90
+ </ul>
91
+ </termexample>
92
+ <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f894'>
93
+ <name>EXAMPLE 2</name>
94
+ <ul>
95
+ <li>A</li>
96
+ </ul>
97
+ </termexample>
98
+ <termsource status='modified'>
99
+ <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'>
100
+ <referenceFrom>3.1</referenceFrom>
101
+ </locality>ISO 7301:2011, Clause 3.1</origin>
102
+ <modification>
103
+ <p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>
104
+ The term "cargo rice" is shown as deprecated, and Note 1 to entry
105
+ is not included here
106
+ </p>
107
+ </modification>
108
+ </termsource>
109
+ <termsource status='identical'>
110
+ <origin citeas=''>
111
+ <termref base='IEV' target='xyz'>t1</termref>
112
+ </origin>
113
+ </termsource>
114
+ <termsource status='modified'>
115
+ <origin citeas=''>
116
+ <termref base='IEV' target='xyz'/>
117
+ </origin>
118
+ <modification>
119
+ <p id='_'>with adjustments</p>
120
+ </modification>
121
+ </termsource>
122
+ </term>
123
+ <term id='paddy'><name>1.2.</name>
124
+ <preferred>paddy</preferred>
125
+ <admitted>paddy rice</admitted>
126
+ <admitted>rough rice</admitted>
127
+ <deprecates>cargo rice</deprecates>
128
+ <definition>
129
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
130
+ </definition>
131
+ <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f893'>
132
+ <name>EXAMPLE</name>
133
+ <ul>
134
+ <li>A</li>
135
+ </ul>
136
+ </termexample>
137
+ <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e' keep-with-next='true' keep-lines-together='true'>
138
+ <name>Note 1 to entry</name>
139
+ <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
140
+ The starch of waxy rice consists almost entirely of amylopectin. The
141
+ kernels have a tendency to stick together after cooking.
142
+ </p>
143
+ </termnote>
144
+ <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74f'>
145
+ <name>Note 2 to entry</name>
146
+ <ul>
147
+ <li>A</li>
148
+ </ul>
149
+ <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
150
+ The starch of waxy rice consists almost entirely of amylopectin. The
151
+ kernels have a tendency to stick together after cooking.
152
+ </p>
153
+ </termnote>
154
+ <termsource status='identical'>
155
+ <origin bibitemid='ISO7301' type='inline' droploc='true' citeas='ISO 7301:2011'><locality type='clause'>
156
+ <referenceFrom>3.1</referenceFrom>
157
+ </locality>ISO 7301:2011, 3.1</origin>
158
+ <origin bibitemid='ISO7301' type='inline' case='lowercase' citeas='ISO 7301:2011'><locality type='clause'>
159
+ <referenceFrom>3.1</referenceFrom>
160
+ </locality>ISO 7301:2011, clause 3.1</origin>
161
+ </termsource>
162
+ </term>
163
+ </terms>
164
+ </sections>
165
+ </iso-standard>
166
+ PRESXML
238
167
 
239
- <p>[TERMREF]
240
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
241
- [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
242
- [/TERMREF]</p>
243
- <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
244
- <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
245
- <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
246
- <p class="AltTerms" style="text-align:left;">rough rice</p>
247
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
248
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
249
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
250
- <ul>
251
- <li>A</li>
252
- </ul>
253
- </div>
254
- <div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note" style='page-break-after: avoid;page-break-inside: avoid;'><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>
255
- <div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
256
- <p>[TERMREF]
257
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
258
- [/TERMREF]</p></div>
259
- </div>
260
- </body>
261
- </html>
168
+ html = <<~"OUTPUT"
169
+ #{HTML_HDR}
170
+ <p class="zzSTDTitle1"/>
171
+ <div id="_terms_and_definitions">
172
+ <h1> 1. &#160; Terms and Definitions </h1>
173
+ <p>For the purposes of this document,
174
+ the following terms and definitions apply.</p>
175
+ <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
176
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
177
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" style='page-break-after: avoid;page-break-inside: avoid;'><p class="example-title">EXAMPLE 1</p>
178
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
179
+ <ul>
180
+ <li>A</li>
181
+ </ul>
182
+ </div>
183
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
184
+ <ul>
185
+ <li>A</li>
186
+ </ul>
187
+ </div>
188
+ <p>[TERMREF]
189
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
190
+ [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
191
+ [/TERMREF]</p>
192
+ <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
193
+ <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
194
+ <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
195
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
196
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
197
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
198
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
199
+ <ul>
200
+ <li>A</li>
201
+ </ul>
202
+ </div>
203
+ <div class="Note" id='_671a1994-4783-40d0-bc81-987d06ffb74e' style='page-break-after: avoid;page-break-inside: avoid;'><p>Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div>
204
+ <div class="Note" id='_671a1994-4783-40d0-bc81-987d06ffb74f'><p>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>
205
+ <p>[TERMREF]
206
+ <a href='#ISO7301'>ISO 7301:2011, 3.1</a>
207
+ <a href='#ISO7301'>ISO 7301:2011, clause 3.1</a>
208
+ [/TERMREF]</p></div>
209
+ </div>
210
+ </body>
211
+ </html>
212
+ OUTPUT
262
213
 
263
- WORD
264
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
265
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
266
- expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(word)
214
+ word = <<~"WORD"
215
+ #{WORD_HDR}
216
+ <p class="zzSTDTitle1"/>
217
+ <div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">&#160; </span>Terms and Definitions</h1><p>For the purposes of this document,
218
+ the following terms and definitions apply.</p>
219
+ <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
220
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
221
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example" style='page-break-after: avoid;page-break-inside: avoid;'><p class="example-title">EXAMPLE 1</p>
222
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
223
+ <ul>
224
+ <li>A</li>
225
+ </ul>
226
+ </div>
227
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
228
+ <ul>
229
+ <li>A</li>
230
+ </ul>
231
+ </div>
232
+ <p>[TERMREF]
233
+ <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
234
+ [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
235
+ [/TERMREF]</p>
236
+ <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
237
+ <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
238
+ <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
239
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
240
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
241
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
242
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
243
+ <ul>
244
+ <li>A</li>
245
+ </ul>
246
+ </div>
247
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74e' class="Note" style='page-break-after: avoid;page-break-inside: avoid;'><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>
248
+ <div id='_671a1994-4783-40d0-bc81-987d06ffb74f' class="Note"><p class="Note">Note 2 to entry: <ul><li>A</li></ul><p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></p></div>
249
+ <p>[TERMREF]
250
+ <a href='#ISO7301'>ISO 7301:2011, 3.1</a>
251
+ <a href='#ISO7301'>ISO 7301:2011, clause 3.1</a>
252
+ [/TERMREF]</p></div>
253
+ </div>
254
+ </body>
255
+ </html>
256
+ WORD
257
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
258
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
259
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
260
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
261
+ expect(xmlpp(IsoDoc::WordConvert.new({})
262
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(word)
267
263
  end
268
264
  end