isodoc 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e07a78782a0c09a2c70525f1d7d4b8f5d34ea8d731c3dbc5860b7386250c1e56
4
- data.tar.gz: bb3ddf0e119c8cf4b4d25c70ba381dba043020c132edd13fc4934bb08871594e
3
+ metadata.gz: b64ad76ffcf7c9f1ced2c15c41a263e49e62cfa4294d31066ba2e358e613fb35
4
+ data.tar.gz: f35ca08d240ae7cdb7ba9aa0c9e071ec284d051f0d61c82542d461e101d0da38
5
5
  SHA512:
6
- metadata.gz: ba808db07e817492e8ceb891771ec1df67f8d4dfab34896eb2eca9accd45ccf110745a5844276e52f1f20c6542cf1d33fdaad816ea3ce0ff264465bd4f4c8d4c
7
- data.tar.gz: 0124e13883ab5d0c5f0561c62b924920ae0d73bc4980024f77336a4aed919d175c0f51a464e3574f910ea77ba15bccbf0d86c7e14707a6f4b7bf038ff7f1d80a
6
+ metadata.gz: 3062ddc15478efad6f25fb39e37689fecab84750b34c2496f5693af1b52c864053f50acf3af141d876e8cb8d2d19f89ecdd19e630ab1b1da9e953e897f2ab68a
7
+ data.tar.gz: 14d688526a710b92cf2256e49df75e4abcf5a67ed7de40e6593cedf1a99e96561ba5024398ae7c767d78a4e0d74e18df344423cfbc83dd75e2afa28beeea0006
@@ -23,7 +23,7 @@ module IsoDoc::Function
23
23
  end
24
24
 
25
25
  def figure_key(out)
26
- out.p **{ style: "page-break-after:avoid;"} do |p|
26
+ out.p **{ style: "page-break-after:avoid;" } do |p|
27
27
  p.b { |b| b << @i18n.key }
28
28
  end
29
29
  end
@@ -61,7 +61,7 @@ module IsoDoc::Function
61
61
  @in_figure = false
62
62
  end
63
63
 
64
- def sourcecode_name_parse(node, div, name)
64
+ def sourcecode_name_parse(_node, div, name)
65
65
  return if name.nil?
66
66
 
67
67
  div.p **{ class: "SourceTitle", style: "text-align:center;" } do |p|
@@ -143,7 +143,7 @@ module IsoDoc::Function
143
143
 
144
144
  def formula_parse1(node, out)
145
145
  out.div **attr_code(class: "formula") do |div|
146
- div.p do |p|
146
+ div.p do |_p|
147
147
  parse(node.at(ns("./stem")), div)
148
148
  if lbl = node&.at(ns("./name"))&.text
149
149
  insert_tab(div, 1)
@@ -219,7 +219,7 @@ module IsoDoc::Function
219
219
 
220
220
  def passthrough_parse(node, out)
221
221
  return if node["format"] &&
222
- !(node["format"].split(/,/).include? @format.to_s)
222
+ !(node["format"].split(",").include? @format.to_s)
223
223
 
224
224
  out.passthrough node.text
225
225
  end
@@ -1,48 +1,51 @@
1
- module IsoDoc::Function
2
- module Form
3
- def form_parse(node, out)
4
- node.children.each do |n|
5
- parse(n, out)
1
+ module IsoDoc
2
+ module Function
3
+ module Form
4
+ def form_parse(node, out)
5
+ out.div **attr_code(class: node["class"],
6
+ id: node["id"]) do |div|
7
+ node.children.each do |n|
8
+ parse(n, div)
9
+ end
10
+ end
6
11
  end
7
- end
8
12
 
9
- def input_parse(node, out)
10
- case node["type"]
11
- when "button" then out << "[#{node['value'] || 'BUTTON'}]"
12
- when "checkbox" then out << "&#x2610; "
13
- when "date" then text_input(out)
14
- when "file" then text_input(out)
15
- when "password" then text_input(out)
16
- when "radio" then out << "&#x25CE; "
17
- when "submit" # nop
18
- when "text" then text_input(out, node["maxlength"])
13
+ def input_parse(node, out)
14
+ case node["type"]
15
+ when "button" then out << "[#{node['value'] || 'BUTTON'}]"
16
+ when "checkbox" then out << "&#x2610; "
17
+ when "date", "file", "password" then text_input(out)
18
+ when "radio" then out << "&#x25CE; "
19
+ when "submit" # nop
20
+ when "text" then text_input(out, node["maxlength"])
21
+ end
19
22
  end
20
- end
21
23
 
22
- def text_input(out, length = 10)
23
- length ||= 10
24
- length = length.to_i
25
- length.zero? and length = 10
26
- out << "_" * length
27
- out << " "
28
- end
24
+ def text_input(out, length = 10)
25
+ length ||= 10
26
+ length = length.to_i
27
+ length.zero? and length = 10
28
+ out << "_" * length
29
+ out << " "
30
+ end
29
31
 
30
- def select_parse(node, out)
31
- text_input(out, node["size"] || 10)
32
- end
32
+ def select_parse(node, out)
33
+ text_input(out, node["size"] || 10)
34
+ end
33
35
 
34
- def label_parse(node, out)
35
- node.children.each do |n|
36
- parse(n, out)
36
+ def label_parse(node, out)
37
+ node.children.each do |n|
38
+ parse(n, out)
39
+ end
37
40
  end
38
- end
39
41
 
40
- def option_parse(node, out); end
42
+ def option_parse(node, out); end
41
43
 
42
- def textarea_parse(_node, out)
43
- out.table **{ border: 1, width: "50%" } do |t|
44
- t.tr do |tr|
45
- tr.td do |td|
44
+ def textarea_parse(_node, out)
45
+ out.table **{ border: 1, width: "50%" } do |t|
46
+ t.tr do |tr|
47
+ tr.td do |td|
48
+ end
46
49
  end
47
50
  end
48
51
  end
@@ -71,7 +71,11 @@ module IsoDoc::Function
71
71
  end
72
72
 
73
73
  def termrefelem_parse(node, out)
74
- out << "Termbase #{node['base']}, term ID #{node['target']}"
74
+ if node.text.strip.empty?
75
+ out << "Termbase #{node['base']}, term ID #{node['target']}"
76
+ else
77
+ node.children.each { |n| parse(n, out) }
78
+ end
75
79
  end
76
80
 
77
81
  def stem_parse(node, out)
@@ -1,61 +1,64 @@
1
- module IsoDoc::HtmlFunction
2
- module Form
3
- def form_parse(node, out)
4
- out.form **attr_code(id: node["id"], name: node["name"],
5
- action: node["action"]) do |div|
6
- node.children.each do |n|
7
- parse(n, div)
1
+ module IsoDoc
2
+ module HtmlFunction
3
+ module Form
4
+ def form_parse(node, out)
5
+ out.form **attr_code(id: node["id"], name: node["name"],
6
+ class: node["class"],
7
+ action: node["action"]) do |div|
8
+ node.children.each do |n|
9
+ parse(n, div)
10
+ end
8
11
  end
9
12
  end
10
- end
11
13
 
12
- def input_parse(node, out)
13
- out.input nil, **attr_code(
14
- id: node["id"], name: node["name"], type: node["type"],
15
- value: node["value"], disabled: node["disabled"],
16
- readonly: node["readonly"], checked: node["checked"],
17
- maxlength: node["maxlength"], minlength: node["minlength"]
18
- )
19
- end
14
+ def input_parse(node, out)
15
+ out.input nil, **attr_code(
16
+ id: node["id"], name: node["name"], type: node["type"],
17
+ value: node["value"], disabled: node["disabled"],
18
+ readonly: node["readonly"], checked: node["checked"],
19
+ maxlength: node["maxlength"], minlength: node["minlength"]
20
+ )
21
+ end
20
22
 
21
- def select_parse(node, out)
22
- selected = node.at(ns("./option[@value = '#{node['value']}']"))
23
- selected and selected["selected"] = true
24
- out.select **attr_code(
25
- id: node["id"], name: node["name"], size: node["size"],
26
- disabled: node["disabled"], multiple: node["multiple"]
27
- ) do |div|
28
- node.children.each do |n|
29
- parse(n, div)
23
+ def select_parse(node, out)
24
+ selected = node.at(ns("./option[@value = '#{node['value']}']"))
25
+ selected and selected["selected"] = true
26
+ out.select **attr_code(
27
+ id: node["id"], name: node["name"], size: node["size"],
28
+ disabled: node["disabled"], multiple: node["multiple"]
29
+ ) do |div|
30
+ node.children.each do |n|
31
+ parse(n, div)
32
+ end
30
33
  end
31
34
  end
32
- end
33
35
 
34
- def label_parse(node, out)
35
- out.label **attr_code(for: node["for"]) do |div|
36
- node.children.each do |n|
37
- parse(n, div)
36
+ def label_parse(node, out)
37
+ out.label **attr_code(for: node["for"]) do |div|
38
+ node.children.each do |n|
39
+ parse(n, div)
40
+ end
38
41
  end
39
42
  end
40
- end
41
43
 
42
- def option_parse(node, out)
43
- out.option **attr_code(
44
- disabled: node["disabled"], selected: node["selected"],
45
- value: node["value"]
46
- ) do |o|
47
- node.children.each do |n|
48
- parse(n, o)
44
+ def option_parse(node, out)
45
+ out.option **attr_code(
46
+ disabled: node["disabled"], selected: node["selected"],
47
+ value: node["value"]
48
+ ) do |o|
49
+ node.children.each do |n|
50
+ parse(n, o)
51
+ end
49
52
  end
50
53
  end
51
- end
52
54
 
53
- def textarea_parse(node, out)
54
- out.textarea **attr_code(
55
- id: node["id"], name: node["name"], rows: node["rows"],
56
- cols: node["cols"]
57
- ) do |div|
58
- node["value"] and div << node["value"]
55
+ def textarea_parse(node, out)
56
+ out.textarea **attr_code(
57
+ id: node["id"], name: node["name"], rows: node["rows"],
58
+ cols: node["cols"]
59
+ ) do |div|
60
+ node["value"] and div << node["value"]
61
+ end
59
62
  end
60
63
  end
61
64
  end
@@ -74,6 +74,8 @@ module IsoDoc::HtmlFunction
74
74
  end
75
75
 
76
76
  def html_button
77
+ return "" if @bare
78
+
77
79
  '<button onclick="topFunction()" id="myBtn" '\
78
80
  'title="Go to top">Top</button>'.freeze
79
81
  end
@@ -74,6 +74,7 @@ module IsoDoc
74
74
  head = docxml.at("//*[local-name() = 'head']")
75
75
  head << htmlstylesheet(@htmlstylesheet)
76
76
  s = htmlstylesheet(@htmlstylesheet_override) and head << s
77
+ @bare and head << "<style>body {margin-left: 2em; margin-right: 2em;}</style>"
77
78
  docxml
78
79
  end
79
80
 
@@ -160,14 +160,36 @@ module IsoDoc
160
160
  end
161
161
 
162
162
  def concept1(node)
163
+ xref = node&.at(ns("./xref/@target"))&.text or
164
+ return concept_render(node, node["ital"] || "true",
165
+ node["ref"] || "true")
166
+ if node.at(ns("//definitions//dt[@id = '#{xref}']"))
167
+ concept_render(node, node["ital"] || "false", node["ref"] || "false")
168
+ else concept_render(node, node["ital"] || "true", node["ref"] || "true")
169
+ end
170
+ end
171
+
172
+ def concept_render(node, ital, ref)
163
173
  node&.at(ns("./refterm"))&.remove
164
- d = node&.at(ns("./renderterm"))
165
- d&.name = "em"
166
- r = node.at(ns("./xref | ./eref | ./termref"))
167
- r.replace(@i18n.term_defined_in.sub(/%/, r.to_xml))
174
+ r = node.at(ns("./renderterm"))
175
+ r&.next = " "
176
+ if ital == "true" then r&.name = "em"
177
+ else r&.replace(r&.children)
178
+ end
179
+ concept1_ref(node, ref)
168
180
  node.replace(node.children)
169
181
  end
170
182
 
183
+ def concept1_ref(node, ref)
184
+ r = node.at(ns("./xref | ./eref | ./termref")) or return
185
+ return r.remove if ref == "false"
186
+
187
+ if non_locality_elems(r).select { |c| !c.text? || /\S/.match(c) }.empty?
188
+ r.replace(@i18n.term_defined_in.sub(/%/, r.to_xml))
189
+ else r.replace("[#{r.to_xml}]")
190
+ end
191
+ end
192
+
171
193
  def variant(docxml)
172
194
  docxml.xpath(ns("//variant")).each { |f| variant1(f) }
173
195
  docxml.xpath(ns("//variant[@remove = 'true']")).each(&:remove)
@@ -44,8 +44,7 @@ module IsoDoc
44
44
  prefix_name(elem, "", "#{lbl}#{clausedelim}", "name")
45
45
  end
46
46
 
47
- def references(docxml)
48
- end
47
+ def references(docxml); end
49
48
 
50
49
  def docid_prefixes(docxml)
51
50
  docxml.xpath(ns("//references/bibitem/docidentifier")).each do |i|
@@ -53,10 +53,10 @@ module IsoDoc
53
53
  end
54
54
 
55
55
  def inline(docxml)
56
+ concept docxml
56
57
  xref docxml
57
58
  eref docxml
58
59
  origin docxml
59
- concept docxml
60
60
  quotesource docxml
61
61
  mathml docxml
62
62
  variant docxml
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "1.7.0".freeze
2
+ VERSION = "1.7.1".freeze
3
3
  end
@@ -6,7 +6,7 @@ RSpec.describe IsoDoc do
6
6
  <iso-standard xmlns="http://riboseinc.com/isoxml">
7
7
  <sections>
8
8
  <clause id="A">
9
- <form action="/action_page.php" id="F0" name="F1">
9
+ <form action="/action_page.php" id="F0" name="F1" class="C">
10
10
  <label for="fname">First name:</label><br/>
11
11
  <input type="text" id="fname" name="fname"/><br/>
12
12
  <label for="lname">Last name:</label><br/>
@@ -46,111 +46,115 @@ RSpec.describe IsoDoc do
46
46
  INPUT
47
47
 
48
48
  html = <<~HTML
49
- #{HTML_HDR}
50
- <p class='zzSTDTitle1'/>
51
- <div id='A'>
52
- <h1/>
53
- <form id='F0' name='F1' action='/action_page.php'>
54
- <label for='fname'>First name:</label>
49
+ #{HTML_HDR}
50
+ <p class='zzSTDTitle1'/>
51
+ <div id='A'>
52
+ <h1/>
53
+ <form id='F0' name='F1' action='/action_page.php' class="C">
54
+ <label for='fname'>First name:</label>
55
+ <br/>
56
+ <input id='fname' name='fname' type='text'/>
57
+ <br/>
58
+ <label for='lname'>Last name:</label>
59
+ <br/>
60
+ <input id='lname' name='lname' type='text'/>
61
+ <br/>
62
+ <label for='pwd'>Password:</label>
63
+ <br/>
64
+ <input id='pwd' name='pwd' type='password'/>
65
+ <br/>
66
+ <input id='male' name='gender' type='radio' value='male'/>
67
+ <label for='male'>Male</label>
68
+ <br/>
69
+ <input id='female' name='gender' type='radio' value='female'/>
70
+ <label for='female'>Female</label>
71
+ <br/>
72
+ <input id='other' name='gender' type='radio' value='other'/>
73
+ <label for='other'>Other</label>
74
+ <br/>
75
+ <input id='vehicle1' name='vehicle1' type='checkbox' value='Bike' checked='true'/>
76
+ <label for='vehicle1'> I have a bike</label>
77
+ <br/>
78
+ <input id='vehicle2' name='vehicle2' type='checkbox' value='Car'/>
79
+ <label for='vehicle2'> I have a car</label>
80
+ <br/>
81
+ <input id='vehicle3' name='vehicle3' type='checkbox' value='Boat'/>
82
+ <label for='vehicle3'> I have a boat</label>
83
+ <br/>
84
+ <input id='birthday' name='birthday' type='date'/>
85
+ <br/>
86
+ <label for='myfile'>Select a file:</label>
87
+ <input id='myfile' name='myfile' type='file'/>
88
+ <br/>
89
+ <label for='cars'>Select a car:</label>
90
+ <select id='cars' name='cars'>
91
+ <option value='volvo'>Volvo</option>
92
+ <option value='saab'>Saab</option>
93
+ <option selected='true' value='fiat'>Fiat</option>
94
+ <option value='audi'>Audi</option>
95
+ </select>
96
+ <textarea id='t1' name='message' rows='10' cols='30'>The cat was playing in the garden.</textarea>
97
+ <input type='button' value='Click Me!'/>
98
+ <input type='button'/>
99
+ <input type='submit' value='Submit'/>
100
+ </form>
101
+ </div>
102
+ </div>
103
+ </body>
104
+ </html>
105
+ HTML
106
+
107
+ doc = <<~DOC
108
+ #{WORD_HDR}
109
+ <p class='zzSTDTitle1'/>
110
+ <div id='A'>
111
+ <h1/>
112
+ <div class="C" id="F0">
113
+ First name:
55
114
  <br/>
56
- <input id='fname' name='fname' type='text'/>
115
+ __________
57
116
  <br/>
58
- <label for='lname'>Last name:</label>
117
+ Last name:
59
118
  <br/>
60
- <input id='lname' name='lname' type='text'/>
119
+ __________
61
120
  <br/>
62
- <label for='pwd'>Password:</label>
121
+ Password:
63
122
  <br/>
64
- <input id='pwd' name='pwd' type='password'/>
123
+ __________
65
124
  <br/>
66
- <input id='male' name='gender' type='radio' value='male'/>
67
- <label for='male'>Male</label>
125
+ &#9678; Male
68
126
  <br/>
69
- <input id='female' name='gender' type='radio' value='female'/>
70
- <label for='female'>Female</label>
127
+ &#9678; Female
71
128
  <br/>
72
- <input id='other' name='gender' type='radio' value='other'/>
73
- <label for='other'>Other</label>
129
+ &#9678; Other
74
130
  <br/>
75
- <input id='vehicle1' name='vehicle1' type='checkbox' value='Bike' checked='true'/>
76
- <label for='vehicle1'> I have a bike</label>
131
+ &#9744; I have a bike
77
132
  <br/>
78
- <input id='vehicle2' name='vehicle2' type='checkbox' value='Car'/>
79
- <label for='vehicle2'> I have a car</label>
133
+ &#9744; I have a car
80
134
  <br/>
81
- <input id='vehicle3' name='vehicle3' type='checkbox' value='Boat'/>
82
- <label for='vehicle3'> I have a boat</label>
135
+ &#9744; I have a boat
83
136
  <br/>
84
- <input id='birthday' name='birthday' type='date'/>
137
+ __________
85
138
  <br/>
86
- <label for='myfile'>Select a file:</label>
87
- <input id='myfile' name='myfile' type='file'/>
139
+ Select a file: __________
88
140
  <br/>
89
- <label for='cars'>Select a car:</label>
90
- <select id='cars' name='cars'>
91
- <option value='volvo'>Volvo</option>
92
- <option value='saab'>Saab</option>
93
- <option selected='true' value='fiat'>Fiat</option>
94
- <option value='audi'>Audi</option>
95
- </select>
96
- <textarea id='t1' name='message' rows='10' cols='30'>The cat was playing in the garden.</textarea>
97
- <input type='button' value='Click Me!'/>
98
- <input type='button'/>
99
- <input type='submit' value='Submit'/>
100
- </form>
101
- </div>
102
- </div>
103
- </body>
104
- </html>
105
- HTML
106
-
107
- doc = <<~DOC
108
- #{WORD_HDR}
109
- <p class='zzSTDTitle1'/>
110
- <div id='A'>
111
- <h1/>
112
- First name:
113
- <br/>
114
- __________
115
- <br/>
116
- Last name:
117
- <br/>
118
- __________
119
- <br/>
120
- Password:
121
- <br/>
122
- __________
123
- <br/>
124
- &#9678; Male
125
- <br/>
126
- &#9678; Female
127
- <br/>
128
- &#9678; Other
129
- <br/>
130
- &#9744; I have a bike
131
- <br/>
132
- &#9744; I have a car
133
- <br/>
134
- &#9744; I have a boat
135
- <br/>
136
- __________
137
- <br/>
138
- Select a file: __________
139
- <br/>
140
- Select a car: __________
141
- <table border='1' width='50%'>
142
- <tr>
143
- <td/>
144
- </tr>
145
- </table>
146
- [Click Me!] [BUTTON]
141
+ Select a car: __________
142
+ <table border='1' width='50%'>
143
+ <tr>
144
+ <td/>
145
+ </tr>
146
+ </table>
147
+ [Click Me!] [BUTTON]
148
+ </div>
149
+ </div>
147
150
  </div>
148
- </div>
149
- </body>
150
- </html>
151
+ </body>
152
+ </html>
151
153
  DOC
152
154
 
153
- expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(html)
154
- expect(xmlpp(IsoDoc::WordConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(doc)
155
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
156
+ .convert("test", input, true))).to be_equivalent_to xmlpp(html)
157
+ expect(xmlpp(IsoDoc::WordConvert.new({})
158
+ .convert("test", input, true))).to be_equivalent_to xmlpp(doc)
155
159
  end
156
160
  end
@@ -139,7 +139,8 @@ RSpec.describe IsoDoc do
139
139
  <preface><foreword>
140
140
  <p>
141
141
  <ul>
142
- <li><concept><refterm>term</refterm>
142
+ <li>
143
+ <concept><refterm>term</refterm>
143
144
  <xref target='clause1'/>
144
145
  </concept></li>
145
146
  <li><concept><refterm>term</refterm>
@@ -208,6 +209,11 @@ RSpec.describe IsoDoc do
208
209
  <renderterm>word</renderterm>
209
210
  <termref base='IEV' target='135-13-13'>The IEV database</termref>
210
211
  </concept></li>
212
+ <li><concept><refterm>term</refterm>
213
+ <renderterm>word</renderterm>
214
+ <strong>error!</strong>
215
+ </concept>
216
+ </li>
211
217
  </ul>
212
218
  </p>
213
219
  </foreword></preface>
@@ -231,98 +237,90 @@ RSpec.describe IsoDoc do
231
237
  </iso-standard>
232
238
  INPUT
233
239
  presxml = <<~OUTPUT
234
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
235
- <preface><foreword displayorder="1">
236
- <p>
237
- <ul>
238
- <li>
239
- [term defined in <xref target="clause1">Clause 2</xref>]
240
- </li>
241
- <li>
242
- <em>term</em>
243
- [term defined in <xref target="clause1">Clause 2</xref>]
244
- </li>
245
- <li>
246
- <em>w[o]rd</em>
247
- [term defined in <xref target="clause1">Clause #1</xref>]
248
- </li>
249
- <li>
250
- <em>term</em>
251
- [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712">ISO 712</eref>]
252
- </li>
253
- <li>
254
- <em>word</em>
255
- [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712">The Aforementioned Citation</eref>]
256
- </li>
257
- <li>
258
- <em>word</em>
259
- [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712"><locality type="clause">
260
- <referenceFrom>3.1</referenceFrom>
261
- </locality><locality type="figure">
262
- <referenceFrom>a</referenceFrom>
263
- </locality>ISO 712, Clause 3.1, Figure a</eref>]
264
- </li>
265
- <li>
266
- <em>word</em>
267
- [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712"><localityStack>
268
- <locality type="clause">
269
- <referenceFrom>3.1</referenceFrom>
270
- </locality>
271
- </localityStack><localityStack>
272
- <locality type="figure">
273
- <referenceFrom>b</referenceFrom>
274
- </locality>
275
- </localityStack>ISO 712, Clause 3.1; Figure b</eref>]
276
- </li>
277
- <li>
278
- <em>word</em>
279
- [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712">
280
- <localityStack>
281
- <locality type="clause">
282
- <referenceFrom>3.1</referenceFrom>
283
- </locality>
284
- </localityStack>
285
- <localityStack>
286
- <locality type="figure">
287
- <referenceFrom>b</referenceFrom>
288
- </locality>
289
- </localityStack>
290
- The Aforementioned Citation
291
- </eref>]
292
- </li>
293
- <li>
294
- <em>word</em>
295
- [term defined in <termref base="IEV" target="135-13-13"/>]
296
- </li>
297
- <li>
298
- <em>word</em>
299
- [term defined in <termref base="IEV" target="135-13-13">The IEV database</termref>]
300
- </li>
301
- </ul>
302
- </p>
303
- </foreword></preface>
304
- <sections>
305
- <clause id="clause1" displayorder="3"><title depth="1">2.<tab/>Clause 1</title></clause>
306
- </sections>
307
- <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="2"><title depth="1">1.<tab/>Normative References</title>
308
- <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
309
- <bibitem id="ISO712" type="standard">
310
- <title format="text/plain">Cereals or cereal products</title>
311
- <title type="main" format="text/plain">Cereals and cereal products</title>
312
- <docidentifier type="ISO">ISO 712</docidentifier>
313
- <contributor>
314
- <role type="publisher"/>
315
- <organization>
316
- <name>International Organization for Standardization</name>
317
- </organization>
318
- </contributor>
319
- </bibitem>
320
- </references></bibliography>
321
- </iso-standard>
240
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
241
+ <preface><foreword displayorder="1">
242
+ <p>
243
+ <ul>
244
+ <li>
245
+ [term defined in <xref target="clause1">Clause 2</xref>]
246
+ </li>
247
+ <li>
248
+ <em>term</em> [term defined in <xref target="clause1">Clause 2</xref>]
249
+ </li>
250
+ <li>
251
+ <em>w[o]rd</em> [<xref target="clause1">Clause #1</xref>]
252
+ </li>
253
+ <li>
254
+ <em>term</em> [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712">ISO 712</eref>]
255
+ </li>
256
+ <li>
257
+ <em>word</em> [<eref bibitemid="ISO712" type="inline" citeas="ISO 712">The Aforementioned Citation</eref>]
258
+ </li>
259
+ <li>
260
+ <em>word</em> [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712"><locality type="clause">
261
+ <referenceFrom>3.1</referenceFrom>
262
+ </locality><locality type="figure">
263
+ <referenceFrom>a</referenceFrom>
264
+ </locality>ISO 712, Clause 3.1, Figure a</eref>]
265
+ </li>
266
+ <li>
267
+ <em>word</em> [term defined in <eref bibitemid="ISO712" type="inline" citeas="ISO 712"><localityStack>
268
+ <locality type="clause">
269
+ <referenceFrom>3.1</referenceFrom>
270
+ </locality>
271
+ </localityStack><localityStack>
272
+ <locality type="figure">
273
+ <referenceFrom>b</referenceFrom>
274
+ </locality>
275
+ </localityStack>ISO 712, Clause 3.1; Figure b</eref>]
276
+ </li>
277
+ <li>
278
+ <em>word</em> [<eref bibitemid="ISO712" type="inline" citeas="ISO 712">
279
+ <localityStack>
280
+ <locality type="clause">
281
+ <referenceFrom>3.1</referenceFrom>
282
+ </locality>
283
+ </localityStack>
284
+ <localityStack>
285
+ <locality type="figure">
286
+ <referenceFrom>b</referenceFrom>
287
+ </locality>
288
+ </localityStack>
289
+ The Aforementioned Citation
290
+ </eref>]
291
+ </li>
292
+ <li>
293
+ <em>word</em> [term defined in <termref base="IEV" target="135-13-13"/>]
294
+ </li>
295
+ <li>
296
+ <em>word</em> [<termref base="IEV" target="135-13-13">The IEV database</termref>]
297
+ </li>
298
+ <li> <em>word</em> <strong>error!</strong> </li>
299
+ </ul>
300
+ </p>
301
+ </foreword></preface>
302
+ <sections>
303
+ <clause id="clause1" displayorder="3"><title depth="1">2.<tab/>Clause 1</title></clause>
304
+ </sections>
305
+ <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder="2"><title depth="1">1.<tab/>Normative References</title>
306
+ <p>The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies.</p>
307
+ <bibitem id="ISO712" type="standard">
308
+ <title format="text/plain">Cereals or cereal products</title>
309
+ <title type="main" format="text/plain">Cereals and cereal products</title>
310
+ <docidentifier type="ISO">ISO 712</docidentifier>
311
+ <contributor>
312
+ <role type="publisher"/>
313
+ <organization>
314
+ <name>International Organization for Standardization</name>
315
+ </organization>
316
+ </contributor>
317
+ </bibitem>
318
+ </references></bibliography>
319
+ </iso-standard>
322
320
  OUTPUT
323
321
  output = <<~OUTPUT
324
322
  #{HTML_HDR}
325
- <br/>
323
+ <br/>
326
324
  <div>
327
325
  <h1 class='ForewordTitle'>Foreword</h1>
328
326
  <p>
@@ -340,7 +338,7 @@ RSpec.describe IsoDoc do
340
338
  </li>
341
339
  <li>
342
340
  <i>w[o]rd</i>
343
- [term defined in
341
+ [
344
342
  <a href='#clause1'>Clause #1</a>
345
343
  ]
346
344
  </li>
@@ -352,7 +350,7 @@ RSpec.describe IsoDoc do
352
350
  </li>
353
351
  <li>
354
352
  <i>word</i>
355
- [term defined in
353
+ [
356
354
  <a href='#ISO712'>The Aforementioned Citation</a>
357
355
  ]
358
356
  </li>
@@ -370,7 +368,7 @@ RSpec.describe IsoDoc do
370
368
  </li>
371
369
  <li>
372
370
  <i>word</i>
373
- [term defined in
371
+ [
374
372
  <a href='#ISO712'> The Aforementioned Citation </a>
375
373
  ]
376
374
  </li>
@@ -380,8 +378,9 @@ RSpec.describe IsoDoc do
380
378
  </li>
381
379
  <li>
382
380
  <i>word</i>
383
- [term defined in Termbase IEV, term ID 135-13-13]
381
+ [The IEV database]
384
382
  </li>
383
+ <li> <i>word</i> <b>error!</b> </li>
385
384
  </ul>
386
385
  </p>
387
386
  </div>
@@ -413,6 +412,216 @@ RSpec.describe IsoDoc do
413
412
  .convert("test", presxml, true))).to be_equivalent_to xmlpp(output)
414
413
  end
415
414
 
415
+ it "processes concept attributes" do
416
+ input = <<~INPUT
417
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
418
+ <preface><foreword>
419
+ <p>
420
+ <ul>
421
+ <li>
422
+ <concept ital="true"><refterm>term</refterm>
423
+ <renderterm>term</renderterm>
424
+ <xref target='clause1'/>
425
+ </concept></li>
426
+ <li><concept ref="true"><refterm>term</refterm>
427
+ <renderterm>term</renderterm>
428
+ <xref target='clause1'/>
429
+ </concept></li>
430
+ <li><concept ital="true" ref="true"><refterm>term</refterm>
431
+ <renderterm>term</renderterm>
432
+ <xref target='clause1'/>
433
+ </concept></li>
434
+ <li><concept ital="false"><refterm>term</refterm>
435
+ <renderterm>term</renderterm>
436
+ <xref target='clause1'/>
437
+ </concept></li>
438
+ <li><concept ref="false"><refterm>term</refterm>
439
+ <renderterm>term</renderterm>
440
+ <xref target='clause1'/>
441
+ </concept></li>
442
+ <li><concept ital="false" ref="false"><refterm>term</refterm>
443
+ <renderterm>term</renderterm>
444
+ <xref target='clause1'/>
445
+ </concept></li>
446
+ </ul></p>
447
+ </foreword></preface>
448
+ <sections>
449
+ <clause id="clause1"><title>Clause 1</title></clause>
450
+ </sections>
451
+ </iso-standard>
452
+ INPUT
453
+ presxml = <<~OUTPUT
454
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
455
+ <preface><foreword displayorder="1">
456
+ <p>
457
+ <ul>
458
+ <li>
459
+
460
+ <em>term</em>
461
+ [term defined in <xref target="clause1">Clause 1</xref>]
462
+ </li>
463
+ <li>
464
+ <em>term</em>
465
+ [term defined in <xref target="clause1">Clause 1</xref>]
466
+ </li>
467
+ <li>
468
+ <em>term</em>
469
+ [term defined in <xref target="clause1">Clause 1</xref>]
470
+ </li>
471
+ <li>
472
+ term
473
+ [term defined in <xref target="clause1">Clause 1</xref>]
474
+ </li>
475
+ <li>
476
+ <em>term</em>
477
+
478
+ </li>
479
+ <li>
480
+ term
481
+
482
+ </li>
483
+ </ul></p>
484
+ </foreword></preface>
485
+ <sections>
486
+ <clause id="clause1" displayorder="2"><title depth="1">1.<tab/>Clause 1</title></clause>
487
+ </sections>
488
+ </iso-standard>
489
+ OUTPUT
490
+ output = <<~OUTPUT
491
+ #{HTML_HDR}
492
+ <br/>
493
+ <div>
494
+ <h1 class='ForewordTitle'>Foreword</h1>
495
+ <p>
496
+ <ul>
497
+ <li>
498
+ <i>term</i>
499
+ [term defined in
500
+ <a href='#clause1'>Clause 1</a>
501
+ ]
502
+ </li>
503
+ <li>
504
+ <i>term</i>
505
+ [term defined in
506
+ <a href='#clause1'>Clause 1</a>
507
+ ]
508
+ </li>
509
+ <li>
510
+ <i>term</i>
511
+ [term defined in
512
+ <a href='#clause1'>Clause 1</a>
513
+ ]
514
+ </li>
515
+ <li>
516
+ term [term defined in
517
+ <a href='#clause1'>Clause 1</a>
518
+ ]
519
+ </li>
520
+ <li>
521
+ <i>term</i>
522
+ </li>
523
+ <li> term </li>
524
+ </ul>
525
+ </p>
526
+ </div>
527
+ <p class='zzSTDTitle1'/>
528
+ <div id='clause1'>
529
+ <h1>1.&#160; Clause 1</h1>
530
+ </div>
531
+ </div>
532
+ </body>
533
+ </html>
534
+ OUTPUT
535
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
536
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
537
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
538
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(output)
539
+ end
540
+
541
+ it "processes concept markup for symbols" do
542
+ input = <<~INPUT
543
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
544
+ <preface><foreword>
545
+ <p>
546
+ <ul>
547
+ <li><concept>
548
+ <refterm>term</refterm>
549
+ <renderterm>ISO</renderterm>
550
+ <xref target='d1'/>
551
+ </concept></li>
552
+ </ul>
553
+ </p>
554
+ </foreword>
555
+ </preface>
556
+ <sections>
557
+ <definitions id="d">
558
+ <dl>
559
+ <dt id="d1">ISO</dt> <dd>xyz</xyz>
560
+ <dt id="d2">IEC</dt> <dd>abc</xyz>
561
+ </dl>
562
+ </definitions>
563
+ </sections>
564
+ </iso-standard>
565
+ INPUT
566
+ presxml = <<~OUTPUT
567
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
568
+ <preface>
569
+ <foreword displayorder='1'>
570
+ <p>
571
+ <ul>
572
+ <li>ISO</li>
573
+ </ul>
574
+ </p>
575
+ </foreword>
576
+ </preface>
577
+ <sections>
578
+ <definitions id='d' displayorder='2'>
579
+ <title>1.</title>
580
+ <dl>
581
+ <dt id='d1'>ISO</dt>
582
+ <dd>xyz</dd>
583
+ <dt id='d2'>IEC</dt>
584
+ <dd>abc</dd>
585
+ </dl>
586
+ </definitions>
587
+ </sections>
588
+ </iso-standard>
589
+ OUTPUT
590
+ output = <<~OUTPUT
591
+ #{HTML_HDR}
592
+ <br/>
593
+ <div>
594
+ <h1 class='ForewordTitle'>Foreword</h1>
595
+ <p>
596
+ <ul>
597
+ <li>ISO</li>
598
+ </ul>
599
+ </p>
600
+ </div>
601
+ <p class='zzSTDTitle1'/>
602
+ <div id='d' class='Symbols'>
603
+ <h1>1.</h1>
604
+ <dl>
605
+ <dt id='d1'>
606
+ <p>ISO</p>
607
+ </dt>
608
+ <dd>xyz</dd>
609
+ <dt id='d2'>
610
+ <p>IEC</p>
611
+ </dt>
612
+ <dd>abc</dd>
613
+ </dl>
614
+ </div>
615
+ </div>
616
+ </body>
617
+ </html>
618
+ OUTPUT
619
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
620
+ .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
621
+ expect(xmlpp(IsoDoc::HtmlConvert.new({})
622
+ .convert("test", presxml, true))).to be_equivalent_to xmlpp(output)
623
+ end
624
+
416
625
  it "processes embedded inline formatting" do
417
626
  input = <<~INPUT
418
627
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -733,43 +942,43 @@ RSpec.describe IsoDoc do
733
942
  </iso-standard>
734
943
  INPUT
735
944
  presxml = <<~OUTPUT
736
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
737
- <preface><foreword displayorder="1">
738
- <p>
739
- <eref type="inline" bibitemid="ISO712" citeas="ISO 712">ISO 712</eref>
740
- <eref type="inline" bibitemid="ISO712">ISO 712</eref>
741
- <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom></locality>ISO 712, Table 1</eref>
742
- <eref type="inline" bibitemid="ISO712"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack>ISO 712, Table 1</eref>
743
- <eref type="inline" bibitemid="ISO712"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack><localityStack><locality type="clause"><referenceFrom>1</referenceFrom></locality></localityStack>ISO 712, Table 1; Clause 1</eref>
744
- <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712, Table 1&#x2013;1</eref>
745
- <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1</referenceFrom></locality><locality type="table"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1, Table 1</eref>
746
- <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1</eref>
747
- <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1.5</referenceFrom></locality>ISO 712, Clause 1.5</eref>
748
- <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom></locality>A</eref>
749
- <eref type="inline" bibitemid="ISO712"><locality type="whole"/>ISO 712, Whole of text</eref>
750
- <eref type="inline" bibitemid="ISO712"><locality type="locality:prelude"><referenceFrom>7</referenceFrom></locality>ISO 712, Prelude 7</eref>
751
- <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
752
- <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality>ISO 712</eref>
753
- <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1</eref>
754
- <eref type="inline" droploc="true" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, 1</eref>
755
- <eref type="inline" case="lowercase" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, clause 1</eref>
756
- </p>
757
- </foreword></preface>
758
- <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder=
759
- "2"><title depth='1'>1.<tab/>Normative References</title>
760
- <bibitem id="ISO712" type="standard">
761
- <title format="text/plain">Cereals and cereal products</title>
762
- <docidentifier>ISO 712</docidentifier>
763
- <contributor>
764
- <role type="publisher"/>
765
- <organization>
766
- <abbreviation>ISO</abbreviation>
767
- </organization>
768
- </contributor>
769
- </bibitem>
770
- </references>
771
- </bibliography>
772
- </iso-standard>
945
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
946
+ <preface><foreword displayorder="1">
947
+ <p>
948
+ <eref type="inline" bibitemid="ISO712" citeas="ISO 712">ISO 712</eref>
949
+ <eref type="inline" bibitemid="ISO712">ISO 712</eref>
950
+ <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom></locality>ISO 712, Table 1</eref>
951
+ <eref type="inline" bibitemid="ISO712"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack>ISO 712, Table 1</eref>
952
+ <eref type="inline" bibitemid="ISO712"><localityStack><locality type="table"><referenceFrom>1</referenceFrom></locality></localityStack><localityStack><locality type="clause"><referenceFrom>1</referenceFrom></locality></localityStack>ISO 712, Table 1; Clause 1</eref>
953
+ <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom><referenceTo>1</referenceTo></locality>ISO 712, Table 1&#x2013;1</eref>
954
+ <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1</referenceFrom></locality><locality type="table"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1, Table 1</eref>
955
+ <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1</eref>
956
+ <eref type="inline" bibitemid="ISO712"><locality type="clause"><referenceFrom>1.5</referenceFrom></locality>ISO 712, Clause 1.5</eref>
957
+ <eref type="inline" bibitemid="ISO712"><locality type="table"><referenceFrom>1</referenceFrom></locality>A</eref>
958
+ <eref type="inline" bibitemid="ISO712"><locality type="whole"/>ISO 712, Whole of text</eref>
959
+ <eref type="inline" bibitemid="ISO712"><locality type="locality:prelude"><referenceFrom>7</referenceFrom></locality>ISO 712, Prelude 7</eref>
960
+ <eref type="inline" bibitemid="ISO712" citeas="ISO 712">A</eref>
961
+ <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality>ISO 712</eref>
962
+ <eref type="inline" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, Clause 1</eref>
963
+ <eref type="inline" droploc="true" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, 1</eref>
964
+ <eref type="inline" case="lowercase" bibitemid="ISO712"><locality type="anchor"><referenceFrom>1</referenceFrom></locality><locality type="clause"><referenceFrom>1</referenceFrom></locality>ISO 712, clause 1</eref>
965
+ </p>
966
+ </foreword></preface>
967
+ <bibliography><references id="_normative_references" obligation="informative" normative="true" displayorder=
968
+ "2"><title depth='1'>1.<tab/>Normative References</title>
969
+ <bibitem id="ISO712" type="standard">
970
+ <title format="text/plain">Cereals and cereal products</title>
971
+ <docidentifier>ISO 712</docidentifier>
972
+ <contributor>
973
+ <role type="publisher"/>
974
+ <organization>
975
+ <abbreviation>ISO</abbreviation>
976
+ </organization>
977
+ </contributor>
978
+ </bibitem>
979
+ </references>
980
+ </bibliography>
981
+ </iso-standard>
773
982
  OUTPUT
774
983
 
775
984
  html = <<~OUTPUT
@@ -1092,36 +1301,36 @@ RSpec.describe IsoDoc do
1092
1301
  </iso-standard>
1093
1302
  INPUT
1094
1303
  output = <<~OUTPUT
1095
- <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
1096
- <bibdata>
1097
- <language current='true'>en</language>
1098
- <script current='true'>Latn</script>
1099
- </bibdata>
1100
- <preface>
1101
- <clause id='A' displayorder='1'>
1102
- <title depth='1'>ABC</title>
1103
- </clause>
1104
- <clause id='A1' displayorder='2'>
1105
- <title depth='1'>ABC/DEF</title>
1106
- </clause>
1107
- <clause id='A2' displayorder='3'>
1108
- <title depth='1'>ABC</title>
1109
- </clause>
1110
- <clause id='B' displayorder='4'>
1111
- <title depth='1'>GHI/JKL</title>
1112
- </clause>
1113
- <clause id='C' displayorder='5'>
1114
- <title depth='1'>DEF</title>
1115
- </clause>
1116
- <clause id='C1' displayorder='6'>
1117
- <title depth='1'>ABC/DEF</title>
1118
- </clause>
1119
- <clause id='C2' displayorder='7'>
1120
- <title depth='1'>DEF</title>
1121
- </clause>
1122
- <p displayorder='8'>A B D E</p>
1123
- </preface>
1124
- </iso-standard>
1304
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type='presentation'>
1305
+ <bibdata>
1306
+ <language current='true'>en</language>
1307
+ <script current='true'>Latn</script>
1308
+ </bibdata>
1309
+ <preface>
1310
+ <clause id='A' displayorder='1'>
1311
+ <title depth='1'>ABC</title>
1312
+ </clause>
1313
+ <clause id='A1' displayorder='2'>
1314
+ <title depth='1'>ABC/DEF</title>
1315
+ </clause>
1316
+ <clause id='A2' displayorder='3'>
1317
+ <title depth='1'>ABC</title>
1318
+ </clause>
1319
+ <clause id='B' displayorder='4'>
1320
+ <title depth='1'>GHI/JKL</title>
1321
+ </clause>
1322
+ <clause id='C' displayorder='5'>
1323
+ <title depth='1'>DEF</title>
1324
+ </clause>
1325
+ <clause id='C1' displayorder='6'>
1326
+ <title depth='1'>ABC/DEF</title>
1327
+ </clause>
1328
+ <clause id='C2' displayorder='7'>
1329
+ <title depth='1'>DEF</title>
1330
+ </clause>
1331
+ <p displayorder='8'>A B D E</p>
1332
+ </preface>
1333
+ </iso-standard>
1125
1334
  OUTPUT
1126
1335
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({})
1127
1336
  .convert("test", input, true)
@@ -2271,7 +2271,6 @@ RSpec.describe IsoDoc do
2271
2271
  output = <<~OUTPUT
2272
2272
  <body lang='en' xml:lang='en'>
2273
2273
  <main class='main-section'>
2274
- <button onclick='topFunction()' id='myBtn' title='Go to top'>Top</button>
2275
2274
  <br/>
2276
2275
  <div>
2277
2276
  <h1 class='ForewordTitle'>Foreword</h1>
@@ -189,7 +189,7 @@ RSpec.describe IsoDoc do
189
189
  <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
190
190
  [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
191
191
  [/TERMREF]</p>
192
- <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
192
+ <p>[TERMREF] t1 [/TERMREF]</p>
193
193
  <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
194
194
  <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
195
195
  <p class="AltTerms" style="text-align:left;">rough rice</p>
@@ -233,7 +233,7 @@ RSpec.describe IsoDoc do
233
233
  <a href="#ISO7301">ISO 7301:2011, Clause 3.1</a>
234
234
  [MODIFICATION] The term "cargo rice" is shown as deprecated, and Note 1 to entry is not included here
235
235
  [/TERMREF]</p>
236
- <p>[TERMREF] Termbase IEV, term ID xyz [/TERMREF]</p>
236
+ <p>[TERMREF] t1 [/TERMREF]</p>
237
237
  <p>[TERMREF] Termbase IEV, term ID xyz [MODIFICATION]with adjustments [/TERMREF]</p>
238
238
  <p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;">paddy</p><p class="AltTerms" style="text-align:left;">paddy rice</p>
239
239
  <p class="AltTerms" style="text-align:left;">rough rice</p>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciimath