isodoc 1.8.1 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,6 +8,8 @@ RSpec.describe IsoDoc do
8
8
  <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
9
9
  <p>For the purposes of this document, the following terms and definitions apply.</p>
10
10
  <term id="paddy1"><preferred><expression><name>paddy</name></expression>
11
+ <field-of-application>in agriculture</field-of-application>
12
+ <usage-info>dated</usage-info>
11
13
  <termsource status="modified">
12
14
  <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
13
15
  <modification>
@@ -16,7 +18,7 @@ RSpec.describe IsoDoc do
16
18
  </termsource>
17
19
  </preferred>
18
20
  <domain>rice</domain>
19
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
21
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
20
22
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" keep-with-next="true" keep-lines-together="true">
21
23
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
22
24
  <ul>
@@ -32,6 +34,9 @@ RSpec.describe IsoDoc do
32
34
  <origin citeas=''>
33
35
  <termref base='IEV' target='xyz'>t1</termref>
34
36
  </origin>
37
+ <modification>
38
+ <p id='_'/>
39
+ </modification>
35
40
  </termsource>
36
41
  <termsource status='modified'>
37
42
  <origin citeas=''>
@@ -43,10 +48,12 @@ RSpec.describe IsoDoc do
43
48
  </termsource>
44
49
  </term>
45
50
  <term id="paddy"><preferred><expression><name>paddy</name></expression></preferred>
46
- <admitted><letter-symbol><name>paddy rice</name></letter-symbol></admitted>
51
+ <admitted><letter-symbol><name>paddy rice</name></letter-symbol>
52
+ <field-of-application>in agriculture</field-of-application>
53
+ </admitted>
47
54
  <admitted><expression><name>rough rice</name></expression></admitted>
48
55
  <deprecates><expression><name>cargo rice</name></expression></deprecates>
49
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
56
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
50
57
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
51
58
  <ul>
52
59
  <li>A</li>
@@ -69,192 +76,148 @@ RSpec.describe IsoDoc do
69
76
  INPUT
70
77
 
71
78
  presxml = <<~"PRESXML"
72
- <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
73
- <sections>
74
- <terms id='_terms_and_definitions' obligation='normative' displayorder="1">
75
- <title depth='1'>
76
- 1.
77
- <tab/>
78
- Terms and Definitions
79
- </title>
80
- <p>For the purposes of this document, the following terms and definitions apply.</p>
81
- <term id='paddy1'><name>1.1.</name>
82
- <preferred>paddy</preferred>
83
- <termsource status='modified'>
84
- <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'><locality type='clause'>
85
- <referenceFrom>3.1</referenceFrom>
86
- </locality>ISO 7301:2011, Clause 3.1</origin>
87
- <modification>
88
- <p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>
89
- The term "cargo rice" is shown as deprecated, and Note 1 to entry
90
- is not included here
91
- </p>
92
- </modification>
93
- </termsource>
94
- <domain>rice</domain>
95
- <definition>
96
- <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
97
- </definition>
98
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f892' keep-with-next='true' keep-lines-together='true'>
99
- <name>EXAMPLE 1</name>
100
- <p id='_65c9a509-9a89-4b54-a890-274126aeb55c'>Foreign seeds, husks, bran, sand, dust.</p>
101
- <ul>
102
- <li>A</li>
103
- </ul>
104
- </termexample>
105
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f894'>
106
- <name>EXAMPLE 2</name>
107
- <ul>
108
- <li>A</li>
109
- </ul>
110
- </termexample>
111
- <termsource status='identical'>
112
- <origin citeas=''>
113
- <termref base='IEV' target='xyz'>t1</termref>
114
- </origin>
115
- </termsource>
116
- <termsource status='modified'>
117
- <origin citeas=''>
118
- <termref base='IEV' target='xyz'/>
119
- </origin>
120
- <modification>
121
- <p id='_'>with adjustments</p>
122
- </modification>
123
- </termsource>
124
- </term>
125
- <term id='paddy'><name>1.2.</name>
126
- <preferred>paddy</preferred>
127
- <admitted>paddy rice</admitted>
128
- <admitted>rough rice</admitted>
129
- <deprecates>cargo rice</deprecates>
130
- <definition>
131
- <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
132
- </definition>
133
- <termexample id='_bd57bbf1-f948-4bae-b0ce-73c00431f893'>
134
- <name>EXAMPLE</name>
135
- <ul>
136
- <li>A</li>
137
- </ul>
138
- </termexample>
139
- <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74e' keep-with-next='true' keep-lines-together='true'>
140
- <name>Note 1 to entry</name>
141
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
142
- The starch of waxy rice consists almost entirely of amylopectin. The
143
- kernels have a tendency to stick together after cooking.
144
- </p>
145
- </termnote>
146
- <termnote id='_671a1994-4783-40d0-bc81-987d06ffb74f'>
147
- <name>Note 2 to entry</name>
148
- <ul>
149
- <li>A</li>
150
- </ul>
151
- <p id='_19830f33-e46c-42cc-94ca-a5ef101132d5'>
152
- The starch of waxy rice consists almost entirely of amylopectin. The
153
- kernels have a tendency to stick together after cooking.
154
- </p>
155
- </termnote>
156
- <termsource status='identical'>
157
- <origin bibitemid='ISO7301' type='inline' droploc='true' citeas='ISO 7301:2011'><locality type='clause'>
158
- <referenceFrom>3.1</referenceFrom>
159
- </locality>ISO 7301:2011, 3.1</origin>
160
- <origin bibitemid='ISO7301' type='inline' case='lowercase' citeas='ISO 7301:2011'><locality type='clause'>
161
- <referenceFrom>3.1</referenceFrom>
162
- </locality>ISO 7301:2011, clause 3.1</origin>
163
- </termsource>
164
- </term>
165
- </terms>
166
- </sections>
167
- </iso-standard>
79
+ <?xml version='1.0'?>
80
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
81
+ <sections>
82
+ <terms id="_terms_and_definitions" obligation="normative" displayorder="1"><title depth="1">1.<tab/>Terms and Definitions</title>
83
+ <p>For the purposes of this document, the following terms and definitions apply.</p>
84
+ <term id="paddy1"><name>1.1.</name><preferred><strong>paddy</strong>, &#x3c;in agriculture, dated&#x3e;</preferred><termsource status="modified">[SOURCE: <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause">
85
+ <referenceFrom>3.1</referenceFrom>
86
+ </locality>ISO 7301:2011, Clause 3.1</origin>, modified
87
+ &#x2013;
88
+ The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</termsource>
89
+ <domain>rice</domain>
90
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
91
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" keep-with-next="true" keep-lines-together="true"><name>EXAMPLE 1</name>
92
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
93
+ <ul>
94
+ <li>A</li>
95
+ </ul>
96
+ </termexample>
97
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894"><name>EXAMPLE 2</name>
98
+ <ul>
99
+ <li>A</li>
100
+ </ul>
101
+ </termexample>
102
+ <termsource status="identical">[SOURCE: <origin citeas="">
103
+ <termref base="IEV" target="xyz">t1</termref>
104
+ </origin>, modified]</termsource>;
105
+ <termsource status="modified">[SOURCE: <origin citeas="">
106
+ <termref base="IEV" target="xyz"/>
107
+ </origin>, modified
108
+ &#x2013;
109
+ with adjustments]</termsource>
110
+ </term>
111
+ <term id="paddy"><name>1.2.</name><preferred><strong>paddy</strong></preferred>
112
+ <admitted>paddy rice, &#x3c;in agriculture&#x3e;</admitted>
113
+ <admitted>rough rice</admitted>
114
+ <deprecates>cargo rice</deprecates>
115
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
116
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893"><name>EXAMPLE</name>
117
+ <ul>
118
+ <li>A</li>
119
+ </ul>
120
+ </termexample>
121
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e" keep-with-next="true" keep-lines-together="true"><name>Note 1 to entry</name>
122
+ <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>
123
+ </termnote>
124
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f"><name>Note 2 to entry</name>
125
+ <ul><li>A</li></ul>
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
+ <termsource status="identical">[SOURCE: <origin bibitemid="ISO7301" type="inline" droploc="true" citeas="ISO 7301:2011"><locality type="clause">
129
+ <referenceFrom>3.1</referenceFrom>
130
+ </locality>ISO 7301:2011, 3.1</origin>
131
+ <origin bibitemid="ISO7301" type="inline" case="lowercase" citeas="ISO 7301:2011"><locality type="clause">
132
+ <referenceFrom>3.1</referenceFrom>
133
+ </locality>ISO 7301:2011, clause 3.1</origin>]</termsource></term>
134
+ </terms>
135
+ </sections>
136
+ </iso-standard>
168
137
  PRESXML
169
138
 
170
139
  html = <<~"OUTPUT"
171
140
  #{HTML_HDR}
172
- <p class="zzSTDTitle1"/>
173
- <div id="_terms_and_definitions">
174
- <h1> 1. &#160; Terms and Definitions </h1>
175
- <p>For the purposes of this document,
176
- the following terms and definitions apply.</p>
177
- <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
178
- <p>[TERMREF]
179
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
180
- [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
181
- [/TERMREF]</p>
182
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
183
- <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>
184
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
185
- <ul>
186
- <li>A</li>
187
- </ul>
188
- </div>
189
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
190
- <ul>
191
- <li>A</li>
192
- </ul>
193
- </div>
194
- <p>[TERMREF] t1 [/TERMREF]</p>
195
- <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
196
- <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>
197
- <p class="AltTerms" style="text-align:left;">rough rice</p>
198
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
199
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
200
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
201
- <ul>
202
- <li>A</li>
203
- </ul>
204
- </div>
205
- <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>
206
- <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>
207
- <p>[TERMREF]
208
- <a href='#ISO7301'>ISO 7301:2011, 3.1</a>
209
- <a href='#ISO7301'>ISO 7301:2011, clause 3.1</a>
210
- [/TERMREF]</p></div>
211
- </div>
212
- </body>
213
- </html>
141
+ <p class="zzSTDTitle1"/>
142
+ <div id="_terms_and_definitions"><h1>1.&#160; Terms and Definitions</h1><p>For the purposes of this document, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
143
+ &#8211;
144
+ The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
145
+
146
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
147
+ <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>
148
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
149
+ <ul>
150
+ <li>A</li>
151
+ </ul>
152
+ </div>
153
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
154
+ <ul>
155
+ <li>A</li>
156
+ </ul>
157
+ </div>
158
+ <p>[SOURCE: t1, modified]</p>;
159
+ <p>[SOURCE: Termbase IEV, term ID xyz, modified
160
+ &#8211;
161
+ with adjustments]</p>
162
+ <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;"><b>paddy</b></p>
163
+ <p class="AltTerms" style="text-align:left;">paddy rice, &lt;in agriculture&gt;</p>
164
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
165
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
166
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
167
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
168
+ <ul>
169
+ <li>A</li>
170
+ </ul>
171
+ </div>
172
+ <div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note" 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>
173
+ <div id="_671a1994-4783-40d0-bc81-987d06ffb74f" class="Note"><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>
174
+ <p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>
175
+ <a href="#ISO7301">ISO 7301:2011, clause 3.1</a>]</p></div>
176
+ </div>
177
+ </body>
178
+ </html>
214
179
  OUTPUT
215
180
 
216
181
  word = <<~"WORD"
217
182
  #{WORD_HDR}
218
- <p class="zzSTDTitle1"/>
219
- <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,
220
- the following terms and definitions apply.</p>
221
- <p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;">paddy</p>
222
- <p>[TERMREF]
223
- <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
224
- [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
225
- [/TERMREF]</p>
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>
238
- <p>[TERMREF] t1 [/TERMREF]</p>
239
- <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
240
- <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>
241
- <p class="AltTerms" style="text-align:left;">rough rice</p>
242
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
243
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
244
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
245
- <ul>
246
- <li>A</li>
247
- </ul>
248
- </div>
249
- <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>
250
- <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>
251
- <p>[TERMREF]
252
- <a href='#ISO7301'>ISO 7301:2011, 3.1</a>
253
- <a href='#ISO7301'>ISO 7301:2011, clause 3.1</a>
254
- [/TERMREF]</p></div>
255
- </div>
256
- </body>
257
- </html>
183
+ <p class="zzSTDTitle1"/>
184
+ <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, the following terms and definitions apply.</p><p class="TermNum" id="paddy1">1.1.</p><p class="Terms" style="text-align:left;"><b>paddy</b>, &lt;in agriculture, dated&gt;</p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
185
+ &#8211;
186
+ The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p>
187
+
188
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
189
+ <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>
190
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
191
+ <ul>
192
+ <li>A</li>
193
+ </ul>
194
+ </div>
195
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p class="example-title">EXAMPLE 2</p>
196
+ <ul>
197
+ <li>A</li>
198
+ </ul>
199
+ </div>
200
+ <p>[SOURCE: t1, modified]</p>;
201
+ <p>[SOURCE: Termbase IEV, term ID xyz, modified
202
+ &#8211;
203
+ with adjustments]</p>
204
+ <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;"><b>paddy</b></p>
205
+ <p class="AltTerms" style="text-align:left;">paddy rice, &lt;in agriculture&gt;</p>
206
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
207
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
208
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
209
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p class="example-title">EXAMPLE</p>
210
+ <ul>
211
+ <li>A</li>
212
+ </ul>
213
+ </div>
214
+ <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>
215
+ <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>
216
+ <p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, 3.1</a>
217
+ <a href="#ISO7301">ISO 7301:2011, clause 3.1</a>]</p></div>
218
+ </div>
219
+ </body>
220
+ </html>
258
221
  WORD
259
222
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
260
223
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
@@ -272,15 +235,15 @@ RSpec.describe IsoDoc do
272
235
  <p>For the purposes of this document, the following terms and definitions apply.</p>
273
236
  <term id="paddy1"><preferred><expression><name>paddy</name></expression></preferred>
274
237
  <domain>rice</domain>
275
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
276
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747e">rice retaining its husk after threshing, mark 2</p>
238
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
239
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747e">rice retaining its husk after threshing, mark 2</p>
277
240
  <termsource status="modified">
278
241
  <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality></origin>
279
242
  <modification>
280
243
  <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>
281
244
  </modification>
282
245
  </termsource>
283
- </verbaldefinition>
246
+ </verbal-definition>
284
247
  </definition>
285
248
  <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" keep-with-next="true" keep-lines-together="true">
286
249
  <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
@@ -320,7 +283,7 @@ RSpec.describe IsoDoc do
320
283
  <p>For the purposes of this document, the following terms and definitions apply.</p>
321
284
  <term id='paddy1'>
322
285
  <name>1.1.</name>
323
- <preferred>paddy</preferred>
286
+ <preferred><strong>paddy</strong></preferred>
324
287
  <domain>rice</domain>
325
288
  <definition>
326
289
  <ol>
@@ -329,19 +292,15 @@ RSpec.describe IsoDoc do
329
292
  </li>
330
293
  <li>
331
294
  <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747e'>rice retaining its husk after threshing, mark 2</p>
332
- <termsource status='modified'>
295
+ <termsource status='modified'>[SOURCE:
333
296
  <origin bibitemid='ISO7301' type='inline' citeas='ISO 7301:2011'>
334
297
  <locality type='clause'>
335
298
  <referenceFrom>3.1</referenceFrom>
336
299
  </locality>
337
300
  ISO 7301:2011, Clause 3.1
338
- </origin>
339
- <modification>
340
- <p id='_e73a417d-ad39-417d-a4c8-20e4e2529489'>
301
+ </origin>, modified &#x2013;
341
302
  The term "cargo rice" is shown as deprecated, and Note 1 to
342
- entry is not included here
343
- </p>
344
- </modification>
303
+ entry is not included here]
345
304
  </termsource>
346
305
  </li>
347
306
  </ol>
@@ -359,18 +318,15 @@ RSpec.describe IsoDoc do
359
318
  <li>A</li>
360
319
  </ul>
361
320
  </termexample>
362
- <termsource status='identical'>
321
+ <termsource status='identical'>[SOURCE:
363
322
  <origin citeas=''>
364
323
  <termref base='IEV' target='xyz'>t1</termref>
365
- </origin>
366
- </termsource>
367
- <termsource status='modified'>
324
+ </origin>]
325
+ </termsource>;
326
+ <termsource status='modified'>[SOURCE:
368
327
  <origin citeas=''>
369
328
  <termref base='IEV' target='xyz'/>
370
- </origin>
371
- <modification>
372
- <p id='_'>with adjustments</p>
373
- </modification>
329
+ </origin>, modified &#x2013; with adjustments]
374
330
  </termsource>
375
331
  </term>
376
332
  </terms>
@@ -390,7 +346,25 @@ RSpec.describe IsoDoc do
390
346
  <preferred><expression><name>paddy</name></expression></preferred>
391
347
  <preferred><expression><name>muddy rice</name></expression></preferred>
392
348
  <domain>rice</domain>
393
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
349
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
350
+ </term>
351
+ <term id="paddy2">
352
+ <preferred><expression><name language="eng">paddy</name></expression></preferred>
353
+ <preferred><expression><name language="eng">muddy rice</name></expression></preferred>
354
+ <domain>rice</domain>
355
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747a">rice retaining its husk after threshing</p></verbal-definition></definition>
356
+ </term>
357
+ <term id="paddy3">
358
+ <preferred geographic-area="US"><expression><name>paddy</name></expression></preferred>
359
+ <preferred><expression><name>muddy rice</name></expression></preferred>
360
+ <domain>rice</domain>
361
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747b">rice retaining its husk after threshing</p></verbal-definition></definition>
362
+ </term>
363
+ <term id="paddy4">
364
+ <preferred><expression language="eng"><name>paddy</name></expression></preferred>
365
+ <preferred><expression language="fra"><name>muddy rice</name></expression></preferred>
366
+ <domain>rice</domain>
367
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747c">rice retaining its husk after threshing</p></verbal-definition></definition>
394
368
  </term>
395
369
  </terms>
396
370
  </sections>
@@ -407,12 +381,48 @@ RSpec.describe IsoDoc do
407
381
  </title>
408
382
  <term id='paddy1'>
409
383
  <name>1.1.</name>
410
- <preferred>paddy; muddy rice</preferred>
384
+ <preferred><strong>paddy; muddy rice</strong></preferred>
411
385
  <domain>rice</domain>
412
386
  <definition>
413
387
  <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
414
388
  </definition>
415
389
  </term>
390
+ <term id='paddy2'>
391
+ <name>1.2.</name>
392
+ <preferred>
393
+ <strong>paddy; muddy rice</strong>
394
+ </preferred>
395
+ <domain>rice</domain>
396
+ <definition>
397
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747a'>rice retaining its husk after threshing</p>
398
+ </definition>
399
+ </term>
400
+ <term id='paddy3'>
401
+ <name>1.3.</name>
402
+ <preferred geographic-area="US">
403
+ <strong>paddy</strong>, US
404
+ </preferred>
405
+ <preferred>
406
+ <strong>muddy rice</strong>
407
+ </preferred>
408
+ <domain>rice</domain>
409
+ <definition>
410
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747b'>rice retaining its husk after threshing</p>
411
+ </definition>
412
+ </term>
413
+ <term id='paddy4'>
414
+ <name>1.4.</name>
415
+ <preferred>
416
+ <strong>paddy</strong>, eng
417
+ </preferred>
418
+ <preferred>
419
+ <strong>muddy rice</strong>, fra
420
+ </preferred>
421
+ <domain>rice</domain>
422
+ <definition>
423
+ <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747c'>rice retaining its husk after threshing</p>
424
+ </definition>
425
+ </term>
416
426
  </terms>
417
427
  </sections>
418
428
  </iso-standard>
@@ -427,24 +437,26 @@ RSpec.describe IsoDoc do
427
437
  <sections>
428
438
  <terms id="_terms_and_definitions" obligation="normative"><title>Terms and Definitions</title>
429
439
  <term id="paddy1">
430
- <preferred><expression><name>paddy</name>
440
+ <preferred geographic-area="US"><expression language="en" script="Latn"><name>paddy</name>
441
+ <pronunciation>pædiː</pronunciation>
431
442
  <grammar>
432
443
  <gender>masculine</gender>
433
444
  <gender>feminine</gender>
445
+ <number>singular</number>
434
446
  <isPreposition>false</isPreposition>
435
447
  <isNoun>true</isNoun>
436
- <grammarValue>irregular declension</grammarValue>
448
+ <grammar-value>irregular declension</grammar-value>
437
449
  </grammar>
438
450
  </expression></preferred>
439
451
  <preferred><expression><name>muddy rice</name>
440
452
  <grammar>
441
453
  <gender>neuter</gender>
442
454
  <isNoun>true</isNoun>
443
- <grammarValue>irregular declension</grammarValue>
455
+ <grammar-value>irregular declension</grammar-value>
444
456
  </grammar>
445
457
  </expression></preferred>
446
458
  <domain>rice</domain>
447
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
459
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
448
460
  </term>
449
461
  </terms>
450
462
  </sections>
@@ -461,7 +473,8 @@ RSpec.describe IsoDoc do
461
473
  </title>
462
474
  <term id='paddy1'>
463
475
  <name>1.1.</name>
464
- <preferred>paddy masc, fem, n; muddy rice neut, n</preferred>
476
+ <preferred geographic-area='US'><strong>paddy</strong>, m, f, sg, noun, en Latn US, /p&#xE6;di&#x2D0;/</preferred>
477
+ <preferred><strong>muddy rice</strong>, n, noun</preferred>
465
478
  <domain>rice</domain>
466
479
  <definition>
467
480
  <p id='_eb29b35e-123e-4d1c-b50b-2714d41e747f'>rice retaining its husk after threshing</p>
@@ -486,7 +499,7 @@ RSpec.describe IsoDoc do
486
499
  </graphical-symbol>
487
500
  </preferred>
488
501
  <domain>rice</domain>
489
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
502
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
490
503
  </term>
491
504
  </terms>
492
505
  </sections>
@@ -500,9 +513,10 @@ RSpec.describe IsoDoc do
500
513
  <title depth='1'>1.<tab/>Terms and Definitions</title>
501
514
  <term id='paddy1'>
502
515
  <name>1.1.</name>
503
- <preferred>; <figure id='_'>
516
+ <preferred><strong/></preferred>
517
+ <preferred isInternational='true'><figure id='_'>
504
518
  <name>Figure 1</name>
505
- <pre id='_'>&lt;LITERAL&gt; FIGURATIVE</pre>
519
+ <pre id='_'>&#x3c;LITERAL&#x3e; FIGURATIVE</pre>
506
520
  </figure>
507
521
  </preferred>
508
522
  <domain>rice</domain>
@@ -532,7 +546,7 @@ RSpec.describe IsoDoc do
532
546
  </expression>
533
547
  </preferred>
534
548
  <definition>
535
- <verbaldefinition>
549
+ <verbal-definition>
536
550
  <p id='C'>Definition</p>
537
551
  <termsource status='identical' type='authoritative'>
538
552
  <origin bibitemid='ISO2191' type='inline' citeas=''>
@@ -543,8 +557,8 @@ RSpec.describe IsoDoc do
543
557
  </localityStack>
544
558
  </origin>
545
559
  </termsource>
546
- </verbaldefinition>
547
- <nonverbalrepresentation>
560
+ </verbal-definition>
561
+ <non-verbal-representation>
548
562
  <table id='D'>
549
563
  <thead>
550
564
  <tr>
@@ -559,7 +573,7 @@ RSpec.describe IsoDoc do
559
573
  </tr>
560
574
  </tbody>
561
575
  </table>
562
- </nonverbalrepresentation>
576
+ </non-verbal-representation>
563
577
  </definition>
564
578
  <termsource status='identical' type='authoritative'>
565
579
  <origin bibitemid='ISO2191' type='inline' citeas=''>
@@ -578,7 +592,7 @@ RSpec.describe IsoDoc do
578
592
  </expression>
579
593
  </preferred>
580
594
  <definition>
581
- <nonverbalrepresentation>
595
+ <non-verbal-representation>
582
596
  <figure id='E'>
583
597
  <pre id='F'>Literal</pre>
584
598
  </figure>
@@ -600,100 +614,100 @@ RSpec.describe IsoDoc do
600
614
  </localityStack>
601
615
  </origin>
602
616
  </termsource>
603
- </nonverbalrepresentation>
617
+ </non-verbal-representation>
604
618
  </definition>
605
619
  </term>
606
620
  </terms>
607
621
  </sections>
608
622
  </iso-standard>
609
623
  INPUT
610
- presxml = <<~PRESXML
611
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
612
- <sections>
613
- <terms id='A' obligation='normative' displayorder='1'>
614
- <title depth='1'>
615
- 1.
616
- <tab/>
617
- Terms and definitions
618
- </title>
619
- <p id='B'>For the purposes of this document, the following terms and definitions apply.</p>
620
- <term id='term-term'>
621
- <name>1.1.</name>
622
- <preferred>Term</preferred>
623
- <definition>
624
- <p id='C'>Definition</p>
625
- <termsource status='identical' type='authoritative'>
626
- <origin bibitemid='ISO2191' type='inline' citeas=''>
627
- <localityStack>
628
- <locality type='section'>
629
- <referenceFrom>1</referenceFrom>
630
- </locality>
631
- </localityStack>
632
- , Section 1
633
- </origin>
634
- </termsource>
635
- <table id='D'>
636
- <name>Table 1</name>
637
- <thead>
638
- <tr>
639
- <th valign='top' align='left'>A</th>
640
- <th valign='top' align='left'>B</th>
641
- </tr>
642
- </thead>
643
- <tbody>
644
- <tr>
645
- <td valign='top' align='left'>C</td>
646
- <td valign='top' align='left'>D</td>
647
- </tr>
648
- </tbody>
649
- </table>
650
- </definition>
651
- <termsource status='identical' type='authoritative'>
652
- <origin bibitemid='ISO2191' type='inline' citeas=''>
653
- <localityStack>
654
- <locality type='section'>
655
- <referenceFrom>2</referenceFrom>
656
- </locality>
657
- </localityStack>
658
- , Section 2
659
- </origin>
660
- </termsource>
661
- </term>
662
- <term id='term-term-2'>
663
- <name>1.2.</name>
664
- <preferred>Term 2</preferred>
665
- <definition>
666
- <figure id='E'>
667
- <name>Figure 1</name>
668
- <pre id='F'>Literal</pre>
669
- </figure>
670
- <formula id='G'>
671
- <name>1</name>
672
- <stem type='MathML'>
673
- <math xmlns='http://www.w3.org/1998/Math/MathML'>
674
- <mi>x</mi>
675
- <mo>=</mo>
676
- <mi>y</mi>
677
- </math>
678
- <!-- x = y -->
679
- </stem>
680
- </formula>
681
- <termsource status='identical' type='authoritative'>
682
- <origin bibitemid='ISO2191' type='inline' citeas=''>
683
- <localityStack>
684
- <locality type='section'>
685
- <referenceFrom>3</referenceFrom>
686
- </locality>
687
- </localityStack>
688
- , Section 3
689
- </origin>
690
- </termsource>
691
- </definition>
692
- </term>
693
- </terms>
694
- </sections>
695
- </iso-standard>
696
- PRESXML
624
+ presxml = <<~PRESXML
625
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
626
+ <sections>
627
+ <terms id='A' obligation='normative' displayorder='1'>
628
+ <title depth='1'>
629
+ 1.
630
+ <tab/>
631
+ Terms and definitions
632
+ </title>
633
+ <p id='B'>For the purposes of this document, the following terms and definitions apply.</p>
634
+ <term id='term-term'>
635
+ <name>1.1.</name>
636
+ <preferred><strong>Term</strong></preferred>
637
+ <definition>
638
+ <p id='C'>Definition</p>
639
+ <termsource status='identical' type='authoritative'>[SOURCE:
640
+ <origin bibitemid='ISO2191' type='inline' citeas=''>
641
+ <localityStack>
642
+ <locality type='section'>
643
+ <referenceFrom>1</referenceFrom>
644
+ </locality>
645
+ </localityStack>
646
+ , Section 1
647
+ </origin>]
648
+ </termsource>
649
+ <table id='D'>
650
+ <name>Table 1</name>
651
+ <thead>
652
+ <tr>
653
+ <th valign='top' align='left'>A</th>
654
+ <th valign='top' align='left'>B</th>
655
+ </tr>
656
+ </thead>
657
+ <tbody>
658
+ <tr>
659
+ <td valign='top' align='left'>C</td>
660
+ <td valign='top' align='left'>D</td>
661
+ </tr>
662
+ </tbody>
663
+ </table>
664
+ </definition>
665
+ <termsource status='identical' type='authoritative'>[SOURCE:
666
+ <origin bibitemid='ISO2191' type='inline' citeas=''>
667
+ <localityStack>
668
+ <locality type='section'>
669
+ <referenceFrom>2</referenceFrom>
670
+ </locality>
671
+ </localityStack>
672
+ , Section 2
673
+ </origin>]
674
+ </termsource>
675
+ </term>
676
+ <term id='term-term-2'>
677
+ <name>1.2.</name>
678
+ <preferred><strong>Term 2</strong></preferred>
679
+ <definition>
680
+ <figure id='E'>
681
+ <name>Figure 1</name>
682
+ <pre id='F'>Literal</pre>
683
+ </figure>
684
+ <formula id='G'>
685
+ <name>1</name>
686
+ <stem type='MathML'>
687
+ <math xmlns='http://www.w3.org/1998/Math/MathML'>
688
+ <mi>x</mi>
689
+ <mo>=</mo>
690
+ <mi>y</mi>
691
+ </math>
692
+ <!-- x = y -->
693
+ </stem>
694
+ </formula>
695
+ <termsource status='identical' type='authoritative'>[SOURCE:
696
+ <origin bibitemid='ISO2191' type='inline' citeas=''>
697
+ <localityStack>
698
+ <locality type='section'>
699
+ <referenceFrom>3</referenceFrom>
700
+ </locality>
701
+ </localityStack>
702
+ , Section 3
703
+ </origin>]
704
+ </termsource>
705
+ </definition>
706
+ </term>
707
+ </terms>
708
+ </sections>
709
+ </iso-standard>
710
+ PRESXML
697
711
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
698
712
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
699
713
  end