metanorma-iec 1.4.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +14 -0
  4. data/Gemfile +6 -0
  5. data/Rakefile +1 -1
  6. data/lib/isodoc/iec/base_convert.rb +25 -59
  7. data/lib/isodoc/iec/html/htmlstyle.css +38 -6
  8. data/lib/isodoc/iec/html/htmlstyle.scss +35 -6
  9. data/lib/isodoc/iec/html/isodoc.css +1 -2
  10. data/lib/isodoc/iec/html/isodoc.scss +1 -2
  11. data/lib/isodoc/iec/html/scripts.html +0 -1
  12. data/lib/isodoc/iec/html/wordstyle.css +13 -11
  13. data/lib/isodoc/iec/html/wordstyle.scss +13 -11
  14. data/lib/isodoc/iec/html_convert.rb +2 -1
  15. data/lib/isodoc/iec/iec.international-standard.xsl +724 -330
  16. data/lib/isodoc/iec/presentation_xml_convert.rb +193 -5
  17. data/lib/isodoc/iec/xref.rb +9 -8
  18. data/lib/{asciidoctor → metanorma}/iec/basicdoc.rng +0 -0
  19. data/lib/{asciidoctor → metanorma}/iec/biblio.rng +0 -0
  20. data/lib/metanorma/iec/converter.rb +143 -0
  21. data/lib/{asciidoctor → metanorma}/iec/front.rb +3 -4
  22. data/lib/{asciidoctor → metanorma}/iec/iec.rng +48 -0
  23. data/lib/{asciidoctor → metanorma}/iec/iec_intro_en.xml +0 -0
  24. data/lib/{asciidoctor → metanorma}/iec/iec_intro_fr.xml +0 -0
  25. data/lib/{asciidoctor → metanorma}/iec/isodoc.rng +90 -18
  26. data/lib/{asciidoctor → metanorma}/iec/isostandard.rng +14 -0
  27. data/lib/metanorma/iec/processor.rb +15 -8
  28. data/lib/{asciidoctor → metanorma}/iec/reqt.rng +0 -0
  29. data/lib/metanorma/iec/version.rb +1 -1
  30. data/lib/metanorma-iec.rb +1 -1
  31. data/metanorma-iec.gemspec +3 -3
  32. data/spec/isodoc/iev_spec.rb +462 -120
  33. data/spec/isodoc/postproc_spec.rb +2 -5
  34. data/spec/isodoc/ref_spec.rb +359 -353
  35. data/spec/isodoc/terms_spec.rb +183 -181
  36. data/spec/{asciidoctor → metanorma}/base_spec.rb +1 -5
  37. data/spec/{asciidoctor → metanorma}/blocks_spec.rb +1 -1
  38. data/spec/metanorma/cleanup_spec.rb +374 -0
  39. data/spec/metanorma/iev_spec.rb +248 -0
  40. data/spec/{asciidoctor → metanorma}/inline_spec.rb +1 -1
  41. data/spec/{asciidoctor → metanorma}/lists_spec.rb +1 -1
  42. data/spec/metanorma/processor_spec.rb +139 -44
  43. data/spec/{asciidoctor → metanorma}/section_spec.rb +1 -1
  44. data/spec/{asciidoctor → metanorma}/validate_spec.rb +1 -1
  45. data/spec/spec_helper.rb +12 -14
  46. metadata +26 -26
  47. data/lib/asciidoctor/iec/converter.rb +0 -105
  48. data/spec/asciidoctor/cleanup_spec.rb +0 -345
  49. data/spec/asciidoctor/iev_spec.rb +0 -243
@@ -3,191 +3,193 @@ 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
-
10
- <term id="paddy1"><preferred>paddy</preferred>
11
- <domain>rice</domain>
12
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
13
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
14
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
15
- <ul>
16
- <li>A</li>
17
- </ul>
18
- </termexample>
19
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
20
- <ul>
21
- <li>A</li>
22
- </ul>
23
- </termexample>
24
-
25
- <termsource status="modified">
26
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
27
- <modification>
28
- <p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
29
- </modification>
30
- </termsource></term>
31
-
32
- <term id="paddy">
33
- <preferred>paddy</preferred><admitted>paddy rice</admitted>
34
- <admitted>rough rice</admitted>
35
- <deprecates>cargo rice</deprecates>
36
- <definition><verbaldefinition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbaldefinition></definition>
37
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
38
- <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>
39
- </termnote>
40
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
41
- <ul><li>A</li></ul>
42
- <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
43
- </termnote>
44
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
45
- <ul>
46
- <li>A</li>
47
- </ul>
48
- </termexample>
49
- <termsource status="identical">
50
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
51
- </termsource></term>
52
- </terms>
53
- </sections>
54
- </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
+
10
+ <term id="paddy1"><preferred>paddy</preferred>
11
+ <domain>rice</domain>
12
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
13
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
14
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
15
+ <ul>
16
+ <li>A</li>
17
+ </ul>
18
+ </termexample>
19
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
20
+ <ul>
21
+ <li>A</li>
22
+ </ul>
23
+ </termexample>
24
+
25
+ <termsource status="modified">
26
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
27
+ <modification>
28
+ <p id="_e73a417d-ad39-417d-a4c8-20e4e2529489">The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here</p>
29
+ </modification>
30
+ </termsource></term>
31
+
32
+ <term id="paddy">
33
+ <preferred>paddy</preferred><admitted>paddy rice</admitted>
34
+ <admitted>rough rice</admitted>
35
+ <deprecates>cargo rice</deprecates>
36
+ <definition><verbal-definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></verbal-definition></definition>
37
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
38
+ <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>
39
+ </termnote>
40
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
41
+ <ul><li>A</li></ul>
42
+ <p id="_19830f33-e46c-42cc-94ca-a5ef101132d5">The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p>
43
+ </termnote>
44
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
45
+ <ul>
46
+ <li>A</li>
47
+ </ul>
48
+ </termexample>
49
+ <termsource status="identical">
50
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
51
+ </termsource></term>
52
+ </terms>
53
+ </sections>
54
+ </iso-standard>
55
55
  INPUT
56
56
  presxml = <<~INPUT
57
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
58
- <sections>
59
- <terms id="_terms_and_definitions" obligation="normative" displayorder="1"><title depth="1">1<tab/>Terms and definitions</title>
60
-
61
- <term id="paddy1">
62
- <name>1.1</name><preferred>paddy</preferred>
63
- <domain>rice</domain>
64
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
65
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
66
- <name>EXAMPLE 1</name>
67
- <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
68
- <ul>
69
- <li>A</li>
70
- </ul>
71
- </termexample>
72
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
73
- <name>EXAMPLE 2</name>
74
- <ul>
75
- <li>A</li>
76
- </ul>
77
- </termexample>
78
-
79
- <termsource status="modified">
80
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
81
- <modification>
82
- <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>
83
- </modification>
84
- </termsource></term>
85
-
86
- <term id="paddy">
87
- <name>1.2</name>
88
- <preferred>paddy</preferred><admitted>paddy rice</admitted>
89
- <admitted>rough rice</admitted>
90
- <deprecates>cargo rice</deprecates>
91
- <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
92
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
93
- <name>Note 1 to entry</name>
94
- <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>
95
- </termnote>
96
- <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
97
- <name>Note 2 to entry</name>
98
- <ul><li>A</li></ul>
99
- <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>
100
- </termnote>
101
- <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
102
- <name>EXAMPLE</name>
103
- <ul>
104
- <li>A</li>
105
- </ul>
106
- </termexample>
107
- <termsource status="identical">
108
- <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>
109
- </termsource></term>
110
- </terms>
111
- </sections>
112
- </iso-standard>
57
+ <?xml version='1.0'?>
58
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
59
+ <sections>
60
+ <terms id="_terms_and_definitions" obligation="normative" displayorder="1"><title depth="1">1<tab/>Terms and definitions</title>
61
+
62
+ <term id="paddy1">
63
+ <name>1.1</name><preferred>paddy</preferred>
64
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&#x3c;rice&#x3e; rice retaining its husk after threshing</p></definition>
65
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f892">
66
+ <name>EXAMPLE 1</name>
67
+ <p id="_65c9a509-9a89-4b54-a890-274126aeb55c">Foreign seeds, husks, bran, sand, dust.</p>
68
+ <ul>
69
+ <li>A</li>
70
+ </ul>
71
+ </termexample>
72
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f894">
73
+ <name>EXAMPLE 2</name>
74
+ <ul>
75
+ <li>A</li>
76
+ </ul>
77
+ </termexample>
78
+
79
+ <termsource status="modified">[SOURCE:
80
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>, modified &#x2013; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
81
+ </termsource></term>
82
+
83
+ <term id="paddy">
84
+ <name>1.2</name>
85
+ <preferred>paddy</preferred><admitted>paddy rice</admitted>
86
+ <admitted>rough rice</admitted>
87
+ <deprecates>cargo rice</deprecates>
88
+ <definition><p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p></definition>
89
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74e">
90
+ <name>Note 1 to entry</name>
91
+ <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>
92
+ </termnote>
93
+ <termnote id="_671a1994-4783-40d0-bc81-987d06ffb74f">
94
+ <name>Note 2 to entry</name>
95
+ <ul><li>A</li></ul>
96
+ <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>
97
+ </termnote>
98
+ <termexample id="_bd57bbf1-f948-4bae-b0ce-73c00431f893">
99
+ <name>EXAMPLE</name>
100
+ <ul>
101
+ <li>A</li>
102
+ </ul>
103
+ </termexample>
104
+ <termsource status="identical">[SOURCE:
105
+ <origin bibitemid="ISO7301" type="inline" citeas="ISO 7301:2011"><locality type="clause"><referenceFrom>3.1</referenceFrom></locality>ISO 7301:2011, 3.1</origin>]
106
+ </termsource></term>
107
+ </terms>
108
+ </sections>
109
+ </iso-standard>
113
110
  INPUT
114
111
  html = <<~OUTPUT
115
- #{HTML_HDR}
116
- <div id="">
117
- <h1 class="ForewordTitle">FOREWORD</h1>
118
- <div class="boilerplate_legal"/>
119
- </div>
120
- #{IEC_TITLE1}
121
- <div id="_terms_and_definitions"><h1>1&#160; Terms and definitions</h1>
122
- <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
123
-
124
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
125
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><p><span class="example_label">EXAMPLE 1</span>&#160; Foreign seeds, husks, bran, sand, dust.</p><ul>
126
- <li>A</li>
127
- </ul></div>
128
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span>&#160; </p>
129
- <ul>
130
- <li>A</li>
131
- </ul>
132
- </div>
133
-
134
- <p>[TERMREF]
135
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
136
- [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
137
- [/TERMREF]</p><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>
138
- <p class="AltTerms" style="text-align:left;">rough rice</p>
139
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
140
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
141
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span>&#160; </p>
142
- <ul>
143
- <li>A</li>
144
- </ul>
145
- </div>
146
- <div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note"><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>
147
- <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>
148
- <p>[TERMREF]
149
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
150
- [/TERMREF]</p></div>
151
- </div>
152
- </body>
153
- </html>
154
- OUTPUT
155
-
112
+ #{HTML_HDR}
113
+ <div id="">
114
+ <h1 class="ForewordTitle">FOREWORD</h1>
115
+ <div class="boilerplate_legal"/>
116
+ </div>
117
+ #{IEC_TITLE1}
118
+ <div id="_terms_and_definitions"><h1>1&#160; Terms and definitions</h1>
119
+ <p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
120
+
121
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
122
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><p><span class="example_label">EXAMPLE 1</span>&#160; Foreign seeds, husks, bran, sand, dust.</p><ul>
123
+ <li>A</li>
124
+ </ul></div>
125
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span>&#160; </p>
126
+ <ul>
127
+ <li>A</li>
128
+ </ul>
129
+ </div>
130
+
131
+ <p>[SOURCE:
132
+ <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified &#8211; The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]
133
+ </p><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>
134
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
135
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
136
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p>
137
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span>&#160; </p>
138
+ <ul>
139
+ <li>A</li>
140
+ </ul>
141
+ </div>
142
+ <div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note"><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>
143
+ <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>
144
+ <p>[SOURCE:
145
+ <a href="#ISO7301">ISO 7301:2011, 3.1</a>]</p></div>
146
+ </div>
147
+ </body>
148
+ </html>
149
+ OUTPUT
150
+
156
151
  word = <<~OUTPUT
157
- <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and definitions</h1><p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
158
-
159
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
160
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">&#160; </span>Foreign seeds, husks, bran, sand, dust.</p><ul>
161
- <li>A</li>
162
- </ul></div>
163
- <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span><span style="mso-tab-count:1">&#160; </span></p>
164
-
165
- <ul>
166
- <li>A</li>
167
- </ul>
168
- </div>
169
-
170
- <p>[TERMREF]
171
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
172
- [MODIFICATION]The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
173
- [/TERMREF]</p><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>
174
- <p class="AltTerms" style="text-align:left;">rough rice</p>
175
- <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
176
- <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p><div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span><span style="mso-tab-count:1">&#160; </span></p>
177
-
178
- <ul>
179
- <li>A</li>
180
- </ul>
181
- </div><div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><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>
182
-
183
-
184
-
185
- <p>[TERMREF]
186
- <a href="#ISO7301">ISO 7301:2011, 3.1</a>
187
- [/TERMREF]</p></div>
188
- OUTPUT
189
- expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
190
- expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
191
- expect(xmlpp(IsoDoc::Iec::WordConvert.new({}).convert("test", presxml, true).sub(%r{^.*<div id="_terms_and_definitions">}m, '<div id="_terms_and_definitions">').sub(%r{</div>\s*<br[^>]*>\s*<div class="colophon"/>.*$}m, ""))).to be_equivalent_to xmlpp(word)
152
+ <div id="_terms_and_definitions"><h1>1<span style="mso-tab-count:1">&#160; </span>Terms and definitions</h1><p class="TermNum" id="paddy1">1.1</p><p class="Terms" style="text-align:left;">paddy</p>
153
+
154
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">&lt;rice&gt; rice retaining its husk after threshing</p>
155
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f892" class="example"><p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">&#160; </span>Foreign seeds, husks, bran, sand, dust.</p><ul>
156
+ <li>A</li>
157
+ </ul></div>
158
+ <div id="_bd57bbf1-f948-4bae-b0ce-73c00431f894" class="example"><p><span class="example_label">EXAMPLE 2</span><span style="mso-tab-count:1">&#160; </span></p>
159
+
160
+ <ul>
161
+ <li>A</li>
162
+ </ul>
163
+ </div>
164
+
165
+ <p>[SOURCE:
166
+ <a href="#ISO7301">ISO 7301:2011, 3.1</a>, modified &#8211;
167
+ The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here]</p><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>
168
+ <p class="AltTerms" style="text-align:left;">rough rice</p>
169
+ <p class="DeprecatedTerms" style="text-align:left;">DEPRECATED: cargo rice</p>
170
+ <p id="_eb29b35e-123e-4d1c-b50b-2714d41e747f">rice retaining its husk after threshing</p><div id="_bd57bbf1-f948-4bae-b0ce-73c00431f893" class="example"><p><span class="example_label">EXAMPLE</span><span style="mso-tab-count:1">&#160; </span></p>
171
+
172
+ <ul>
173
+ <li>A</li>
174
+ </ul>
175
+ </div><div id="_671a1994-4783-40d0-bc81-987d06ffb74e" class="Note"><p class="Note">Note 1 to entry: The starch of waxy rice consists almost entirely of amylopectin. The kernels have a tendency to stick together after cooking.</p></div><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>
176
+
177
+
178
+
179
+ <p>[SOURCE:
180
+ <a href="#ISO7301">ISO 7301:2011, 3.1</a>]</p></div>
181
+ OUTPUT
182
+ expect(xmlpp(IsoDoc::Iec::PresentationXMLConvert.new({})
183
+ .convert("test", input, true)))
184
+ .to be_equivalent_to xmlpp(presxml)
185
+ expect(xmlpp(IsoDoc::Iec::HtmlConvert.new({})
186
+ .convert("test", presxml, true)))
187
+ .to be_equivalent_to xmlpp(html)
188
+ expect(xmlpp(IsoDoc::Iec::WordConvert.new({})
189
+ .convert("test", presxml, true)
190
+ .sub(%r{^.*<div id="_terms_and_definitions">}m,
191
+ '<div id="_terms_and_definitions">')
192
+ .sub(%r{</div>\s*<br[^>]*>\s*<div class="colophon"/>.*$}m, "")))
193
+ .to be_equivalent_to xmlpp(word)
192
194
  end
193
195
  end
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
  require "fileutils"
3
3
 
4
- RSpec.describe Asciidoctor::Iec do
4
+ RSpec.describe Metanorma::Iec do
5
5
  before(:all) do
6
6
  @blank_hdr = blank_hdr_gen
7
7
  end
@@ -166,7 +166,6 @@ RSpec.describe Asciidoctor::Iec do
166
166
  </relation>
167
167
  <ext>
168
168
  <doctype>article</doctype>
169
- <horizontal>false</horizontal>
170
169
  <editorialgroup>
171
170
  <technical-committee number='1' type='A'>TC</technical-committee>
172
171
  <technical-committee number='11' type='A1'>TC1</technical-committee>
@@ -675,7 +674,6 @@ RSpec.describe Asciidoctor::Iec do
675
674
  </copyright>
676
675
  <ext>
677
676
  <doctype>article</doctype>
678
- <horizontal>false</horizontal>
679
677
  <editorialgroup>
680
678
  <technical-committee/>
681
679
  <subcommittee/>
@@ -879,7 +877,6 @@ RSpec.describe Asciidoctor::Iec do
879
877
  </copyright>
880
878
  <ext>
881
879
  <doctype>article</doctype>
882
- <horizontal>false</horizontal>
883
880
  <editorialgroup>
884
881
  <technical-committee/>
885
882
  <subcommittee/>
@@ -947,7 +944,6 @@ RSpec.describe Asciidoctor::Iec do
947
944
  </copyright>
948
945
  <ext>
949
946
  <doctype>article</doctype>
950
- <horizontal>false</horizontal>
951
947
  <editorialgroup>
952
948
  <technical-committee/>
953
949
  <subcommittee/>
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe Asciidoctor::Iec do
3
+ RSpec.describe Metanorma::Iec do
4
4
  before(:all) do
5
5
  @blank_hdr = blank_hdr_gen
6
6
  end