metanorma-standoc 2.1.3 → 2.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/lib/metanorma/standoc/blocks_notes.rb +1 -1
  3. data/lib/metanorma/standoc/cleanup_footnotes.rb +19 -17
  4. data/lib/metanorma/standoc/cleanup_ref.rb +16 -0
  5. data/lib/metanorma/standoc/cleanup_section.rb +6 -0
  6. data/lib/metanorma/standoc/converter.rb +2 -0
  7. data/lib/metanorma/standoc/isodoc.rng +16 -0
  8. data/lib/metanorma/standoc/macros_note.rb +26 -0
  9. data/lib/metanorma/standoc/ref.rb +3 -1
  10. data/lib/metanorma/standoc/ref_sect.rb +3 -1
  11. data/lib/metanorma/standoc/ref_utility.rb +20 -5
  12. data/lib/metanorma/standoc/version.rb +1 -1
  13. data/metanorma-standoc.gemspec +1 -1
  14. data/spec/examples/datamodel/address_class_profile.presentation.xml +14 -0
  15. data/spec/metanorma/blocks_spec.rb +5 -0
  16. data/spec/metanorma/cleanup_sections_spec.rb +55 -4
  17. data/spec/metanorma/macros_spec.rb +32 -6
  18. data/spec/metanorma/refs_dl_spec.rb +18 -7
  19. data/spec/metanorma/refs_spec.rb +278 -332
  20. data/spec/spec_helper.rb +1 -1
  21. data/spec/vcr_cassettes/bsi16341.yml +58 -72
  22. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +98 -98
  23. data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec1.yml +13 -13
  24. data/spec/vcr_cassettes/hide_refs.yml +62 -62
  25. data/spec/vcr_cassettes/isobib_get_123.yml +11 -11
  26. data/spec/vcr_cassettes/isobib_get_123_1.yml +26 -26
  27. data/spec/vcr_cassettes/isobib_get_123_1_fr.yml +32 -32
  28. data/spec/vcr_cassettes/isobib_get_123_2001.yml +12 -12
  29. data/spec/vcr_cassettes/isobib_get_124.yml +12 -12
  30. data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +20 -20
  31. data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +56 -56
  32. metadata +5 -4
@@ -43,7 +43,6 @@ RSpec.describe Metanorma::Standoc do
43
43
  <title>Normative references</title>
44
44
  #{NORM_REF_BOILERPLATE}
45
45
  <bibitem id="iso123" type="standard">
46
- <fetched/>
47
46
  <title type='title-main' format='text/plain'>Standard</title>
48
47
  <title type='main' format='text/plain'>Standard</title>
49
48
  <docidentifier type="ISO">ISO 123</docidentifier>
@@ -102,6 +101,7 @@ RSpec.describe Metanorma::Standoc do
102
101
  docid::
103
102
  type::: ISO
104
103
  id::: TC211
104
+ primary::: true
105
105
  docnumber:: 211
106
106
  edition:: 1
107
107
  language::
@@ -256,6 +256,7 @@ RSpec.describe Metanorma::Standoc do
256
256
  ==== Relation
257
257
  type:: updates
258
258
  bibitem::
259
+ title::: Geographic information
259
260
  formattedref::: ISO 19115:2003
260
261
  bib_locality:::
261
262
  type:::: page
@@ -267,6 +268,7 @@ RSpec.describe Metanorma::Standoc do
267
268
  bibitem::
268
269
  type::: standard
269
270
  formattedref::: ISO 19115:2003/Cor 1:2006
271
+ title::: Geographic information
270
272
 
271
273
  ==== Series
272
274
  type:: main
@@ -289,6 +291,7 @@ RSpec.describe Metanorma::Standoc do
289
291
 
290
292
  ==== Series
291
293
  type:: alt
294
+ title:: seriestitle
292
295
  formattedref::
293
296
  content::: serieref
294
297
  language::: en
@@ -317,7 +320,7 @@ RSpec.describe Metanorma::Standoc do
317
320
  <uri type="src">https://www.iso.org/standard/53798.html</uri>
318
321
  <uri type="obp">https://www.iso.org/obp/ui/#!iso:std:53798:en</uri>
319
322
  <uri type="rss">https://www.iso.org/contents/data/standard/05/37/53798.detail.rss</uri>
320
- <docidentifier type="ISO">TC211</docidentifier>
323
+ <docidentifier type='ISO' primary='true'>TC211</docidentifier>
321
324
  <docnumber>211</docnumber>
322
325
  <date type="issued">
323
326
  <on>2014</on>
@@ -417,12 +420,14 @@ RSpec.describe Metanorma::Standoc do
417
420
  </copyright>
418
421
  <relation type="updates">
419
422
  <bibitem>
420
- <formattedref format="text/plain">ISO 19115:2003</formattedref>
423
+ <title type='title-main' format='text/plain'>Geographic information</title>
424
+ <title type='main' format='text/plain'>Geographic information</title>
421
425
  </bibitem>
422
426
  </relation>
423
427
  <relation type="updates">
424
428
  <bibitem type="standard">
425
- <formattedref format="text/plain">ISO 19115:2003/Cor 1:2006</formattedref>
429
+ <title type='title-main' format='text/plain'>Geographic information</title>
430
+ <title type='main' format='text/plain'>Geographic information</title>
426
431
  </bibitem>
427
432
  </relation>
428
433
  <series type="main">
@@ -437,6 +442,7 @@ RSpec.describe Metanorma::Standoc do
437
442
  </series>
438
443
  <series type="alt">
439
444
  <formattedref format="text/plain" language="en" script="Latn">serieref</formattedref>
445
+ <title format='text/plain'>seriestitle</title>
440
446
  </series>
441
447
  <medium>
442
448
  <form>medium form</form>
@@ -596,6 +602,7 @@ RSpec.describe Metanorma::Standoc do
596
602
  contributor.role:: author
597
603
  relation::
598
604
  relation.type:: updates
605
+ relation.bibitem.title:: Geographic information
599
606
  relation.bibitem.formattedref:: ISO 19115:2003
600
607
  relation.bibitem.bib_locality.type:: page
601
608
  relation.bibitem.bib_locality.reference_from:: 7
@@ -603,6 +610,7 @@ RSpec.describe Metanorma::Standoc do
603
610
  relation::
604
611
  relation.type:: updates
605
612
  relation.bibitem.type:: standard
613
+ relation.bibitem.title:: Geographic information
606
614
  relation.bibitem.formattedref:: ISO 19115:2003/Cor 1:2006
607
615
  series::
608
616
  series.type:: main
@@ -622,6 +630,7 @@ RSpec.describe Metanorma::Standoc do
622
630
  series.partnumber:: part5678
623
631
  series::
624
632
  series.type:: alt
633
+ series.title:: seriestitle
625
634
  series.formattedref.content:: serieref
626
635
  series.formattedref.language:: en
627
636
  series.formattedref.script:: Latn
@@ -740,12 +749,14 @@ RSpec.describe Metanorma::Standoc do
740
749
  </copyright>
741
750
  <relation type="updates">
742
751
  <bibitem>
743
- <formattedref format="text/plain">ISO 19115:2003</formattedref>
752
+ <title type='title-main' format='text/plain'>Geographic information</title>
753
+ <title type='main' format='text/plain'>Geographic information</title>
744
754
  </bibitem>
745
755
  </relation>
746
756
  <relation type="updates">
747
757
  <bibitem type="standard">
748
- <formattedref format="text/plain">ISO 19115:2003/Cor 1:2006</formattedref>
758
+ <title type='title-main' format='text/plain'>Geographic information</title>
759
+ <title type='main' format='text/plain'>Geographic information</title>
749
760
  </bibitem>
750
761
  </relation>
751
762
  <series type="main">
@@ -760,6 +771,7 @@ RSpec.describe Metanorma::Standoc do
760
771
  </series>
761
772
  <series type="alt">
762
773
  <formattedref format="text/plain" language="en" script="Latn">serieref</formattedref>
774
+ <title format='text/plain'>seriestitle</title>
763
775
  </series>
764
776
  <medium>
765
777
  <form>medium form</form>
@@ -842,7 +854,6 @@ RSpec.describe Metanorma::Standoc do
842
854
  <docidentifier>B</docidentifier>
843
855
  </bibitem>
844
856
  <bibitem id='iso123' type='standard'>
845
- <fetched/>
846
857
  <title type='title-main' format='text/plain'>Standard</title>
847
858
  <title type='main' format='text/plain'>Standard</title>
848
859
  <docidentifier type='ISO'>ISO 123</docidentifier>