isodoc 1.8.1 → 1.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/isodoc.gemspec +1 -1
- data/lib/isodoc/class_utils.rb +1 -1
- data/lib/isodoc/function/cleanup.rb +1 -11
- data/lib/isodoc/function/inline.rb +3 -3
- data/lib/isodoc/function/terms.rb +0 -3
- data/lib/isodoc/function/utils.rb +10 -5
- data/lib/isodoc/i18n.rb +31 -10
- data/lib/isodoc/presentation_function/block.rb +2 -3
- data/lib/isodoc/presentation_function/image.rb +2 -2
- data/lib/isodoc/presentation_function/terms.rb +95 -30
- data/lib/isodoc/presentation_xml_convert.rb +2 -1
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref/xref_gen.rb +10 -7
- data/lib/isodoc/xref/xref_gen_seq.rb +159 -148
- data/lib/isodoc/xref/xref_sect_gen.rb +5 -10
- data/lib/isodoc/xref.rb +2 -0
- data/lib/isodoc/xslfo_convert.rb +23 -1
- data/lib/isodoc-yaml/i18n-ar.yaml +3 -0
- data/lib/isodoc-yaml/i18n-de.yaml +3 -0
- data/lib/isodoc-yaml/i18n-en.yaml +8 -5
- data/lib/isodoc-yaml/i18n-es.yaml +3 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +3 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +3 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +3 -0
- data/spec/isodoc/cleanup_spec.rb +0 -129
- data/spec/isodoc/i18n_spec.rb +53 -10
- data/spec/isodoc/inline_spec.rb +33 -43
- data/spec/isodoc/lists_spec.rb +64 -64
- data/spec/isodoc/postproc_spec.rb +0 -73
- data/spec/isodoc/section_spec.rb +12 -12
- data/spec/isodoc/terms_spec.rb +317 -303
- data/spec/isodoc/xref_spec.rb +80 -9
- data/spec/isodoc/xslfo_convert_spec.rb +35 -0
- data/spec/spec_helper.rb +1 -1
- metadata +8 -8
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -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><
|
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
|
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><
|
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
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
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>, <in agriculture, dated></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
|
+
–
|
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
|
+
–
|
109
|
+
with adjustments]</termsource>
|
110
|
+
</term>
|
111
|
+
<term id="paddy"><name>1.2.</name><preferred><strong>paddy</strong></preferred>
|
112
|
+
<admitted>paddy rice, <in agriculture></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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
[/TERMREF]</p></div>
|
211
|
-
</div>
|
212
|
-
</body>
|
213
|
-
</html>
|
141
|
+
<p class="zzSTDTitle1"/>
|
142
|
+
<div id="_terms_and_definitions"><h1>1.  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>, <in agriculture, dated></p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
|
143
|
+
–
|
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"><rice> 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
|
+
–
|
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, <in agriculture></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
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
</body>
|
257
|
-
</html>
|
183
|
+
<p class="zzSTDTitle1"/>
|
184
|
+
<div id="_terms_and_definitions"><h1>1.<span style="mso-tab-count:1">  </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>, <in agriculture, dated></p><p>[SOURCE: <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>, modified
|
185
|
+
–
|
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"><rice> 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
|
+
–
|
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, <in agriculture></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><
|
276
|
-
<definition><
|
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
|
-
</
|
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 –
|
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 – 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><
|
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
|
-
<
|
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
|
-
<
|
455
|
+
<grammar-value>irregular declension</grammar-value>
|
444
456
|
</grammar>
|
445
457
|
</expression></preferred>
|
446
458
|
<domain>rice</domain>
|
447
|
-
<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
|
476
|
+
<preferred geographic-area='US'><strong>paddy</strong>, m, f, sg, noun, en Latn US, /pædiː/</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><
|
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
|
516
|
+
<preferred><strong/></preferred>
|
517
|
+
<preferred isInternational='true'><figure id='_'>
|
504
518
|
<name>Figure 1</name>
|
505
|
-
<pre id='_'
|
519
|
+
<pre id='_'><LITERAL> 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
|
-
<
|
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
|
-
</
|
547
|
-
<
|
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
|
-
</
|
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
|
-
<
|
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
|
-
</
|
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
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
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
|