metanorma-iso 1.9.3 → 1.9.4

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: ac1798683a3c7ca060a86feb2617005c4e642740a8d65c6221a65c1920799590
4
- data.tar.gz: 6e3935f47c7d2b9458c0c0768c336477a32ff263e1f6cba0d57cdaad47151e60
3
+ metadata.gz: d361028b55729e120ba979ff911c432c4c540c92c5bb8046d9924fa908ac7420
4
+ data.tar.gz: 9cabc0515d30da042e63c0728bec5efca3d0600ce05bddf23aa4051cae29bc53
5
5
  SHA512:
6
- metadata.gz: c9619fe733adeddd4064d3531a6cdca00f1c841234729c24db198c88f24e7cce87ae9b4e847c7df5f52f0414b8392c3c581c88cb19f0a2ad2affc2f1693508f5
7
- data.tar.gz: c745a76c0834e67c582649c7676d8fa140e1c5a89f20d67fea317e1fb37251a339155a17e980250e96f54d2da0b0e6d05bcd382743bd91b8979571ba030cec6b
6
+ metadata.gz: c570db53cb7e7d27f9bc10ab473ecc31f6d036dec343048f4992e79acc4bdd6a0be3aeaf26abdf56f21501d4af48475557641e81417a873ee5205e47330d20eb
7
+ data.tar.gz: 33da49640740fb46d457ddb28a68bbf4d7b64d01e604c003d5ef8846405173274df650ddb0f37833e203a224f344afe18d12f4db67a4c81682c3be50e6b3eee3
@@ -990,6 +990,16 @@
990
990
  <data type="boolean"/>
991
991
  </attribute>
992
992
  </optional>
993
+ <optional>
994
+ <attribute name="linkmention">
995
+ <data type="boolean"/>
996
+ </attribute>
997
+ </optional>
998
+ <optional>
999
+ <attribute name="linkref">
1000
+ <data type="boolean"/>
1001
+ </attribute>
1002
+ </optional>
993
1003
  <optional>
994
1004
  <element name="refterm">
995
1005
  <zeroOrMore>
@@ -1700,7 +1710,9 @@
1700
1710
  <zeroOrMore>
1701
1711
  <ref name="termgrammar"/>
1702
1712
  </zeroOrMore>
1703
- <ref name="definition"/>
1713
+ <oneOrMore>
1714
+ <ref name="termdefinition"/>
1715
+ </oneOrMore>
1704
1716
  <zeroOrMore>
1705
1717
  <ref name="termnote"/>
1706
1718
  </zeroOrMore>
@@ -1763,7 +1775,7 @@
1763
1775
  </oneOrMore>
1764
1776
  </element>
1765
1777
  </define>
1766
- <define name="definition">
1778
+ <define name="termdefinition">
1767
1779
  <element name="definition">
1768
1780
  <oneOrMore>
1769
1781
  <choice>
@@ -1772,6 +1784,9 @@
1772
1784
  <ref name="formula"/>
1773
1785
  </choice>
1774
1786
  </oneOrMore>
1787
+ <zeroOrMore>
1788
+ <ref name="termsource"/>
1789
+ </zeroOrMore>
1775
1790
  </element>
1776
1791
  </define>
1777
1792
  <define name="termnote">
@@ -174,7 +174,7 @@
174
174
  <optional>
175
175
  <ref name="termdomain"/>
176
176
  </optional>
177
- <ref name="definition"/>
177
+ <ref name="termdefinition"/>
178
178
  <zeroOrMore>
179
179
  <ref name="termnote"/>
180
180
  </zeroOrMore>
@@ -6635,6 +6635,7 @@
6635
6635
  </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
6636
6636
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
6637
6637
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
6638
+
6638
6639
  <xsl:apply-templates/>
6639
6640
  </fo:block>
6640
6641
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
@@ -6635,6 +6635,7 @@
6635
6635
  </xsl:template><xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
6636
6636
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
6637
6637
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
6638
+
6638
6639
  <xsl:apply-templates/>
6639
6640
  </fo:block>
6640
6641
  </xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
@@ -68,7 +68,8 @@ module IsoDoc
68
68
  subsection = from&.text&.match(/\./)
69
69
  type = type.downcase
70
70
  lang == "zh" and
71
- return l10n(eref_localities1_zh(target, type, from, upto, node, delim))
71
+ return l10n(eref_localities1_zh(target, type, from, upto, node,
72
+ delim))
72
73
  ret = if delim == ";" then ";"
73
74
  else
74
75
  type == "list" ? "" : delim
@@ -117,27 +118,35 @@ module IsoDoc
117
118
  concept_term(f, m)
118
119
  end
119
120
  docxml.xpath(ns("//concept")).each do |node|
120
- concept_render(node, node["ital"] || "false", node["ref"] || "false")
121
+ concept_render(node, ital: node["ital"] || "false",
122
+ ref: node["ref"] || "false",
123
+ linkref: node["linkref"] || "true",
124
+ linkmention: node["linkmention"] || "false")
121
125
  end
122
126
  end
123
127
 
124
128
  def concept_term(node, seen)
125
129
  term = node&.at(ns("./refterm"))&.to_xml
126
130
  if term && seen[term]
127
- concept_render(node, node["ital"] || "false", node["ref"] || "false")
128
- else concept_render(node, node["ital"] || "true", node["ref"] || "true")
131
+ concept_render(node, ital: node["ital"] || "false",
132
+ ref: node["ref"] || "false",
133
+ linkref: node["linkref"] || "true",
134
+ linkmention: node["linkmention"] || "false")
135
+ else concept_render(node, ital: node["ital"] || "true",
136
+ ref: node["ref"] || "true",
137
+ linkref: node["linkref"] || "true",
138
+ linkmention: node["linkmention"] || "false")
129
139
  end
130
140
  seen[term] = true if term
131
141
  seen
132
142
  end
133
143
 
134
- def concept1_ref(node, ref)
135
- if r = node.at(ns("./xref | ./eref | ./termref"))
136
- return r.remove if ref == "false"
137
-
138
- r.name == "termref" and
139
- r.replace(@i18n.term_defined_in.sub(/%/, r.to_xml)) or
140
- r.replace("(#{r.to_xml})")
144
+ def concept1_ref_content(ref)
145
+ if ref.name == "termref"
146
+ ref.replace(@i18n.term_defined_in.sub(/%/,
147
+ ref.to_xml))
148
+ else
149
+ ref.replace("(#{ref.to_xml})")
141
150
  end
142
151
  end
143
152
 
@@ -160,7 +169,7 @@ module IsoDoc
160
169
  # i = display_order_at(docxml, "//sections/definitions", i)
161
170
  # i = display_order_xpath(docxml, @xrefs.klass.middle_clause(docxml), i)
162
171
  i = display_order_xpath(docxml, "//sections/clause[not(@type = 'scope')] | "\
163
- "//sections/terms | //sections/definitions", i)
172
+ "//sections/terms | //sections/definitions", i)
164
173
  i = display_order_xpath(docxml, "//annex", i)
165
174
  i = display_order_xpath(docxml, @xrefs.klass.bibliography_xpath, i)
166
175
  display_order_xpath(docxml, "//indexsect", i)
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "1.9.3".freeze
3
+ VERSION = "1.9.4".freeze
4
4
  end
5
5
  end
@@ -131,26 +131,27 @@ RSpec.describe IsoDoc do
131
131
  <sections>
132
132
  </iso-standard>
133
133
  INPUT
134
- expect(xmlpp(output.sub(/<html/, "<html xmlns:m='m'"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
135
- #{HTML_HDR.sub(/<html/, "<html xmlns:m='m'")}
136
- <br/>
137
- <div>
138
- <h1 class="ForewordTitle">Foreword</h1>
139
- <p>
140
- <span class="stem">(#(A)#)</span>
141
- <span class="stem">
142
- <m:math>
143
- <m:row>X</m:row>
144
- </m:math>
145
- </span>
146
- <span class="stem">Latex?</span>
147
- </p>
148
- </div>
149
- <p class="zzSTDTitle1"/>
150
- </div>
151
- </body>
152
- </html>
153
- OUTPUT
134
+ expect(xmlpp(output.sub(/<html/,
135
+ "<html xmlns:m='m'"))).to be_equivalent_to xmlpp(<<~"OUTPUT")
136
+ #{HTML_HDR.sub(/<html/, "<html xmlns:m='m'")}
137
+ <br/>
138
+ <div>
139
+ <h1 class="ForewordTitle">Foreword</h1>
140
+ <p>
141
+ <span class="stem">(#(A)#)</span>
142
+ <span class="stem">
143
+ <m:math>
144
+ <m:row>X</m:row>
145
+ </m:math>
146
+ </span>
147
+ <span class="stem">Latex?</span>
148
+ </p>
149
+ </div>
150
+ <p class="zzSTDTitle1"/>
151
+ </div>
152
+ </body>
153
+ </html>
154
+ OUTPUT
154
155
  end
155
156
 
156
157
  it "overrides AsciiMath delimiters" do
@@ -232,163 +233,165 @@ RSpec.describe IsoDoc do
232
233
  end
233
234
 
234
235
  it "processes eref content" do
235
- output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true)
236
- <iso-standard xmlns="http://riboseinc.com/isoxml">
237
- <preface>
238
- <foreword>
239
- <p>
240
- <eref bibitemid="IEV" citeas="IEV" type="inline">
241
- <locality type="clause">
242
- <referenceFrom>1-2-3</referenceFrom>
243
- </locality>
244
- </eref>
245
- <eref bibitemid="ISO712" citeas="ISO 712" type="inline"/>
246
- <eref bibitemid="ISO712" type="inline"/>
247
- <eref bibitemid="ISO712" type="inline">
248
- <locality type="table">
249
- <referenceFrom>1</referenceFrom>
250
- </locality>
251
- </eref>
252
- <eref bibitemid="ISO712" type="inline">
253
- <locality type="table">
254
- <referenceFrom>1</referenceFrom>
255
- <referenceTo>1</referenceTo>
256
- </locality>
257
- </eref>
258
- <eref bibitemid="ISO712" type="inline">
259
- <locality type="clause">
260
- <referenceFrom>1</referenceFrom>
261
- </locality>
262
- <locality type="table">
263
- <referenceFrom>1</referenceFrom>
264
- </locality>
265
- </eref>
266
- <eref bibitemid="ISO712" type="inline">
267
- <locality type="clause">
268
- <referenceFrom>1</referenceFrom>
269
- </locality>
270
- <locality type="list">
271
- <referenceFrom>a</referenceFrom>
272
- </locality>
273
- </eref>
274
- <eref bibitemid="ISO712" type="inline">
275
- <locality type="clause">
276
- <referenceFrom>1</referenceFrom>
277
- </locality>
278
- </eref>
279
- <eref bibitemid="ISO712" type="inline">
280
- <locality type="clause">
281
- <referenceFrom>1.5</referenceFrom>
282
- </locality>
283
- </eref>
284
- <eref bibitemid="ISO712" type="inline">
285
- <locality type="table">
286
- <referenceFrom>1</referenceFrom>
287
- </locality>A</eref>
288
- <eref bibitemid="ISO712" type="inline">
289
- <locality type="whole"/>
290
- </eref>
291
- <eref bibitemid="ISO712" type="inline">
292
- <locality type="locality:prelude">
293
- <referenceFrom>7</referenceFrom>
294
- </locality>
295
- </eref>
296
- <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
297
- </p>
298
- </foreword>
299
- </preface>
300
- <bibliography>
301
- <references id="_normative_references" normative="true" obligation="informative">
302
- <title>Normative References</title>
303
- <bibitem id="ISO712" type="standard">
304
- <title format="text/plain">Cereals and cereal products</title>
305
- <docidentifier>ISO 712</docidentifier>
306
- <contributor>
307
- <role type="publisher"/>
308
- <organization>
309
- <abbreviation>ISO</abbreviation>
310
- </organization>
311
- </contributor>
312
- </bibitem>
313
- </references>
314
- </bibliography>
315
- </iso-standard>
316
- INPUT
317
- expect(xmlpp(output).sub(%r{<i18nyaml>.*</i18nyaml>}m, "")).to be_equivalent_to xmlpp(<<~"OUTPUT")
318
- <?xml version='1.0'?>
319
- <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
320
- <preface>
321
- <foreword displayorder="1">
322
- <p>
323
- <eref bibitemid="IEV" citeas="IEV" type="inline">
324
- <locality type="clause">
325
- <referenceFrom>1-2-3</referenceFrom>
326
- </locality>IEV, 1-2-3</eref>
327
- <eref bibitemid="ISO712" citeas="ISO 712" type="inline">ISO 712</eref>
328
- <eref bibitemid="ISO712" type="inline">ISO 712</eref>
329
- <eref bibitemid="ISO712" type="inline">
330
- <locality type="table">
331
- <referenceFrom>1</referenceFrom>
332
- </locality>ISO 712, Table 1</eref>
333
- <eref bibitemid="ISO712" type="inline">
334
- <locality type="table">
335
- <referenceFrom>1</referenceFrom>
336
- <referenceTo>1</referenceTo>
337
- </locality>ISO 712, Table 1–1</eref>
338
- <eref bibitemid="ISO712" type="inline">
339
- <locality type="clause">
340
- <referenceFrom>1</referenceFrom>
341
- </locality>
342
- <locality type="table">
343
- <referenceFrom>1</referenceFrom>
344
- </locality>ISO 712, Clause 1, Table 1</eref>
345
- <eref bibitemid="ISO712" type="inline">
346
- <locality type="clause">
347
- <referenceFrom>1</referenceFrom>
348
- </locality>
349
- <locality type="list">
350
- <referenceFrom>a</referenceFrom>
351
- </locality>ISO 712, Clause 1 a)</eref>
352
- <eref bibitemid="ISO712" type="inline">
353
- <locality type="clause">
354
- <referenceFrom>1</referenceFrom>
355
- </locality>ISO 712, Clause 1</eref>
356
- <eref bibitemid="ISO712" type="inline">
357
- <locality type="clause">
358
- <referenceFrom>1.5</referenceFrom>
359
- </locality>ISO 712, 1.5</eref>
360
- <eref bibitemid="ISO712" type="inline">
361
- <locality type="table">
362
- <referenceFrom>1</referenceFrom>
363
- </locality>A</eref>
364
- <eref bibitemid="ISO712" type="inline">
365
- <locality type="whole"/>ISO 712, Whole of text</eref>
366
- <eref bibitemid="ISO712" type="inline">
367
- <locality type="locality:prelude">
368
- <referenceFrom>7</referenceFrom>
369
- </locality>ISO 712, Prelude 7</eref>
370
- <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
371
- </p>
372
- </foreword>
373
- </preface>
374
- <bibliography>
375
- <references id="_normative_references" normative="true" obligation="informative" displayorder="2">
376
- <title depth="1">1<tab/>
377
- Normative References</title>
378
- <bibitem id="ISO712" type="standard">
379
- <title format="text/plain">Cereals and cereal products</title>
380
- <docidentifier>ISO 712</docidentifier>
381
- <contributor>
382
- <role type="publisher"/>
383
- <organization>
384
- <abbreviation>ISO</abbreviation>
385
- </organization>
386
- </contributor>
387
- </bibitem>
388
- </references>
389
- </bibliography>
390
- </iso-standard>
391
- OUTPUT
236
+ output = IsoDoc::Iso::PresentationXMLConvert.new({}).convert("test",
237
+ <<~"INPUT", true)
238
+ <iso-standard xmlns="http://riboseinc.com/isoxml">
239
+ <preface>
240
+ <foreword>
241
+ <p>
242
+ <eref bibitemid="IEV" citeas="IEV" type="inline">
243
+ <locality type="clause">
244
+ <referenceFrom>1-2-3</referenceFrom>
245
+ </locality>
246
+ </eref>
247
+ <eref bibitemid="ISO712" citeas="ISO 712" type="inline"/>
248
+ <eref bibitemid="ISO712" type="inline"/>
249
+ <eref bibitemid="ISO712" type="inline">
250
+ <locality type="table">
251
+ <referenceFrom>1</referenceFrom>
252
+ </locality>
253
+ </eref>
254
+ <eref bibitemid="ISO712" type="inline">
255
+ <locality type="table">
256
+ <referenceFrom>1</referenceFrom>
257
+ <referenceTo>1</referenceTo>
258
+ </locality>
259
+ </eref>
260
+ <eref bibitemid="ISO712" type="inline">
261
+ <locality type="clause">
262
+ <referenceFrom>1</referenceFrom>
263
+ </locality>
264
+ <locality type="table">
265
+ <referenceFrom>1</referenceFrom>
266
+ </locality>
267
+ </eref>
268
+ <eref bibitemid="ISO712" type="inline">
269
+ <locality type="clause">
270
+ <referenceFrom>1</referenceFrom>
271
+ </locality>
272
+ <locality type="list">
273
+ <referenceFrom>a</referenceFrom>
274
+ </locality>
275
+ </eref>
276
+ <eref bibitemid="ISO712" type="inline">
277
+ <locality type="clause">
278
+ <referenceFrom>1</referenceFrom>
279
+ </locality>
280
+ </eref>
281
+ <eref bibitemid="ISO712" type="inline">
282
+ <locality type="clause">
283
+ <referenceFrom>1.5</referenceFrom>
284
+ </locality>
285
+ </eref>
286
+ <eref bibitemid="ISO712" type="inline">
287
+ <locality type="table">
288
+ <referenceFrom>1</referenceFrom>
289
+ </locality>A</eref>
290
+ <eref bibitemid="ISO712" type="inline">
291
+ <locality type="whole"/>
292
+ </eref>
293
+ <eref bibitemid="ISO712" type="inline">
294
+ <locality type="locality:prelude">
295
+ <referenceFrom>7</referenceFrom>
296
+ </locality>
297
+ </eref>
298
+ <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
299
+ </p>
300
+ </foreword>
301
+ </preface>
302
+ <bibliography>
303
+ <references id="_normative_references" normative="true" obligation="informative">
304
+ <title>Normative References</title>
305
+ <bibitem id="ISO712" type="standard">
306
+ <title format="text/plain">Cereals and cereal products</title>
307
+ <docidentifier>ISO 712</docidentifier>
308
+ <contributor>
309
+ <role type="publisher"/>
310
+ <organization>
311
+ <abbreviation>ISO</abbreviation>
312
+ </organization>
313
+ </contributor>
314
+ </bibitem>
315
+ </references>
316
+ </bibliography>
317
+ </iso-standard>
318
+ INPUT
319
+ expect(xmlpp(output).sub(%r{<i18nyaml>.*</i18nyaml>}m,
320
+ "")).to be_equivalent_to xmlpp(<<~"OUTPUT")
321
+ <?xml version='1.0'?>
322
+ <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
323
+ <preface>
324
+ <foreword displayorder="1">
325
+ <p>
326
+ <eref bibitemid="IEV" citeas="IEV" type="inline">
327
+ <locality type="clause">
328
+ <referenceFrom>1-2-3</referenceFrom>
329
+ </locality>IEV, 1-2-3</eref>
330
+ <eref bibitemid="ISO712" citeas="ISO 712" type="inline">ISO 712</eref>
331
+ <eref bibitemid="ISO712" type="inline">ISO 712</eref>
332
+ <eref bibitemid="ISO712" type="inline">
333
+ <locality type="table">
334
+ <referenceFrom>1</referenceFrom>
335
+ </locality>ISO 712, Table 1</eref>
336
+ <eref bibitemid="ISO712" type="inline">
337
+ <locality type="table">
338
+ <referenceFrom>1</referenceFrom>
339
+ <referenceTo>1</referenceTo>
340
+ </locality>ISO 712, Table 1–1</eref>
341
+ <eref bibitemid="ISO712" type="inline">
342
+ <locality type="clause">
343
+ <referenceFrom>1</referenceFrom>
344
+ </locality>
345
+ <locality type="table">
346
+ <referenceFrom>1</referenceFrom>
347
+ </locality>ISO 712, Clause 1, Table 1</eref>
348
+ <eref bibitemid="ISO712" type="inline">
349
+ <locality type="clause">
350
+ <referenceFrom>1</referenceFrom>
351
+ </locality>
352
+ <locality type="list">
353
+ <referenceFrom>a</referenceFrom>
354
+ </locality>ISO 712, Clause 1 a)</eref>
355
+ <eref bibitemid="ISO712" type="inline">
356
+ <locality type="clause">
357
+ <referenceFrom>1</referenceFrom>
358
+ </locality>ISO 712, Clause 1</eref>
359
+ <eref bibitemid="ISO712" type="inline">
360
+ <locality type="clause">
361
+ <referenceFrom>1.5</referenceFrom>
362
+ </locality>ISO 712, 1.5</eref>
363
+ <eref bibitemid="ISO712" type="inline">
364
+ <locality type="table">
365
+ <referenceFrom>1</referenceFrom>
366
+ </locality>A</eref>
367
+ <eref bibitemid="ISO712" type="inline">
368
+ <locality type="whole"/>ISO 712, Whole of text</eref>
369
+ <eref bibitemid="ISO712" type="inline">
370
+ <locality type="locality:prelude">
371
+ <referenceFrom>7</referenceFrom>
372
+ </locality>ISO 712, Prelude 7</eref>
373
+ <eref bibitemid="ISO712" citeas="ISO 712" type="inline">A</eref>
374
+ </p>
375
+ </foreword>
376
+ </preface>
377
+ <bibliography>
378
+ <references id="_normative_references" normative="true" obligation="informative" displayorder="2">
379
+ <title depth="1">1<tab/>
380
+ Normative References</title>
381
+ <bibitem id="ISO712" type="standard">
382
+ <title format="text/plain">Cereals and cereal products</title>
383
+ <docidentifier>ISO 712</docidentifier>
384
+ <contributor>
385
+ <role type="publisher"/>
386
+ <organization>
387
+ <abbreviation>ISO</abbreviation>
388
+ </organization>
389
+ </contributor>
390
+ </bibitem>
391
+ </references>
392
+ </bibliography>
393
+ </iso-standard>
394
+ OUTPUT
392
395
  end
393
396
 
394
397
  it "processes concept markup" do
@@ -398,7 +401,7 @@ RSpec.describe IsoDoc do
398
401
  <terms id="Terms">
399
402
  <p>
400
403
  <ul>
401
- <li><concept><refterm>term0</refterm>
404
+ <li><concept><refterm>term0</refterm>
402
405
  <xref target='clause1'/>
403
406
  </concept></li>
404
407
  <li><concept><refterm>term1</refterm>
@@ -742,7 +745,7 @@ RSpec.describe IsoDoc do
742
745
  expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
743
746
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
744
747
  end
745
-
748
+
746
749
  it "processes concept attributes" do
747
750
  input = <<~INPUT
748
751
  <iso-standard xmlns="http://riboseinc.com/isoxml">
@@ -776,20 +779,23 @@ RSpec.describe IsoDoc do
776
779
  <renderterm>term</renderterm>
777
780
  <xref target='clause1'/>
778
781
  </concept></li>
782
+ <li><concept ital="true" ref="true" linkmention="true" linkref="true"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
783
+ <li><concept ital="true" ref="true" linkmention="true" linkref="false"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
784
+ <li><concept ital="true" ref="true" linkmention="false" linkref="true"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
785
+ <li><concept ital="true" ref="true" linkmention="false" linkref="false"><refterm>term</refterm><renderterm>term</renderterm><xref target='clause1'/></concept></li>
779
786
  </ul></p>
780
787
  </terms>
781
788
  </sections>
782
789
  </iso-standard>
783
790
  INPUT
784
791
  presxml = <<~OUTPUT
785
- <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
792
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
786
793
  <sections>
787
794
  <clause id="clause1" displayorder="1"><title depth="1">1<tab/>Clause 1</title></clause>
788
795
  <terms id="A" displayorder="2"><title>2</title>
789
796
  <p>
790
797
  <ul>
791
798
  <li>
792
-
793
799
  <em>term</em>
794
800
  (<xref target="clause1">Clause 1</xref>)
795
801
  </li>
@@ -803,57 +809,82 @@ RSpec.describe IsoDoc do
803
809
  </li>
804
810
  <li>
805
811
  term
806
-
807
812
  </li>
808
813
  <li>
809
814
  term
810
-
811
815
  </li>
812
816
  <li>
813
817
  term
814
-
815
818
  </li>
819
+ <li><xref target="clause1"><em>term</em></xref> (<xref target="clause1">Clause 1</xref>)</li>
820
+ <li><xref target="clause1"><em>term</em></xref> (Clause 1)</li>
821
+ <li><em>term</em> (<xref target="clause1">Clause 1</xref>)</li>
822
+ <li><em>term</em> (Clause 1)</li>
816
823
  </ul></p>
817
824
  </terms>
818
825
  </sections>
819
826
  </iso-standard>
820
827
  OUTPUT
821
828
  output = <<~OUTPUT
822
- #{HTML_HDR}
823
- <p class='zzSTDTitle1'/>
824
- <div id='clause1'>
825
- <h1>1&#160; Clause 1</h1>
826
- </div>
827
- <div id='A'>
828
- <h1>2</h1>
829
- <p>
830
- <ul>
831
- <li>
832
- <i>term</i>
833
- (
834
- <a href='#clause1'>Clause 1</a>
835
- )
836
- </li>
837
- <li>
838
- term (
839
- <a href='#clause1'>Clause 1</a>
840
- )
841
- </li>
842
- <li>
843
- <i>term</i>
844
- (
845
- <a href='#clause1'>Clause 1</a>
846
- )
847
- </li>
848
- <li> term </li>
849
- <li> term </li>
850
- <li> term </li>
851
- </ul>
852
- </p>
853
- </div>
854
- </div>
855
- </body>
856
- </html>
829
+ #{HTML_HDR}
830
+ <p class='zzSTDTitle1'/>
831
+ <div id='clause1'>
832
+ <h1>1&#160; Clause 1</h1>
833
+ </div>
834
+ <div id='A'>
835
+ <h1>2</h1>
836
+ <p>
837
+ <ul>
838
+ <li>
839
+ <i>term</i>
840
+ (
841
+ <a href='#clause1'>Clause 1</a>
842
+ )
843
+ </li>
844
+ <li>
845
+ term (
846
+ <a href='#clause1'>Clause 1</a>
847
+ )
848
+ </li>
849
+ <li>
850
+ <i>term</i>
851
+ (
852
+ <a href='#clause1'>Clause 1</a>
853
+ )
854
+ </li>
855
+ <li> term </li>
856
+ <li> term </li>
857
+ <li> term </li>
858
+ <li>
859
+ <a href='#clause1'>
860
+ <i>term</i>
861
+ </a>
862
+ (
863
+ <a href='#clause1'>Clause 1</a>
864
+ )
865
+ </li>
866
+ <li>
867
+ <a href='#clause1'>
868
+ <i>term</i>
869
+ </a>
870
+ (Clause 1)
871
+ </li>
872
+ <li>
873
+ <i>term</i>
874
+ (
875
+ <a href='#clause1'>Clause 1</a>
876
+ )
877
+ </li>
878
+ <li>
879
+ <i>term</i>
880
+ (Clause 1)
881
+ </li>
882
+ </ul>
883
+ </p>
884
+ </div>
885
+ </div>
886
+ </body>
887
+ </html>
857
888
  OUTPUT
858
889
  expect(xmlpp(IsoDoc::Iso::PresentationXMLConvert.new({})
859
890
  .convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.3
4
+ version: 1.9.4
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-08-30 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: isodoc