metanorma-iso 2.1.1 → 2.1.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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html2doc/lists.rb +145 -10
  3. data/lib/isodoc/iso/base_convert.rb +10 -0
  4. data/lib/isodoc/iso/html/html_iso_titlepage.html +2 -0
  5. data/lib/isodoc/iso/html/isodoc-dis.css +173 -257
  6. data/lib/isodoc/iso/html/isodoc-dis.scss +173 -249
  7. data/lib/isodoc/iso/html/isodoc.css +38 -13
  8. data/lib/isodoc/iso/html/isodoc.scss +38 -12
  9. data/lib/isodoc/iso/html/style-human.css +14 -1
  10. data/lib/isodoc/iso/html/style-human.scss +10 -1
  11. data/lib/isodoc/iso/html/style-iso.css +35 -23
  12. data/lib/isodoc/iso/html/style-iso.scss +31 -23
  13. data/lib/isodoc/iso/html/word_iso_intro-dis.html +1 -6
  14. data/lib/isodoc/iso/html/word_iso_titlepage-dis.html +24 -13
  15. data/lib/isodoc/iso/html/word_iso_titlepage-prf.html +58 -0
  16. data/lib/isodoc/iso/html/word_iso_titlepage.html +6 -2
  17. data/lib/isodoc/iso/html_convert.rb +5 -0
  18. data/lib/isodoc/iso/i18n-en.yaml +32 -4
  19. data/lib/isodoc/iso/i18n-fr.yaml +29 -3
  20. data/lib/isodoc/iso/i18n-ru.yaml +32 -4
  21. data/lib/isodoc/iso/i18n-zh-Hans.yaml +32 -3
  22. data/lib/isodoc/iso/i18n.rb +1 -1
  23. data/lib/isodoc/iso/iso.amendment.xsl +750 -307
  24. data/lib/isodoc/iso/iso.international-standard.xsl +750 -307
  25. data/lib/isodoc/iso/metadata.rb +63 -63
  26. data/lib/isodoc/iso/presentation_bibdata.rb +74 -0
  27. data/lib/isodoc/iso/presentation_xml_convert.rb +15 -4
  28. data/lib/isodoc/iso/presentation_xref.rb +8 -2
  29. data/lib/isodoc/iso/sections.rb +1 -1
  30. data/lib/isodoc/iso/word_cleanup.rb +3 -0
  31. data/lib/isodoc/iso/word_convert.rb +6 -3
  32. data/lib/isodoc/iso/word_dis_cleanup.rb +243 -0
  33. data/lib/isodoc/iso/word_dis_convert.rb +47 -108
  34. data/lib/isodoc/iso/xref.rb +34 -6
  35. data/lib/metanorma/iso/base.rb +14 -1
  36. data/lib/metanorma/iso/biblio.rng +134 -39
  37. data/lib/metanorma/iso/boilerplate-fr.xml +3 -0
  38. data/lib/metanorma/iso/boilerplate-ru.xml +3 -0
  39. data/lib/metanorma/iso/boilerplate.xml +3 -0
  40. data/lib/metanorma/iso/cleanup.rb +53 -13
  41. data/lib/metanorma/iso/front.rb +38 -6
  42. data/lib/metanorma/iso/front_id.rb +2 -0
  43. data/lib/metanorma/iso/isodoc.rng +32 -0
  44. data/lib/metanorma/iso/isostandard.rng +32 -12
  45. data/lib/metanorma/iso/validate_section.rb +0 -12
  46. data/lib/metanorma/iso/version.rb +1 -1
  47. data/spec/isodoc/amd_spec.rb +4 -30
  48. data/spec/isodoc/blocks_spec.rb +499 -2
  49. data/spec/isodoc/i18n_spec.rb +145 -80
  50. data/spec/isodoc/iso_spec.rb +50 -169
  51. data/spec/isodoc/metadata_spec.rb +223 -83
  52. data/spec/isodoc/postproc_spec.rb +41 -5
  53. data/spec/isodoc/section_spec.rb +9 -9
  54. data/spec/isodoc/word_dis_spec.rb +1332 -146
  55. data/spec/isodoc/xref_spec.rb +87 -13
  56. data/spec/metanorma/amd_spec.rb +39 -23
  57. data/spec/metanorma/base_spec.rb +174 -44
  58. data/spec/metanorma/blocks_spec.rb +21 -0
  59. data/spec/metanorma/cleanup_spec.rb +196 -196
  60. data/spec/metanorma/lists_spec.rb +2 -2
  61. data/spec/metanorma/section_spec.rb +2 -2
  62. data/spec/metanorma/validate_spec.rb +8 -19
  63. data/spec/spec_helper.rb +10 -7
  64. data/spec/vcr_cassettes/withdrawn_iso.yml +30 -30
  65. metadata +6 -8
  66. data/docs/asciiiso-syntax.adoc +0 -307
  67. data/docs/guidance.adoc +0 -487
  68. data/docs/navigation.adoc +0 -23
  69. data/docs/quickstart.adoc +0 -179
  70. data/lib/isodoc/iso/presentation_inline.rb +0 -90
@@ -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 standard</stage>
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='zzSTDTitle1'/>
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
- <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>
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
- <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>
483
- </clause>
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">
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
- </clause>
499
- <definitions id="L">
500
- <dl>
501
- <dt>Symbol</dt>
502
- <dd>Definition</dd>
503
- </dl>
504
- </definitions>
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>
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
- </clause>
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>
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
- </clause>
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>
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
- </clause>
537
- </bibliography>
538
- </iso-standard>
539
- INPUT
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 standard</stage>
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
- &#x41C;&#x435;&#x436;&#x434;&#x443;&#x43D;&#x430;&#x440;&#x43E;&#x434;&#x43D;&#x44B;&#x439; &#x441;&#x442;&#x430;&#x43D;&#x434;&#x430;&#x440;&#x442;
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
- &#x41C;&#x435;&#x436;&#x434;&#x443;&#x43D;&#x430;&#x440;&#x43E;&#x434;&#x43D;&#x44B;&#x439; &#x421;&#x442;&#x430;&#x43D;&#x434;&#x430;&#x440;&#x442;
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
@@ -195,180 +195,61 @@ RSpec.describe IsoDoc::Iso do
195
195
  OUTPUT
196
196
  end
197
197
 
198
- it "processes examples" do
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
- <preface>
202
- <foreword>
203
- <example id="samplecode">
204
- <name>Title</name>
205
- <p>Hello</p>
206
- </example>
207
- </foreword>
208
- </preface>
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
- <?xml version='1.0'?>
213
- <iso-standard type="presentation" xmlns="http://riboseinc.com/isoxml">
214
- <preface>
215
- <foreword displayorder="1">
216
- <example id="samplecode">
217
- <name>EXAMPLE — Title</name>
218
- <p>Hello</p>
219
- </example>
220
- </foreword>
221
- </preface>
222
- </iso-standard>
223
- OUTPUT
224
-
225
- html = <<~OUTPUT
226
- #{HTML_HDR}
227
- <br/>
228
- <div>
229
- <h1 class="ForewordTitle">Foreword</h1>
230
- <div id="samplecode" class="example">
231
- <p><span class="example_label">EXAMPLE&#160;&#8212; Title</span>&#160; Hello</p>
232
- </div>
233
- </div>
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>&#160;</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&#160;&#8212; Title</span><span style="mso-tab-count:1">&#160; </span>Hello</p>
256
- </div>
257
- </div>
258
- <p>&#160;</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>&#160; </p>
320
- <div class="Quote">Hello</div>
321
- </div>
322
- <div id="samplecode2" class="example">
323
- <p><span class="example_label">EXAMPLE 2&#160;&#8212; Title</span>&#160; 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>&#160;</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">&#160; </span></p>
347
- <div class="Quote">Hello</div>
348
- </div>
349
- <div id="samplecode2" class="example">
350
- <p><span class="example_label">EXAMPLE 2&#160;&#8212; Title</span><span style="mso-tab-count:1">&#160; </span>Hello</p>
351
- </div>
352
- </div>
353
- <p>&#160;</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(IsoDoc::Iso::PresentationXMLConvert.new({})
366
- .convert("test", input, true)).to be_equivalent_to xmlpp(presxml)
367
- expect(IsoDoc::Iso::HtmlConvert.new({})
368
- .convert("test", presxml, true)).to be_equivalent_to xmlpp(html)
369
- output = IsoDoc::Iso::WordConvert.new({}).convert("test", presxml, true)
370
- expect(xmlpp(output
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