isodoc 1.2.4 → 1.3.0

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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +69 -0
  3. data/README.adoc +1 -3
  4. data/isodoc.gemspec +3 -1
  5. data/lib/isodoc-yaml/i18n-en.yaml +1 -0
  6. data/lib/isodoc-yaml/i18n-fr.yaml +8 -7
  7. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
  8. data/lib/isodoc/base_style/all.css +5 -1
  9. data/lib/isodoc/base_style/blocks.scss +2 -2
  10. data/lib/isodoc/base_style/reset.css +5 -1
  11. data/lib/isodoc/base_style/reset.scss +6 -1
  12. data/lib/isodoc/base_style/typography.scss +1 -1
  13. data/lib/isodoc/convert.rb +12 -97
  14. data/lib/isodoc/css.rb +95 -0
  15. data/lib/isodoc/function/inline.rb +0 -33
  16. data/lib/isodoc/function/lists.rb +2 -1
  17. data/lib/isodoc/function/references.rb +8 -13
  18. data/lib/isodoc/function/to_word_html.rb +2 -2
  19. data/lib/isodoc/html_function/postprocess.rb +12 -3
  20. data/lib/isodoc/i18n.rb +23 -51
  21. data/lib/isodoc/metadata.rb +44 -111
  22. data/lib/isodoc/metadata_contributor.rb +90 -0
  23. data/lib/isodoc/metadata_date.rb +11 -0
  24. data/lib/isodoc/presentation_function/bibdata.rb +96 -0
  25. data/lib/isodoc/presentation_function/block.rb +14 -9
  26. data/lib/isodoc/presentation_function/inline.rb +151 -34
  27. data/lib/isodoc/presentation_xml_convert.rb +6 -0
  28. data/lib/isodoc/version.rb +1 -1
  29. data/lib/isodoc/word_convert.rb +0 -20
  30. data/lib/isodoc/word_function/body.rb +12 -0
  31. data/lib/isodoc/word_function/postprocess.rb +1 -1
  32. data/lib/isodoc/xref/xref_anchor.rb +8 -3
  33. data/lib/isodoc/xref/xref_counter.rb +20 -9
  34. data/lib/isodoc/xref/xref_gen.rb +4 -4
  35. data/lib/isodoc/xref/xref_sect_gen.rb +1 -1
  36. data/lib/isodoc/xslfo_convert.rb +6 -1
  37. data/spec/assets/html.scss +14 -0
  38. data/spec/assets/i18n.yaml +22 -5
  39. data/spec/isodoc/blocks_spec.rb +100 -221
  40. data/spec/isodoc/footnotes_spec.rb +4 -5
  41. data/spec/isodoc/i18n_spec.rb +89 -16
  42. data/spec/isodoc/inline_spec.rb +185 -163
  43. data/spec/isodoc/lists_spec.rb +1 -1
  44. data/spec/isodoc/metadata_spec.rb +69 -19
  45. data/spec/isodoc/postproc_spec.rb +33 -8
  46. data/spec/isodoc/presentation_xml_spec.rb +584 -1
  47. data/spec/isodoc/ref_spec.rb +328 -10
  48. data/spec/isodoc/section_spec.rb +9 -9
  49. data/spec/isodoc/table_spec.rb +1 -1
  50. data/spec/isodoc/terms_spec.rb +1 -1
  51. data/spec/isodoc/xref_spec.rb +35 -35
  52. data/spec/spec_helper.rb +6 -0
  53. metadata +36 -7
  54. data/.github/workflows/macos.yml +0 -42
  55. data/.github/workflows/ubuntu.yml +0 -62
  56. data/.github/workflows/windows.yml +0 -44
@@ -44,7 +44,7 @@ RSpec.describe IsoDoc do
44
44
  <abbreviation>ISO</abbreviation>
45
45
  </organization>
46
46
  </contributor>
47
- <note format="text/plain" type="ISO DATE" reference="1">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
47
+ <note format="text/plain" type="Unpublished-Status" reference="1">Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
48
48
  <extent type="part">
49
49
  <referenceFrom>all</referenceFrom>
50
50
  </extent>
@@ -63,7 +63,7 @@ RSpec.describe IsoDoc do
63
63
  </bibitem>
64
64
  <bibitem id="ref1">
65
65
  <formattedref format="application/x-isodoc+xml"><smallcap>Standard No I.C.C 167</smallcap>. <em>Determination of the protein content in cereal and cereal products for food and animal feeding stuffs according to the Dumas combustion method</em> (see <link target="http://www.icc.or.at"/>)</formattedref>
66
- <docidentifier type="ICC">167</docidentifier>
66
+ <docidentifier type="ICC">ICC/167</docidentifier>
67
67
  </bibitem>
68
68
  <note><p>This is an annotation of ISO 20483:2013-2014</p></note>
69
69
  <bibitem id="zip_ffs"><formattedref format="application/x-isodoc+xml">Title 5</formattedref><docidentifier type="metanorma">[5]</docidentifier></bibitem>
@@ -125,9 +125,9 @@ RSpec.describe IsoDoc do
125
125
  </iso-standard>
126
126
  INPUT
127
127
  presxml = <<~PRESXML
128
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
128
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
129
129
  <bibdata>
130
- <language>en</language>
130
+ <language current="true">en</language>
131
131
  </bibdata>
132
132
  <preface>
133
133
  <foreword>
@@ -136,7 +136,7 @@ RSpec.describe IsoDoc do
136
136
  <eref bibitemid='ISBN'>[1]</eref>
137
137
  <eref bibitemid='ISSN'>[2]</eref>
138
138
  <eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
139
- <eref bibitemid='ref1'>ICC 167</eref>
139
+ <eref bibitemid='ref1'>ICC/167</eref>
140
140
  <eref bibitemid='ref10'>[10]</eref>
141
141
  <eref bibitemid='ref12'>Citn</eref>
142
142
  <eref bibitemid='zip_ffs'>[5]</eref>
@@ -181,7 +181,7 @@ RSpec.describe IsoDoc do
181
181
  <abbreviation>ISO</abbreviation>
182
182
  </organization>
183
183
  </contributor>
184
- <note format='text/plain' type='ISO DATE' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
184
+ <note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
185
185
  <extent type='part'>
186
186
  <referenceFrom>all</referenceFrom>
187
187
  </extent>
@@ -213,7 +213,7 @@ RSpec.describe IsoDoc do
213
213
  <link target='http://www.icc.or.at'/>
214
214
  )
215
215
  </formattedref>
216
- <docidentifier type='ICC'>167</docidentifier>
216
+ <docidentifier type='ICC'>ICC/167</docidentifier>
217
217
  </bibitem>
218
218
  <note>
219
219
  <name>NOTE</name>
@@ -309,7 +309,7 @@ RSpec.describe IsoDoc do
309
309
  <a href='#ISBN'>[1]</a>
310
310
  <a href='#ISSN'>[2]</a>
311
311
  <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
312
- <a href='#ref1'>ICC 167</a>
312
+ <a href='#ref1'>ICC/167</a>
313
313
  <a href='#ref10'>[10]</a>
314
314
  <a href='#ref12'>Citn</a>
315
315
  <a href='#zip_ffs'>[5]</a>
@@ -342,7 +342,7 @@ RSpec.describe IsoDoc do
342
342
  <i>Cereals and pulses</i>
343
343
  </p>
344
344
  <p id='ref1' class='NormRef'>
345
- ICC 167,
345
+ ICC/167,
346
346
  <span style='font-variant:small-caps;'>Standard No I.C.C 167</span>
347
347
  .
348
348
  <i>
@@ -420,8 +420,326 @@ RSpec.describe IsoDoc do
420
420
  </html>
421
421
 
422
422
  OUTPUT
423
- expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true))).to be_equivalent_to xmlpp(presxml)
423
+ expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", input, true).sub(%r{<localized-strings>.*</localized-strings>}m, ""))).to be_equivalent_to xmlpp(presxml)
424
424
  expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
425
425
  end
426
426
 
427
+
428
+ it "processes hidden references sections in Relaton bibliographies" do
429
+ presxml = <<~PRESXML
430
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
431
+ <bibdata>
432
+ <language current="true">en</language>
433
+ </bibdata>
434
+ <preface>
435
+ <foreword>
436
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
437
+ <eref bibitemid='ISO712'>[110]</eref>
438
+ <eref bibitemid='ISBN'>[1]</eref>
439
+ <eref bibitemid='ISSN'>[2]</eref>
440
+ <eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
441
+ <eref bibitemid='ref1'>ICC/167</eref>
442
+ <eref bibitemid='ref10'>[10]</eref>
443
+ <eref bibitemid='ref12'>Citn</eref>
444
+ <eref bibitemid='zip_ffs'>[5]</eref>
445
+ </p>
446
+ </foreword>
447
+ </preface>
448
+ <bibliography>
449
+ <references id='_normative_references' obligation='informative' normative='true' hidden="true">
450
+ <title depth='1'>1.<tab/>Normative References</title>
451
+ <p>
452
+ The following documents are referred to in the text in such a way that
453
+ some or all of their content constitutes requirements of this document.
454
+ For dated references, only the edition cited applies. For undated
455
+ references, the latest edition of the referenced document (including any
456
+ amendments) applies.
457
+ </p>
458
+ <bibitem id='ISO712' type='standard'>
459
+ <title format='text/plain'>Cereals or cereal products</title>
460
+ <title type='main' format='text/plain'>Cereals and cereal products</title>
461
+ <docidentifier type='ISO'>ISO 712</docidentifier>
462
+ <docidentifier type='metanorma'>[110]</docidentifier>
463
+ <contributor>
464
+ <role type='publisher'/>
465
+ <organization>
466
+ <name>International Organization for Standardization</name>
467
+ </organization>
468
+ </contributor>
469
+ </bibitem>
470
+ <bibitem id='ISO16634' type='standard'>
471
+ <title language='x' format='text/plain'>
472
+ Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
473
+ feeding stuffs
474
+ </title>
475
+ <title language='en' format='text/plain'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
476
+ <docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
477
+ <date type='published'>
478
+ <on>--</on>
479
+ </date>
480
+ <contributor>
481
+ <role type='publisher'/>
482
+ <organization>
483
+ <abbreviation>ISO</abbreviation>
484
+ </organization>
485
+ </contributor>
486
+ <note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
487
+ <extent type='part'>
488
+ <referenceFrom>all</referenceFrom>
489
+ </extent>
490
+ </bibitem>
491
+ <bibitem id='ISO20483' type='standard'>
492
+ <title format='text/plain'>Cereals and pulses</title>
493
+ <docidentifier type='ISO'>ISO 20483:2013-2014</docidentifier>
494
+ <date type='published'>
495
+ <from>2013</from>
496
+ <to>2014</to>
497
+ </date>
498
+ <contributor>
499
+ <role type='publisher'/>
500
+ <organization>
501
+ <name>International Organization for Standardization</name>
502
+ </organization>
503
+ </contributor>
504
+ </bibitem>
505
+ <bibitem id='ref1'>
506
+ <formattedref format='application/x-isodoc+xml'>
507
+ <smallcap>Standard No I.C.C 167</smallcap>
508
+ .
509
+ <em>
510
+ Determination of the protein content in cereal and cereal products
511
+ for food and animal feeding stuffs according to the Dumas combustion
512
+ method
513
+ </em>
514
+ (see
515
+ <link target='http://www.icc.or.at'/>
516
+ )
517
+ </formattedref>
518
+ <docidentifier type='ICC'>ICC/167</docidentifier>
519
+ </bibitem>
520
+ <note>
521
+ <name>NOTE</name>
522
+ <p>This is an annotation of ISO 20483:2013-2014</p>
523
+ </note>
524
+ <bibitem id='zip_ffs'>
525
+ <formattedref format='application/x-isodoc+xml'>Title 5</formattedref>
526
+ <docidentifier type='metanorma'>[5]</docidentifier>
527
+ </bibitem>
528
+ </references>
529
+ <references id='_bibliography' obligation='informative' normative='false' hidden="true">
530
+ <title depth="1">Bibliography</title>
531
+ <bibitem id='ISBN' type='ISBN'>
532
+ <title format='text/plain'>Chemicals for analytical laboratory use</title>
533
+ <docidentifier type='ISBN'>ISBN</docidentifier>
534
+ <docidentifier type='metanorma'>[1]</docidentifier>
535
+ <contributor>
536
+ <role type='publisher'/>
537
+ <organization>
538
+ <abbreviation>ISBN</abbreviation>
539
+ </organization>
540
+ </contributor>
541
+ </bibitem>
542
+ <bibitem id='ISSN' type='ISSN'>
543
+ <title format='text/plain'>Instruments for analytical laboratory use</title>
544
+ <docidentifier type='ISSN'>ISSN</docidentifier>
545
+ <docidentifier type='metanorma'>[2]</docidentifier>
546
+ <contributor>
547
+ <role type='publisher'/>
548
+ <organization>
549
+ <abbreviation>ISSN</abbreviation>
550
+ </organization>
551
+ </contributor>
552
+ </bibitem>
553
+ <note>
554
+ <name>NOTE</name>
555
+ <p>This is an annotation of document ISSN.</p>
556
+ </note>
557
+ <note>
558
+ <name>NOTE</name>
559
+ <p>This is another annotation of document ISSN.</p>
560
+ </note>
561
+ <bibitem id='ISO3696' type='standard'>
562
+ <title format='text/plain'>Water for analytical laboratory use</title>
563
+ <docidentifier type='ISO'>ISO 3696</docidentifier>
564
+ <contributor>
565
+ <role type='publisher'/>
566
+ <organization>
567
+ <abbreviation>ISO</abbreviation>
568
+ </organization>
569
+ </contributor>
570
+ </bibitem>
571
+ <bibitem id='ref10'>
572
+ <formattedref format='application/x-isodoc+xml'>
573
+ <smallcap>Standard No I.C.C 167</smallcap>
574
+ .
575
+ <em>
576
+ Determination of the protein content in cereal and cereal products
577
+ for food and animal feeding stuffs according to the Dumas combustion
578
+ method
579
+ </em>
580
+ (see
581
+ <link target='http://www.icc.or.at'/>
582
+ )
583
+ </formattedref>
584
+ <docidentifier type='metanorma'>[10]</docidentifier>
585
+ </bibitem>
586
+ <bibitem id='ref11'>
587
+ <title>Internet Calendaring and Scheduling Core Object Specification (iCalendar)</title>
588
+ <docidentifier type='IETF'>RFC 10</docidentifier>
589
+ </bibitem>
590
+ <bibitem id='ref12'>
591
+ <formattedref format='application/x-isodoc+xml'>
592
+ CitationWorks. 2019.
593
+ <em>How to cite a reference</em>
594
+ .
595
+ </formattedref>
596
+ <docidentifier type='metanorma'>[Citn]</docidentifier>
597
+ <docidentifier type='IETF'>RFC 20</docidentifier>
598
+ </bibitem>
599
+ </references>
600
+ </bibliography>
601
+ </iso-standard>
602
+ PRESXML
603
+
604
+ html = <<~OUTPUT
605
+ #{HTML_HDR}
606
+ <br/>
607
+ <div>
608
+ <h1 class='ForewordTitle'>Foreword</h1>
609
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
610
+ <a href='#ISO712'>[110]</a>
611
+ <a href='#ISBN'>[1]</a>
612
+ <a href='#ISSN'>[2]</a>
613
+ <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
614
+ <a href='#ref1'>ICC/167</a>
615
+ <a href='#ref10'>[10]</a>
616
+ <a href='#ref12'>Citn</a>
617
+ <a href='#zip_ffs'>[5]</a>
618
+ </p>
619
+ </div>
620
+ <p class='zzSTDTitle1'/>
621
+ </div>
622
+ </body>
623
+ </html>
624
+
625
+ OUTPUT
626
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
627
+ end
628
+
629
+ it "processes hidden references sections in Relaton bibliographies" do
630
+ presxml = <<~PRESXML
631
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
632
+ <bibdata>
633
+ <language current="true">en</language>
634
+ </bibdata>
635
+ <preface>
636
+ <foreword>
637
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
638
+ <eref bibitemid='ISO712'>[110]</eref>
639
+ <eref bibitemid='ISBN'>[1]</eref>
640
+ <eref bibitemid='ISSN'>[2]</eref>
641
+ <eref bibitemid='ISO16634'>ISO 16634:-- (all parts)</eref>
642
+ <eref bibitemid='ref1'>ICC/167</eref>
643
+ <eref bibitemid='ref10'>[10]</eref>
644
+ <eref bibitemid='ref12'>Citn</eref>
645
+ <eref bibitemid='zip_ffs'>[5]</eref>
646
+ </p>
647
+ </foreword>
648
+ </preface>
649
+ <bibliography>
650
+ <references id='_normative_references' obligation='informative' normative='true'>
651
+ <title depth='1'>1.<tab/>Normative References</title>
652
+ <p>
653
+ The following documents are referred to in the text in such a way that
654
+ some or all of their content constitutes requirements of this document.
655
+ For dated references, only the edition cited applies. For undated
656
+ references, the latest edition of the referenced document (including any
657
+ amendments) applies.
658
+ </p>
659
+ <bibitem id='ISO712' type='standard' hidden="true">
660
+ <title format='text/plain'>Cereals or cereal products</title>
661
+ <title type='main' format='text/plain'>Cereals and cereal products</title>
662
+ <docidentifier type='ISO'>ISO 712</docidentifier>
663
+ <docidentifier type='metanorma'>[110]</docidentifier>
664
+ <contributor>
665
+ <role type='publisher'/>
666
+ <organization>
667
+ <name>International Organization for Standardization</name>
668
+ </organization>
669
+ </contributor>
670
+ </bibitem>
671
+ <bibitem id='ISO16634' type='standard'>
672
+ <title language='x' format='text/plain'>
673
+ Cereals, pulses, milled cereal products, xxxx, oilseeds and animal
674
+ feeding stuffs
675
+ </title>
676
+ <title language='en' format='text/plain'>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</title>
677
+ <docidentifier type='ISO'>ISO 16634:-- (all parts)</docidentifier>
678
+ <date type='published'>
679
+ <on>--</on>
680
+ </date>
681
+ <contributor>
682
+ <role type='publisher'/>
683
+ <organization>
684
+ <abbreviation>ISO</abbreviation>
685
+ </organization>
686
+ </contributor>
687
+ <note format='text/plain' type='Unpublished-Status' reference='1'>Under preparation. (Stage at the time of publication ISO/DIS 16634)</note>
688
+ <extent type='part'>
689
+ <referenceFrom>all</referenceFrom>
690
+ </extent>
691
+ </bibitem>
692
+ </references></bibliography></iso-standard>
693
+ PRESXML
694
+
695
+ html = <<~OUTPUT
696
+ #{HTML_HDR}
697
+ <br/>
698
+ <div>
699
+ <h1 class='ForewordTitle'>Foreword</h1>
700
+ <p id='_f06fd0d1-a203-4f3d-a515-0bdba0f8d83f'>
701
+ <a href='#ISO712'>[110]</a>
702
+ <a href='#ISBN'>[1]</a>
703
+ <a href='#ISSN'>[2]</a>
704
+ <a href='#ISO16634'>ISO 16634:-- (all parts)</a>
705
+ <a href='#ref1'>ICC/167</a>
706
+ <a href='#ref10'>[10]</a>
707
+ <a href='#ref12'>Citn</a>
708
+ <a href='#zip_ffs'>[5]</a>
709
+ </p>
710
+ </div>
711
+ <p class='zzSTDTitle1'/>
712
+ <div>
713
+ <h1>1.&#160; Normative References</h1>
714
+ <p>
715
+ The following documents are referred to in the text in such a way
716
+ that some or all of their content constitutes requirements of this
717
+ document. For dated references, only the edition cited applies. For
718
+ undated references, the latest edition of the referenced document
719
+ (including any amendments) applies.
720
+ </p>
721
+ <p id='ISO16634' class='NormRef'>
722
+ ISO 16634:-- (all parts)
723
+ <a class='FootnoteRef' href='#fn:1'>
724
+ <sup>1</sup>
725
+ </a>
726
+ ,
727
+ <i>Cereals, pulses, milled cereal products, oilseeds and animal feeding stuffs</i>
728
+ </p>
729
+ </div>
730
+ <aside id='fn:1' class='footnote'>
731
+ <p>Under preparation. (Stage at the time of publication ISO/DIS 16634)</p>
732
+ </aside>
733
+
734
+ </div>
735
+ </body>
736
+ </html>
737
+
738
+ OUTPUT
739
+ expect(xmlpp(IsoDoc::HtmlConvert.new({}).convert("test", presxml, true))).to be_equivalent_to xmlpp(html)
740
+ end
741
+
742
+
427
743
  end
744
+
745
+
@@ -260,7 +260,7 @@ OUTPUT
260
260
  INPUT
261
261
 
262
262
  presxml = <<~"PRESXML"
263
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
263
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
264
264
  <boilerplate>
265
265
  <copyright-statement>
266
266
  <clause>
@@ -755,7 +755,7 @@ OUTPUT
755
755
  </iso-standard>
756
756
  INPUT
757
757
  <?xml version='1.0'?>
758
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
758
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
759
759
  <preface>
760
760
  <foreword obligation='informative'>
761
761
  <title>Foreword</title>
@@ -849,7 +849,7 @@ OUTPUT
849
849
  </iso-standard>
850
850
  INPUT
851
851
  <?xml version='1.0'?>
852
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
852
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
853
853
  <preface>
854
854
  <introduction id='B' obligation='informative'>
855
855
  <title>Introduction</title>
@@ -876,7 +876,7 @@ OUTPUT
876
876
  INPUT
877
877
 
878
878
  presxml = <<~"OUTPUT"
879
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
879
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
880
880
  <sections>
881
881
  <terms id='H' obligation='normative'>
882
882
  <title depth='1'>1.<tab/>Terms, Definitions, Symbols and Abbreviated Terms</title>
@@ -921,7 +921,7 @@ OUTPUT
921
921
  INPUT
922
922
 
923
923
  presxml = <<~"PRESXML"
924
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
924
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
925
925
  <sections>
926
926
  <clause id='M' inline-header='false' obligation='normative'>
927
927
  <title depth='1'>1.<tab/>Clause 4</title>
@@ -973,7 +973,7 @@ OUTPUT
973
973
  </iso-standard>
974
974
  INPUT
975
975
  <?xml version='1.0'?>
976
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
976
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
977
977
  <sections>
978
978
  <clause id='M' inline-header='false' obligation='normative'>
979
979
  <title depth="1">Clause 4</title>
@@ -991,7 +991,7 @@ OUTPUT
991
991
 
992
992
  it "processes sections without titles" do
993
993
  expect(xmlpp(IsoDoc::PresentationXMLConvert.new({}).convert("test", <<~"INPUT", true))).to be_equivalent_to xmlpp(<<~"OUTPUT")
994
- <iso-standard xmlns="http://riboseinc.com/isoxml">
994
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
995
995
  <preface>
996
996
  <introduction id="M" inline-header="false" obligation="normative"><clause id="N" inline-header="false" obligation="normative">
997
997
  <title>Intro</title>
@@ -1009,7 +1009,7 @@ OUTPUT
1009
1009
  </iso-standard>
1010
1010
  INPUT
1011
1011
  <?xml version='1.0'?>
1012
- <iso-standard xmlns='http://riboseinc.com/isoxml'>
1012
+ <iso-standard xmlns='http://riboseinc.com/isoxml' type="presentation">
1013
1013
  <preface>
1014
1014
  <introduction id='M' inline-header='false' obligation='normative'>
1015
1015
  <clause id='N' inline-header='false' obligation='normative'>
@@ -1059,7 +1059,7 @@ OUTPUT
1059
1059
  </iso-standard>
1060
1060
  INPUT
1061
1061
  presxml = <<~OUTPUT
1062
- <iso-standard xmlns="http://riboseinc.com/isoxml">
1062
+ <iso-standard xmlns="http://riboseinc.com/isoxml" type="presentation">
1063
1063
  <bibliography>
1064
1064
  <clause id="D" obligation="informative">
1065
1065
  <title depth="1">Bibliography</title>