metanorma-iso 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html2doc/lists.rb +142 -10
- data/lib/isodoc/iso/base_convert.rb +10 -0
- data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -0
- data/lib/isodoc/iso/html/isodoc-dis.css +170 -252
- data/lib/isodoc/iso/html/isodoc-dis.scss +170 -245
- data/lib/isodoc/iso/html/isodoc.css +38 -13
- data/lib/isodoc/iso/html/isodoc.scss +38 -12
- data/lib/isodoc/iso/html/style-human.css +14 -1
- data/lib/isodoc/iso/html/style-human.scss +10 -1
- data/lib/isodoc/iso/html/style-iso.css +35 -23
- data/lib/isodoc/iso/html/style-iso.scss +31 -23
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +1 -6
- data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +24 -13
- data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
- data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -2
- data/lib/isodoc/iso/html_convert.rb +5 -0
- data/lib/isodoc/iso/i18n-en.yaml +32 -4
- data/lib/isodoc/iso/i18n-fr.yaml +29 -3
- data/lib/isodoc/iso/i18n-ru.yaml +32 -4
- data/lib/isodoc/iso/i18n-zh-Hans.yaml +32 -3
- data/lib/isodoc/iso/i18n.rb +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +332 -187
- data/lib/isodoc/iso/iso.international-standard.xsl +332 -187
- data/lib/isodoc/iso/metadata.rb +63 -63
- data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
- data/lib/isodoc/iso/presentation_xml_convert.rb +14 -3
- data/lib/isodoc/iso/presentation_xref.rb +8 -2
- data/lib/isodoc/iso/sections.rb +1 -1
- data/lib/isodoc/iso/word_cleanup.rb +3 -0
- data/lib/isodoc/iso/word_convert.rb +6 -3
- data/lib/isodoc/iso/word_dis_cleanup.rb +235 -0
- data/lib/isodoc/iso/word_dis_convert.rb +47 -108
- data/lib/isodoc/iso/xref.rb +34 -6
- data/lib/metanorma/iso/base.rb +20 -1
- data/lib/metanorma/iso/biblio.rng +32 -34
- data/lib/metanorma/iso/boilerplate-fr.xml +3 -0
- data/lib/metanorma/iso/boilerplate-ru.xml +3 -0
- data/lib/metanorma/iso/boilerplate.xml +3 -0
- data/lib/metanorma/iso/cleanup.rb +28 -1
- data/lib/metanorma/iso/front.rb +31 -6
- data/lib/metanorma/iso/front_id.rb +2 -0
- data/lib/metanorma/iso/isodoc.rng +9 -0
- data/lib/metanorma/iso/isostandard.rng +30 -12
- data/lib/metanorma/iso/macros.rb +29 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/spec/isodoc/amd_spec.rb +4 -30
- data/spec/isodoc/blocks_spec.rb +499 -2
- data/spec/isodoc/i18n_spec.rb +145 -80
- data/spec/isodoc/iso_spec.rb +50 -169
- data/spec/isodoc/metadata_spec.rb +224 -83
- data/spec/isodoc/postproc_spec.rb +41 -5
- data/spec/isodoc/section_spec.rb +12 -6
- data/spec/isodoc/word_dis_spec.rb +1273 -147
- data/spec/isodoc/xref_spec.rb +87 -13
- data/spec/metanorma/amd_spec.rb +53 -1
- data/spec/metanorma/base_spec.rb +185 -10
- data/spec/metanorma/blocks_spec.rb +54 -0
- data/spec/metanorma/lists_spec.rb +2 -2
- data/spec/metanorma/section_spec.rb +2 -2
- data/spec/spec_helper.rb +13 -4
- data/spec/vcr_cassettes/withdrawn_iso.yml +27 -27
- metadata +7 -8
- data/docs/asciiiso-syntax.adoc +0 -307
- data/docs/guidance.adoc +0 -487
- data/docs/navigation.adoc +0 -23
- data/docs/quickstart.adoc +0 -179
- data/lib/isodoc/iso/presentation_inline.rb +0 -90
data/spec/isodoc/i18n_spec.rb
CHANGED
@@ -93,7 +93,7 @@ RSpec.describe IsoDoc do
|
|
93
93
|
<bibdata>
|
94
94
|
<status>
|
95
95
|
<stage abbreviation='IS' language=''>60</stage>
|
96
|
-
<stage abbreviation='IS' language='en'>International
|
96
|
+
<stage abbreviation='IS' language='en'>International Standard</stage>
|
97
97
|
</status>
|
98
98
|
<language current='true'>en</language>
|
99
99
|
<ext>
|
@@ -308,7 +308,7 @@ RSpec.describe IsoDoc do
|
|
308
308
|
<br clear='all' class='section'/>
|
309
309
|
</p>
|
310
310
|
<div class='WordSection3'>
|
311
|
-
<p class='
|
311
|
+
<p class='zzSTDTitle'/>
|
312
312
|
<div id='D'>
|
313
313
|
<h1>
|
314
314
|
1
|
@@ -453,90 +453,90 @@ RSpec.describe IsoDoc do
|
|
453
453
|
it "defaults to English" do
|
454
454
|
output = IsoDoc::Iso::PresentationXMLConvert.new({})
|
455
455
|
.convert("test", <<~"INPUT", true)
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
456
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
457
|
+
<bibdata>
|
458
|
+
<status>
|
459
|
+
<stage abbreviation='IS' language=''>60</stage>
|
460
|
+
</status>
|
461
|
+
<language>tlh</language>
|
462
|
+
<ext>
|
463
|
+
<doctype language=''>international-standard</doctype>
|
464
|
+
</ext>
|
465
|
+
</bibdata>
|
466
|
+
<preface>
|
467
|
+
<foreword obligation="informative">
|
468
|
+
<title>Foreword</title>
|
469
|
+
<p id="A">This is a preamble</p>
|
470
|
+
</foreword>
|
471
|
+
<introduction id="B" obligation="informative">
|
472
|
+
<title>Introduction</title>
|
473
|
+
<clause id="C" inline-header="false" obligation="informative">
|
474
|
+
<title>Introduction Subsection</title>
|
475
|
+
</clause>
|
476
|
+
<p>This is patent boilerplate</p>
|
477
|
+
</introduction>
|
478
|
+
</preface>
|
479
|
+
<sections>
|
480
|
+
<clause id="D" obligation="normative" type="scope">
|
481
|
+
<title>Scope</title>
|
482
|
+
<p id="E">Text</p>
|
475
483
|
</clause>
|
476
|
-
<
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
<definitions id="K">
|
484
|
+
<clause id="H" obligation="normative">
|
485
|
+
<title>Terms, definitions, symbols and abbreviated terms</title>
|
486
|
+
<terms id="I" obligation="normative">
|
487
|
+
<title>Normal Terms</title>
|
488
|
+
<term id="J">
|
489
|
+
<preferred><expression><name>Term2</name></expression></preferred>
|
490
|
+
</term>
|
491
|
+
</terms>
|
492
|
+
<definitions id="K">
|
493
|
+
<dl>
|
494
|
+
<dt>Symbol</dt>
|
495
|
+
<dd>Definition</dd>
|
496
|
+
</dl>
|
497
|
+
</definitions>
|
498
|
+
</clause>
|
499
|
+
<definitions id="L">
|
493
500
|
<dl>
|
494
501
|
<dt>Symbol</dt>
|
495
502
|
<dd>Definition</dd>
|
496
503
|
</dl>
|
497
504
|
</definitions>
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
<title>Clause 4</title>
|
507
|
-
<clause id="N" inline-header="false" obligation="normative">
|
508
|
-
<title>Introduction</title>
|
509
|
-
</clause>
|
510
|
-
<clause id="O" inline-header="false" obligation="normative">
|
511
|
-
<title>Clause 4.2</title>
|
505
|
+
<clause id="M" inline-header="false" obligation="normative">
|
506
|
+
<title>Clause 4</title>
|
507
|
+
<clause id="N" inline-header="false" obligation="normative">
|
508
|
+
<title>Introduction</title>
|
509
|
+
</clause>
|
510
|
+
<clause id="O" inline-header="false" obligation="normative">
|
511
|
+
<title>Clause 4.2</title>
|
512
|
+
</clause>
|
512
513
|
</clause>
|
513
|
-
</
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
514
|
+
</sections>
|
515
|
+
<annex id="P" inline-header="false" obligation="normative">
|
516
|
+
<title>Annex</title>
|
517
|
+
<clause id="Q" inline-header="false" obligation="normative">
|
518
|
+
<title>Annex A.1</title>
|
519
|
+
<clause id="Q1" inline-header="false" obligation="normative">
|
520
|
+
<title>Annex A.1a</title>
|
521
|
+
</clause>
|
521
522
|
</clause>
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
</
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
<title>Normative References</title>
|
530
|
-
</references>
|
531
|
-
<clause id="S" obligation="informative">
|
532
|
-
<title>Bibliography</title>
|
533
|
-
<references id="T" normative="false" obligation="informative">
|
534
|
-
<title>Bibliography Subsection</title>
|
523
|
+
<appendix id="Q2" inline-header="false" obligation="normative">
|
524
|
+
<title>An Appendix</title>
|
525
|
+
</appendix>
|
526
|
+
</annex>
|
527
|
+
<bibliography>
|
528
|
+
<references id="R" normative="true" obligation="informative">
|
529
|
+
<title>Normative References</title>
|
535
530
|
</references>
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
531
|
+
<clause id="S" obligation="informative">
|
532
|
+
<title>Bibliography</title>
|
533
|
+
<references id="T" normative="false" obligation="informative">
|
534
|
+
<title>Bibliography Subsection</title>
|
535
|
+
</references>
|
536
|
+
</clause>
|
537
|
+
</bibliography>
|
538
|
+
</iso-standard>
|
539
|
+
INPUT
|
540
540
|
expect(xmlpp(output)
|
541
541
|
.sub(%r{<localized-strings>.*</localized-strings>}m, ""))
|
542
542
|
.to be_equivalent_to xmlpp(<<~"OUTPUT")
|
@@ -544,7 +544,7 @@ RSpec.describe IsoDoc do
|
|
544
544
|
<bibdata>
|
545
545
|
<status>
|
546
546
|
<stage abbreviation='IS' language=''>60</stage>
|
547
|
-
<stage abbreviation='IS' language='tlh'>International
|
547
|
+
<stage abbreviation='IS' language='tlh'>International Standard</stage>
|
548
548
|
</status>
|
549
549
|
<language current='true'>tlh</language>
|
550
550
|
<ext>
|
@@ -1010,14 +1010,14 @@ RSpec.describe IsoDoc do
|
|
1010
1010
|
<status>
|
1011
1011
|
<stage abbreviation='IS' language=''>60</stage>
|
1012
1012
|
<stage abbreviation='IS' language='ru'>
|
1013
|
-
|
1013
|
+
Международный Стандарт
|
1014
1014
|
</stage>
|
1015
1015
|
</status>
|
1016
1016
|
<language current='true'>ru</language>
|
1017
1017
|
<ext>
|
1018
1018
|
<doctype language=''>international-standard</doctype>
|
1019
1019
|
<doctype language='ru'>
|
1020
|
-
|
1020
|
+
Международный Стандарт
|
1021
1021
|
</doctype>
|
1022
1022
|
</ext>
|
1023
1023
|
</bibdata>
|
@@ -1511,4 +1511,69 @@ RSpec.describe IsoDoc do
|
|
1511
1511
|
.convert("test", presxml, true)))
|
1512
1512
|
.to be_equivalent_to xmlpp(html)
|
1513
1513
|
end
|
1514
|
+
|
1515
|
+
it "internationalises locality" do
|
1516
|
+
input = <<~"INPUT"
|
1517
|
+
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
1518
|
+
<bibdata>
|
1519
|
+
<language>fr</language>
|
1520
|
+
<script>Latn</script>
|
1521
|
+
<status>
|
1522
|
+
<stage>published</stage>
|
1523
|
+
<substage>withdrawn</substage>
|
1524
|
+
</status>
|
1525
|
+
<edition>2</edition>
|
1526
|
+
<ext>
|
1527
|
+
<doctype>brochure</doctype>
|
1528
|
+
</ext>
|
1529
|
+
</bibdata>
|
1530
|
+
<preface>
|
1531
|
+
<foreword obligation="informative">
|
1532
|
+
<title>Foreword</title>
|
1533
|
+
<p id="A"><eref type="inline" bibitemid="ISO712"><locality type="locality:appendix"><referenceFrom>7</referenceFrom></locality></eref></p>
|
1534
|
+
<p id="B"><eref type="inline" bibitemid="ISO712"><locality type="annex"><referenceFrom>7</referenceFrom></locality></eref></p>
|
1535
|
+
</foreword>
|
1536
|
+
</preface>
|
1537
|
+
<bibliography><references id="_normative_references" obligation="informative" normative="true"><title>Normative References</title>
|
1538
|
+
<bibitem id="ISO712" type="standard">
|
1539
|
+
<title format="text/plain">Cereals and cereal products</title>
|
1540
|
+
<docidentifier>ISO 712</docidentifier>
|
1541
|
+
<contributor>
|
1542
|
+
<role type="publisher"/>
|
1543
|
+
<organization>
|
1544
|
+
<abbreviation>ISO</abbreviation>
|
1545
|
+
</organization>
|
1546
|
+
</contributor>
|
1547
|
+
</bibitem>
|
1548
|
+
</references>
|
1549
|
+
</bibliography>
|
1550
|
+
</iso-standard>
|
1551
|
+
INPUT
|
1552
|
+
presxml = <<~OUTPUT
|
1553
|
+
<foreword obligation='informative' displayorder='1'>
|
1554
|
+
<title>Foreword</title>
|
1555
|
+
<p id='A'>
|
1556
|
+
<eref type='inline' bibitemid='ISO712'>
|
1557
|
+
<locality type='locality:appendix'>
|
1558
|
+
<referenceFrom>7</referenceFrom>
|
1559
|
+
</locality>
|
1560
|
+
ISO 712, Appendice 7
|
1561
|
+
</eref>
|
1562
|
+
</p>
|
1563
|
+
<p id='B'>
|
1564
|
+
<eref type='inline' bibitemid='ISO712'>
|
1565
|
+
<locality type='annex'>
|
1566
|
+
<referenceFrom>7</referenceFrom>
|
1567
|
+
</locality>
|
1568
|
+
ISO 712,
|
1569
|
+
<span class='citeapp'>Annexe 7</span>
|
1570
|
+
</eref>
|
1571
|
+
</p>
|
1572
|
+
</foreword>
|
1573
|
+
OUTPUT
|
1574
|
+
expect(xmlpp(Nokogiri::XML(IsoDoc::Iso::PresentationXMLConvert
|
1575
|
+
.new({}).convert("test", input, true))
|
1576
|
+
.at("//xmlns:foreword").to_xml))
|
1577
|
+
.to be_equivalent_to xmlpp(presxml)
|
1578
|
+
end
|
1514
1579
|
end
|
data/spec/isodoc/iso_spec.rb
CHANGED
@@ -195,180 +195,61 @@ RSpec.describe IsoDoc::Iso do
|
|
195
195
|
OUTPUT
|
196
196
|
end
|
197
197
|
|
198
|
-
it "
|
198
|
+
it "inserts identifiers for editorial group and approval group" do
|
199
199
|
input = <<~INPUT
|
200
200
|
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
201
|
-
<
|
202
|
-
<
|
203
|
-
<
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
201
|
+
<bibdata>
|
202
|
+
<ext>
|
203
|
+
<doctype>international-standard</doctype>
|
204
|
+
<horizontal>true</horizontal>
|
205
|
+
<editorialgroup>
|
206
|
+
<agency>ISO</agency>
|
207
|
+
<agency>IEC</agency>
|
208
|
+
<technical-committee type="A" number="34">Food products</technical-committee>
|
209
|
+
<subcommittee type="B" number="4">Cereals and pulses</subcommittee>
|
210
|
+
<workgroup type="C" number="3">Rice Group</workgroup>
|
211
|
+
<secretariat>GB</secretariat>
|
212
|
+
</editorialgroup>
|
213
|
+
<approvalgroup>
|
214
|
+
<agency>ISO</agency>
|
215
|
+
<technical-committee type="D" number="34a">Food products A</technical-committee>
|
216
|
+
<subcommittee type="E" number="4a">Cereals and pulses A</subcommittee>
|
217
|
+
<workgroup type="F" number="3a">Rice Group A</workgroup>
|
218
|
+
</approvalgroup>
|
219
|
+
<stagename>Committee draft</stagename>
|
220
|
+
</ext>
|
221
|
+
</bibdata>
|
209
222
|
</iso-standard>
|
210
223
|
INPUT
|
211
224
|
presxml = <<~OUTPUT
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
<
|
216
|
-
|
217
|
-
|
218
|
-
<
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
<
|
228
|
-
<
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
<p class="zzSTDTitle1"/>
|
235
|
-
</div>
|
236
|
-
</body>
|
237
|
-
</html>
|
238
|
-
OUTPUT
|
239
|
-
|
240
|
-
word = <<~OUTPUT
|
241
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
242
|
-
<div class="WordSection1">
|
243
|
-
<p> </p>
|
244
|
-
</div>
|
245
|
-
<p>
|
246
|
-
<br clear="all" class="section"/>
|
247
|
-
</p>
|
248
|
-
<div class="WordSection2">
|
249
|
-
<p>
|
250
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
251
|
-
</p>
|
252
|
-
<div>
|
253
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
254
|
-
<div id="samplecode" class="example">
|
255
|
-
<p><span class="example_label">EXAMPLE — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
256
|
-
</div>
|
257
|
-
</div>
|
258
|
-
<p> </p>
|
259
|
-
</div>
|
260
|
-
<p>
|
261
|
-
<br clear="all" class="section"/>
|
262
|
-
</p>
|
263
|
-
<div class="WordSection3">
|
264
|
-
<p class="zzSTDTitle1"/>
|
265
|
-
</div>
|
266
|
-
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
267
|
-
<div class="colophon"/>
|
268
|
-
</body>
|
269
|
-
OUTPUT
|
270
|
-
expect(IsoDoc::Iso::PresentationXMLConvert.new({})
|
271
|
-
.convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
|
272
|
-
expect(IsoDoc::Iso::HtmlConvert.new({})
|
273
|
-
.convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
|
274
|
-
output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
|
275
|
-
expect(xmlpp(output
|
276
|
-
.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
277
|
-
.to be_equivalent_to xmlpp(word)
|
278
|
-
end
|
279
|
-
|
280
|
-
it "processes sequences of examples" do
|
281
|
-
input = <<~INPUT
|
282
|
-
<iso-standard xmlns="http://riboseinc.com/isoxml">
|
283
|
-
<preface>
|
284
|
-
<foreword>
|
285
|
-
<example id="samplecode">
|
286
|
-
<quote>Hello</quote>
|
287
|
-
</example>
|
288
|
-
<example id="samplecode2">
|
289
|
-
<name>Title</name>
|
290
|
-
<p>Hello</p>
|
291
|
-
</example>
|
292
|
-
</foreword>
|
293
|
-
</preface>
|
294
|
-
</iso-standard>
|
295
|
-
INPUT
|
296
|
-
presxml = <<~OUTPUT
|
297
|
-
<?xml version='1.0'?>
|
298
|
-
<iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
|
299
|
-
<preface>
|
300
|
-
<foreword displayorder="1">
|
301
|
-
<example id="samplecode">
|
302
|
-
<name>EXAMPLE 1</name>
|
303
|
-
<quote>Hello</quote>
|
304
|
-
</example>
|
305
|
-
<example id="samplecode2">
|
306
|
-
<name>EXAMPLE 2 — Title</name>
|
307
|
-
<p>Hello</p>
|
308
|
-
</example>
|
309
|
-
</foreword>
|
310
|
-
</preface>
|
311
|
-
</iso-standard>
|
312
|
-
OUTPUT
|
313
|
-
html = <<~OUTPUT
|
314
|
-
#{HTML_HDR}
|
315
|
-
<br/>
|
316
|
-
<div>
|
317
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
318
|
-
<div id="samplecode" class="example">
|
319
|
-
<p><span class="example_label">EXAMPLE 1</span>  </p>
|
320
|
-
<div class="Quote">Hello</div>
|
321
|
-
</div>
|
322
|
-
<div id="samplecode2" class="example">
|
323
|
-
<p><span class="example_label">EXAMPLE 2 — Title</span>  Hello</p>
|
324
|
-
</div>
|
325
|
-
</div>
|
326
|
-
<p class="zzSTDTitle1"/>
|
327
|
-
</div>
|
328
|
-
</body>
|
329
|
-
</html>
|
330
|
-
OUTPUT
|
331
|
-
word = <<~OUTPUT
|
332
|
-
<body lang="EN-US" link="blue" vlink="#954F72">
|
333
|
-
<div class="WordSection1">
|
334
|
-
<p> </p>
|
335
|
-
</div>
|
336
|
-
<p>
|
337
|
-
<br clear="all" class="section"/>
|
338
|
-
</p>
|
339
|
-
<div class="WordSection2">
|
340
|
-
<p>
|
341
|
-
<br clear="all" style="mso-special-character:line-break;page-break-before:always"/>
|
342
|
-
</p>
|
343
|
-
<div>
|
344
|
-
<h1 class="ForewordTitle">Foreword</h1>
|
345
|
-
<div id="samplecode" class="example">
|
346
|
-
<p><span class="example_label">EXAMPLE 1</span><span style="mso-tab-count:1">  </span></p>
|
347
|
-
<div class="Quote">Hello</div>
|
348
|
-
</div>
|
349
|
-
<div id="samplecode2" class="example">
|
350
|
-
<p><span class="example_label">EXAMPLE 2 — Title</span><span style="mso-tab-count:1">  </span>Hello</p>
|
351
|
-
</div>
|
352
|
-
</div>
|
353
|
-
<p> </p>
|
354
|
-
</div>
|
355
|
-
<p>
|
356
|
-
<br clear="all" class="section"/>
|
357
|
-
</p>
|
358
|
-
<div class="WordSection3">
|
359
|
-
<p class="zzSTDTitle1"/>
|
360
|
-
</div>
|
361
|
-
<br clear="all" style="page-break-before:left;mso-break-type:section-break"/>
|
362
|
-
<div class="colophon"/>
|
363
|
-
</body>
|
225
|
+
<bibdata>
|
226
|
+
<ext>
|
227
|
+
<doctype language=''>international-standard</doctype>
|
228
|
+
<doctype language='en'>International Standard</doctype>
|
229
|
+
<horizontal>true</horizontal>
|
230
|
+
<editorialgroup identifier='ISO/IEC/A 34/B 4/C 3'>
|
231
|
+
<agency>ISO</agency>
|
232
|
+
<agency>IEC</agency>
|
233
|
+
<technical-committee type='A' number='34'>Food products</technical-committee>
|
234
|
+
<subcommittee type='B' number='4'>Cereals and pulses</subcommittee>
|
235
|
+
<workgroup type='C' number='3'>Rice Group</workgroup>
|
236
|
+
<secretariat>GB</secretariat>
|
237
|
+
</editorialgroup>
|
238
|
+
<approvalgroup identifier='ISO/D 34a/E 4a/F 3a'>
|
239
|
+
<agency>ISO</agency>
|
240
|
+
<technical-committee type='D' number='34a'>Food products A</technical-committee>
|
241
|
+
<subcommittee type='E' number='4a'>Cereals and pulses A</subcommittee>
|
242
|
+
<workgroup type='F' number='3a'>Rice Group A</workgroup>
|
243
|
+
</approvalgroup>
|
244
|
+
<stagename>Committee draft</stagename>
|
245
|
+
</ext>
|
246
|
+
</bibdata>
|
364
247
|
OUTPUT
|
365
|
-
expect(
|
366
|
-
.
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
.sub(/^.*<body/m, "<body").sub(%r{</body>.*$}m, "</body>")))
|
372
|
-
.to be_equivalent_to xmlpp(word)
|
248
|
+
expect(xmlpp(Nokogiri::XML(
|
249
|
+
IsoDoc::Iso::PresentationXMLConvert.new({})
|
250
|
+
.convert("test", input, true),
|
251
|
+
)
|
252
|
+
.at("//xmlns:bibdata").to_xml))
|
253
|
+
.to be_equivalent_to xmlpp(presxml)
|
373
254
|
end
|
374
255
|
end
|