metanorma-iso 1.9.3 → 1.9.4
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.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/isodoc.rng +17 -2
- data/lib/asciidoctor/iso/isostandard.rng +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +1 -0
- data/lib/isodoc/iso/iso.international-standard.xsl +1 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +21 -12
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/inline_spec.rb +250 -219
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d361028b55729e120ba979ff911c432c4c540c92c5bb8046d9924fa908ac7420
|
4
|
+
data.tar.gz: 9cabc0515d30da042e63c0728bec5efca3d0600ce05bddf23aa4051cae29bc53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
<
|
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="
|
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">
|
@@ -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,
|
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",
|
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",
|
128
|
-
|
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
|
135
|
-
if
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
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
|
-
|
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)
|
data/spec/isodoc/inline_spec.rb
CHANGED
@@ -131,26 +131,27 @@ RSpec.describe IsoDoc do
|
|
131
131
|
<sections>
|
132
132
|
</iso-standard>
|
133
133
|
INPUT
|
134
|
-
expect(xmlpp(output.sub(/<html/,
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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",
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
</
|
829
|
+
#{HTML_HDR}
|
830
|
+
<p class='zzSTDTitle1'/>
|
831
|
+
<div id='clause1'>
|
832
|
+
<h1>1  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.
|
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-
|
11
|
+
date: 2021-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: isodoc
|