relaton-bib 0.3.3 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: c666eff3590a39978b0d0e4547096284b8eedb28c9bb87d819491adc19ad3181
4
- data.tar.gz: 9fe53d79fbca6cb27d0febfbb79981b8cee85ee1f4954db53664bc5f5769394d
2
+ SHA1:
3
+ metadata.gz: cc017393109ff9a548ad8e9a95fec12ae434564e
4
+ data.tar.gz: 4dec785eebbd91e0b9e38db886099bf772c1806e
5
5
  SHA512:
6
- metadata.gz: e70371f853c3ab10c91cffea4a96453f9929b5979d5947541d8bea21116e236c7eb063968e72ead587af2f0fbd9e3c9a7489e4d83e5c729cbd6571b5ce1f4a2e
7
- data.tar.gz: 96dc61bc07a449c64877fd94e86e9228259c084e5ddef22e4540133b4adc95321caeff297dff3aef3847df5213ffc17d9c874555d7ab13929c6a5e7c7c28abf2
6
+ metadata.gz: 223b2d76ea441457e9f014ec6c4213ed910fdaba8e4c9ebec5aa8d14d296fb238f2392550fab2212173f5ef73a4b1827bc46aaf5e5637a058e89ea8f09ec9fdb
7
+ data.tar.gz: 96f84017b46c2d48c01dbde0359b5396137e7a066694d7e9cf9515b18657fb76511a84d66ebc5dae0a052bb20c8f97bffdd8b5d2584a56059587ed70793c8692
data/Gemfile.lock CHANGED
@@ -1,15 +1,15 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-bib (0.3.3)
4
+ relaton-bib (0.3.8)
5
5
  addressable
6
- nokogiri (~> 1.10)
6
+ nokogiri
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.6.0)
12
- public_suffix (>= 2.0.2, < 4.0)
11
+ addressable (2.7.0)
12
+ public_suffix (>= 2.0.2, < 5.0)
13
13
  byebug (11.0.1)
14
14
  debase (0.2.3)
15
15
  debase-ruby_core_source (>= 0.10.2)
@@ -22,7 +22,7 @@ GEM
22
22
  mini_portile2 (2.4.0)
23
23
  nokogiri (1.10.3)
24
24
  mini_portile2 (~> 2.4.0)
25
- public_suffix (3.1.1)
25
+ public_suffix (4.0.1)
26
26
  rake (10.5.0)
27
27
  rspec (3.8.0)
28
28
  rspec-core (~> 3.8.0)
data/docs/hash.adoc CHANGED
@@ -1,5 +1,7 @@
1
1
  = Relaton YAML
2
2
 
3
+ == YAML
4
+
3
5
  The following structure is in place for encoding bibitem as YAML objects, and is also used
4
6
  to represent bibliographic entries in Metanorma Asciidoctor. The structure has not yet been
5
7
  generalised to `bibdata/ext`, the flavour specific extensions of relaton.
@@ -252,11 +254,14 @@ validity:
252
254
  revision: 2011-03-04 09:00
253
255
  ....
254
256
 
257
+ == Metanorma structure: nested definition list
258
+
255
259
  The Metanorma Asciidoctor representation of this hash structure
256
260
  in a bibliography
257
261
  is as a definition list, with nested definition lists for nested structures.
258
262
  Repeating elements in a hash can be realised as ordered or unordered lists.
259
- However, given how awkward lists of definition lists are in Asciidoctor,
263
+ However, given how awkward lists of definition lists are in Asciidoctor
264
+ (with a limitation of three nesting levels),
260
265
  Metanorma Asciidoctor also supports representing repeating elements
261
266
  by repeating the key for that entry.
262
267
 
@@ -355,20 +360,20 @@ docid::
355
360
  docnumber:: 211
356
361
  edition:: 1
357
362
  language::
358
- * en
359
- * fr
363
+ . en
364
+ . fr
360
365
  script:: Latn
361
366
  version::
362
367
  revision_date::: 2019-04-01
363
368
  draft::: draft
364
369
  biblionote::
365
370
  type::: bibnote
366
- content:::
371
+ content:::
367
372
  +
368
- ---
373
+ --
369
374
  Mark set a major league
370
375
  home run record in 1998.
371
- ---
376
+ --
372
377
  docstatus::
373
378
  stage::: stage
374
379
  substage::: substage
@@ -384,11 +389,11 @@ date::
384
389
  type::: accessed
385
390
  value::: 2015-05-20
386
391
  abstract::
387
- content:::
392
+ content:::
388
393
  +
389
- ---
390
- ISO 19115-1:2014 defines the schema required for ...
391
- ---
394
+ --
395
+ ISO 19115-1:2014 defines the schema required for ...
396
+ --
392
397
  abstract::
393
398
  content::: L'ISO 19115-1:2014 définit le schéma requis pour ...
394
399
  language::: fr
@@ -419,8 +424,8 @@ extent::
419
424
  type::: section
420
425
  reference_from::: 7
421
426
  accesslocation::
422
- * accesslocation1
423
- * accesslocation2
427
+ . accesslocation1
428
+ . accesslocation2
424
429
  classification::
425
430
  type::: type
426
431
  value::: value
@@ -430,12 +435,12 @@ validity::
430
435
 
431
436
 
432
437
  ==== Contributor
433
- person::
438
+ organization::
434
439
  name::: International Organization for Standardization
435
440
  url::: www.iso.org
436
441
  abbreviation::: ISO
437
442
  subdivision::: division
438
- role::
443
+ role::
439
444
  type::: publisher
440
445
  description::: Publisher role
441
446
 
@@ -443,22 +448,25 @@ role::
443
448
  person::
444
449
  name:::
445
450
  completename::::
446
- content::::: A. Bierman
447
- language::::: en
451
+ +
452
+ --
453
+ content:: A. Bierman
454
+ language:: en
455
+ --
448
456
  affiliation:::
449
457
  organization::::
450
- name::::: IETF
451
- abbreviation::::: IETF
452
- identifier:::::
453
458
  +
454
- ---
455
- type:: uri
456
- id:: www.ietf.org
457
- ---
459
+ --
460
+ name:: IETF
461
+ abbreviation:: IETF
462
+ identifier::
463
+ type::: uri
464
+ id::: www.ietf.org
465
+ --
458
466
  description:::: Affiliation description
459
467
  contact:::
460
468
  street::::
461
- * 8 Street St
469
+ . 8 Street St
462
470
  city:::: City
463
471
  postcode:::: 123456
464
472
  country:::: Country
@@ -469,7 +477,7 @@ id:: www.ietf.org
469
477
  role:: author
470
478
 
471
479
  ==== Contributor
472
- person::
480
+ organization::
473
481
  name::: IETF
474
482
  abbreviation::: IETF
475
483
  identifier:::
@@ -484,13 +492,16 @@ person::
484
492
  initial:::: A.
485
493
  surname:::: Bierman
486
494
  affiliation:::
487
- organization::::
488
- name::::: IETF
489
- abbreviation::::: IETF
490
- description::::
491
- content::::: Affiliation description
492
- language::::: en
493
- script::::: Latn
495
+ +
496
+ --
497
+ organization::
498
+ name::: IETF
499
+ abbreviation::: IETF
500
+ description::
501
+ content::: Affiliation description
502
+ language::: en
503
+ script::: Latn
504
+ --
494
505
  identifier:::
495
506
  type:::: uri
496
507
  id:::: www.person.com
@@ -506,8 +517,8 @@ bibitem::
506
517
  reference_to:::: 10
507
518
 
508
519
  ==== Relation
509
- type::: updates
510
- bibitem:::
520
+ type:: updates
521
+ bibitem::
511
522
  type::: standard
512
523
  formattedref::: ISO 19115:2003/Cor 1:2006
513
524
 
@@ -538,7 +549,260 @@ formattedref::
538
549
  script::: Latn
539
550
  ....
540
551
 
552
+ == JSON Path style definition lists
553
+
554
+ The foregoing structure requires frequent breakouts into open blocks, to deal
555
+ with the limitation on Asciidoctor nested definition lists. An alternative is to
556
+ represent the nested structure of Relaton records in a simple, one-level definition list, and to use the key for each key-value pair to represent the hierarchical nesting of entries, as a dot-delimited path of keys. For example,
557
+
558
+ [source,asciidoctor]
559
+ ----
560
+ [%bibitem]
561
+ === Rubber latex -- Sampling
562
+ id:: iso123
563
+ docid::
564
+ type::: ISO
565
+ id::: ISO 123
566
+ ----
567
+
568
+ can instead be represented as:
569
+
570
+ [source,asciidoctor]
571
+ ----
572
+ [%bibitem]
573
+ === Rubber latex -- Sampling
574
+ id:: iso123
575
+ docid.type:: ISO
576
+ docid.id::: ISO 123
577
+ ----
578
+
579
+ Whenever part of the key is repeated between entries, the entries are assumed to attach to the same parent. If an array of hashes is needed, a blank entry is required for the key of each repeating element: For example,
580
+
581
+ [source,asciidoctor]
582
+ ----
583
+ [%bibitem]
584
+ === Rubber latex -- Sampling
585
+ id:: iso123
586
+ docid::
587
+ type::: ISO
588
+ id::: ISO 123
589
+ docid::
590
+ type::: ABC
591
+ id::: 32784
592
+ type:: standard
593
+ ----
594
+
595
+ can instead be represented as:
596
+
597
+ [source,asciidoctor]
598
+ ----
599
+ [%bibitem]
600
+ === Rubber latex -- Sampling
601
+ id:: iso123
602
+ docid::
603
+ docid.type:: ISO
604
+ docid.id::: ISO 123
605
+ docid::
606
+ docid.type:: ABC
607
+ docid.id:: 32784
608
+ ----
609
+
610
+ Embedded elements can also repeat:
611
+
612
+ [source,asciidoctor]
613
+ ----
614
+ [%bibitem]
615
+ ...
616
+ ==== Contributor
617
+ person::
618
+ contact:::
619
+ street::::
620
+ . 8 Street St
621
+ city:::: City
622
+ postcode:::: 123456
623
+ country:::: Country
624
+ state:::: State
625
+ contact:::
626
+ type:::: phone
627
+ value:::: 223322
628
+ ----
541
629
 
630
+ can instead be represented as:
542
631
 
632
+ [source,asciidoctor]
633
+ ----
634
+ [%bibitem]
635
+ ...
636
+ contributor.person.contact::
637
+ contributor.person.contact.street:: 8 Street St
638
+ contributor.person.contact.city:: City
639
+ contributor.person.contact.postcode:: 123456
640
+ contributor.person.contact.country:: Country
641
+ contributor.person.contact.state:: State
642
+ contributor.person.contact::
643
+ contributor.person.contact.type:: phone
644
+ contributor.person.contact.value:: 223322
645
+ ----
543
646
 
647
+ The following is Metanorma Asciidoctor markup corresponding to the YAML
648
+ given above, using JSON Path style definition lists instead of nested definition lists:
544
649
 
650
+ [source,asciidoc]
651
+ ....
652
+ [[ISO/TC211]]
653
+ [%bibitem]
654
+ === {blank}
655
+ fetched:: 2019-06-30
656
+ title::
657
+ title.type:: main
658
+ title.content:: Geographic information
659
+ title::
660
+ title.type:: subtitle
661
+ title.content:: Geographic information subtitle
662
+ title.language:: en
663
+ title.script:: Latn
664
+ title.format:: text/plain
665
+ type:: standard
666
+ docid::
667
+ docid.type:: ISO
668
+ docid.id:: TC211
669
+ docnumber:: 211
670
+ edition:: 1
671
+ language:: en
672
+ language:: fr
673
+ script:: Latn
674
+ version.revision_date:: 2019-04-01
675
+ version.draft:: draft
676
+ biblionote.type:: bibnote
677
+ biblionote.content::
678
+ +
679
+ --
680
+ Mark set a major league
681
+ home run record in 1998.
682
+ --
683
+ docstatus.stage:: stage
684
+ docstatus.substage:: substage
685
+ docstatus.iteration:: iteration
686
+ date::
687
+ date.type:: issued
688
+ date.value:: 2014
689
+ date::
690
+ date.type:: published
691
+ date.from:: 2014-04
692
+ date.to:: 2014-05
693
+ date::
694
+ date.type:: accessed
695
+ date.value:: 2015-05-20
696
+ abstract::
697
+ abstract.content::
698
+ +
699
+ --
700
+ ISO 19115-1:2014 defines the schema required for ...
701
+ --
702
+ abstract::
703
+ abstract.content:: L'ISO 19115-1:2014 définit le schéma requis pour ...
704
+ abstract.language:: fr
705
+ abstract.script:: Latn
706
+ abstract.format:: text/plain
707
+ copyright.owner.name:: International Organization for Standardization
708
+ copyright.owner.abbreviation:: ISO
709
+ copyright.owner.url:: www.iso.org
710
+ copyright.from:: 2014
711
+ copyright.to:: 2020
712
+ link::
713
+ link.type:: src
714
+ link.content:: https://www.iso.org/standard/53798.html
715
+ link::
716
+ link.type:: obp
717
+ link.content:: https://www.iso.org/obp/ui/#!iso:std:53798:en
718
+ link::
719
+ link.type:: rss
720
+ link.content:: https://www.iso.org/contents/data/standard/05/37/53798.detail.rss
721
+ medium::
722
+ medium.form:: medium form
723
+ medium.size:: medium size
724
+ medium.scale:: medium scale
725
+ place:: bib place
726
+ extent.type:: section
727
+ extent.reference_from:: 7
728
+ accesslocation:: accesslocation1
729
+ accesslocation:: accesslocation2
730
+ classification.type:: type
731
+ classification.value:: value
732
+ validity.begins:: 2010-10-10 12:21
733
+ validity.ends:: 2011-02-03 18:30
734
+ contributor::
735
+ contributor.organization.name:: International Organization for Standardization
736
+ contributor.organization.url:: www.iso.org
737
+ contributor.organization.abbreviation:: ISO
738
+ contributor.organization.subdivision:: division
739
+ contributor.role.type:: publisher
740
+ contributor.role.description:: Publisher role
741
+ contributor::
742
+ contributor.person.name.completename.content:: A. Bierman
743
+ contributor.person.name.completename.language:: en
744
+ contributor.person.affiliation.organization.name:: IETF
745
+ contributor.person.affiliation.organization.abbreviation:: IETF
746
+ contributor.person.affiliation.organization.identifier.type:: uri
747
+ contributor.person.affiliation.organization.identifier.id:: www.ietf.org
748
+ contributor.person.affiliation.description:: Affiliation description
749
+ contributor.person.contact::
750
+ contributor.person.contact.street:: 8 Street St
751
+ contributor.person.contact.city:: City
752
+ contributor.person.contact.postcode:: 123456
753
+ contributor.person.contact.country:: Country
754
+ contributor.person.contact.state:: State
755
+ contributor.person.contact::
756
+ contributor.person.contact.type:: phone
757
+ contributor.person.contact.value:: 223322
758
+ contributor.role:: author
759
+ contributor::
760
+ contributor.organization.name:: IETF
761
+ contributor.organization.abbreviation:: IETF
762
+ contributor.organization.identifier.type:: uri
763
+ contributor.organization.identifier.id:: www.ietf.org
764
+ contributor.role:: publisher
765
+ contributor::
766
+ contributor.person.name.language:: en
767
+ contributor.person.name.initial:: A.
768
+ contributor.person.name.surname:: Bierman
769
+ contributor.person.affiliation.organization.name:: IETF
770
+ contributor.person.affiliation.organization.abbreviation:: IETF
771
+ contributor.person.affiliation.description.content:: Affiliation description
772
+ contributor.person.affiliation.description.language:: en
773
+ contributor.person.affiliation.description.script:: Latn
774
+ contributor.person.identifier.type:: uri
775
+ contributor.person.identifier.id:: www.person.com
776
+ contributor.role:: author
777
+ relation::
778
+ relation.type:: updates
779
+ relation.bibitem.formattedref:: ISO 19115:2003
780
+ relation.bibitem.bib_locality.type:: page
781
+ relation.bibitem.bib_locality.reference_from:: 7
782
+ relation.bibitem.bib_locality.reference_to:: 10
783
+ relation::
784
+ relation.type:: updates
785
+ relation.bibitem.type:: standard
786
+ relation.bibitem.formattedref:: ISO 19115:2003/Cor 1:2006
787
+ series::
788
+ series.type:: main
789
+ series.title.type:: original
790
+ series.title.content:: ISO/IEC FDIS 10118-3
791
+ series.title.language:: en
792
+ series.title.script:: Latn
793
+ series.title.format:: text/plain
794
+ series.place:: Serie's place
795
+ series.organization:: Serie's organization
796
+ series.abbreviation.content:: ABVR
797
+ series.abbreviation.language:: en
798
+ series.abbreviation.script:: Latn
799
+ series.from:: 2009-02-01
800
+ series.to:: 2010-12-20
801
+ series.number:: serie1234
802
+ series.partnumber:: part5678
803
+ series::
804
+ series.type:: alt
805
+ series.formattedref.content:: serieref
806
+ series.formattedref.language:: en
807
+ series.formattedref.script:: Latn
808
+ ----