relaton-un 1.9.0 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile +1 -1
- data/README.adoc +12 -0
- data/grammars/basicdoc.rng +26 -7
- data/grammars/biblio.rng +31 -6
- data/grammars/isodoc.rng +687 -89
- data/grammars/reqt.rng +34 -5
- data/grammars/un.rng +12 -17
- data/lib/relaton_un/hit.rb +3 -1
- data/lib/relaton_un/hit_collection.rb +8 -7
- data/lib/relaton_un/un_bibliographic_item.rb +4 -4
- data/lib/relaton_un/version.rb +1 -1
- data/relaton_un.gemspec +1 -2
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cf4c30cc5137754ed2daee1906673cab0d16d70d068caa867570a5b6a417828
|
4
|
+
data.tar.gz: 95052c432eb4430ebaf11b337d6c5098964ae46bcb10d5488e145c89c90df33c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5884341b08a3bb3bb779d221e445af3a36710ee95b9bebc901f11d24694aef863197af8a40122c08e8382b0cf753dc5861069badf1db58bea77f176ed2b42f37
|
7
|
+
data.tar.gz: 9e8160df6871111766c720eb452f01212dfda2fbf6572f4adb5cf57578a68382bf3421be885d3c11ed1451fb0daf77260958a55df970a33035ab1b4727aee05b
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/README.adoc
CHANGED
@@ -89,6 +89,18 @@ RelatonUn::UnBibliography.get "UN TRADE/CEFACT/2004/32"
|
|
89
89
|
...
|
90
90
|
----
|
91
91
|
|
92
|
+
=== Typed links
|
93
|
+
|
94
|
+
UN documens may have `pdf` and `word` link types.
|
95
|
+
|
96
|
+
[source,ruby]
|
97
|
+
----
|
98
|
+
item.link
|
99
|
+
=> [#<RelatonBib::TypedUri:0x00007f81af368250
|
100
|
+
@content=#<Addressable::URI:0x9ec URI:https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/pdf/G0430683.pdf?OpenElement>, @type="pdf">,
|
101
|
+
#<RelatonBib::TypedUri:0x00007f81af3630e8 @content=#<Addressable::URI:0xa00 URI:https://documents-dds-ny.un.org/doc/UNDOC/GEN/G04/306/83/doc/G0430683.DOC?OpenElement>, @type="word">]
|
102
|
+
----
|
103
|
+
|
92
104
|
=== Create bibliographic item from XML
|
93
105
|
[source,ruby]
|
94
106
|
----
|
data/grammars/basicdoc.rng
CHANGED
@@ -173,9 +173,11 @@
|
|
173
173
|
<data type="dateTime"/>
|
174
174
|
</attribute>
|
175
175
|
</optional>
|
176
|
-
<
|
177
|
-
<
|
178
|
-
|
176
|
+
<optional>
|
177
|
+
<attribute name="from">
|
178
|
+
<data type="IDREF"/>
|
179
|
+
</attribute>
|
180
|
+
</optional>
|
179
181
|
<optional>
|
180
182
|
<attribute name="to">
|
181
183
|
<data type="IDREF"/>
|
@@ -624,6 +626,9 @@
|
|
624
626
|
<choice>
|
625
627
|
<ref name="PureTextElement"/>
|
626
628
|
<ref name="stem"/>
|
629
|
+
<ref name="eref"/>
|
630
|
+
<ref name="xref"/>
|
631
|
+
<ref name="hyperlink"/>
|
627
632
|
</choice>
|
628
633
|
</zeroOrMore>
|
629
634
|
</element>
|
@@ -634,6 +639,9 @@
|
|
634
639
|
<choice>
|
635
640
|
<ref name="PureTextElement"/>
|
636
641
|
<ref name="stem"/>
|
642
|
+
<ref name="eref"/>
|
643
|
+
<ref name="xref"/>
|
644
|
+
<ref name="hyperlink"/>
|
637
645
|
</choice>
|
638
646
|
</zeroOrMore>
|
639
647
|
</element>
|
@@ -641,7 +649,12 @@
|
|
641
649
|
<define name="tt">
|
642
650
|
<element name="tt">
|
643
651
|
<zeroOrMore>
|
644
|
-
<
|
652
|
+
<choice>
|
653
|
+
<ref name="PureTextElement"/>
|
654
|
+
<ref name="eref"/>
|
655
|
+
<ref name="xref"/>
|
656
|
+
<ref name="hyperlink"/>
|
657
|
+
</choice>
|
645
658
|
</zeroOrMore>
|
646
659
|
</element>
|
647
660
|
</define>
|
@@ -822,7 +835,9 @@
|
|
822
835
|
<attribute name="alt"/>
|
823
836
|
</optional>
|
824
837
|
<ref name="CitationType"/>
|
825
|
-
<
|
838
|
+
<oneOrMore>
|
839
|
+
<ref name="PureTextElement"/>
|
840
|
+
</oneOrMore>
|
826
841
|
</define>
|
827
842
|
<define name="hyperlink">
|
828
843
|
<element name="link">
|
@@ -835,7 +850,9 @@
|
|
835
850
|
<optional>
|
836
851
|
<attribute name="alt"/>
|
837
852
|
</optional>
|
838
|
-
<
|
853
|
+
<oneOrMore>
|
854
|
+
<ref name="PureTextElement"/>
|
855
|
+
</oneOrMore>
|
839
856
|
</element>
|
840
857
|
</define>
|
841
858
|
<define name="xref">
|
@@ -849,7 +866,9 @@
|
|
849
866
|
<optional>
|
850
867
|
<attribute name="alt"/>
|
851
868
|
</optional>
|
852
|
-
<
|
869
|
+
<oneOrMore>
|
870
|
+
<ref name="PureTextElement"/>
|
871
|
+
</oneOrMore>
|
853
872
|
</element>
|
854
873
|
</define>
|
855
874
|
<define name="fn">
|
data/grammars/biblio.rng
CHANGED
@@ -209,9 +209,6 @@
|
|
209
209
|
<zeroOrMore>
|
210
210
|
<ref name="contact"/>
|
211
211
|
</zeroOrMore>
|
212
|
-
<zeroOrMore>
|
213
|
-
<ref name="uri"/>
|
214
|
-
</zeroOrMore>
|
215
212
|
</element>
|
216
213
|
</define>
|
217
214
|
<define name="fullname">
|
@@ -401,9 +398,9 @@
|
|
401
398
|
<choice>
|
402
399
|
<!-- iso191606 TODO -->
|
403
400
|
<group>
|
404
|
-
<
|
401
|
+
<zeroOrMore>
|
405
402
|
<ref name="street"/>
|
406
|
-
</
|
403
|
+
</zeroOrMore>
|
407
404
|
<ref name="city"/>
|
408
405
|
<optional>
|
409
406
|
<ref name="state"/>
|
@@ -680,6 +677,9 @@
|
|
680
677
|
<zeroOrMore>
|
681
678
|
<ref name="extent"/>
|
682
679
|
</zeroOrMore>
|
680
|
+
<optional>
|
681
|
+
<ref name="bibliographic_size"/>
|
682
|
+
</optional>
|
683
683
|
<zeroOrMore>
|
684
684
|
<ref name="accesslocation"/>
|
685
685
|
</zeroOrMore>
|
@@ -828,6 +828,11 @@
|
|
828
828
|
<optional>
|
829
829
|
<attribute name="scope"/>
|
830
830
|
</optional>
|
831
|
+
<optional>
|
832
|
+
<attribute name="primary">
|
833
|
+
<data type="boolean"/>
|
834
|
+
</attribute>
|
835
|
+
</optional>
|
831
836
|
<text/>
|
832
837
|
</element>
|
833
838
|
</define>
|
@@ -920,9 +925,29 @@
|
|
920
925
|
<text/>
|
921
926
|
</element>
|
922
927
|
</define>
|
928
|
+
<define name="sizevalue">
|
929
|
+
<element name="value">
|
930
|
+
<attribute name="type"/>
|
931
|
+
<text/>
|
932
|
+
</element>
|
933
|
+
</define>
|
934
|
+
<define name="bibliographic_size">
|
935
|
+
<element name="size">
|
936
|
+
<oneOrMore>
|
937
|
+
<ref name="sizevalue"/>
|
938
|
+
</oneOrMore>
|
939
|
+
</element>
|
940
|
+
</define>
|
923
941
|
<define name="extent">
|
924
942
|
<element name="extent">
|
925
|
-
<
|
943
|
+
<choice>
|
944
|
+
<zeroOrMore>
|
945
|
+
<ref name="locality"/>
|
946
|
+
</zeroOrMore>
|
947
|
+
<zeroOrMore>
|
948
|
+
<ref name="localityStack"/>
|
949
|
+
</zeroOrMore>
|
950
|
+
</choice>
|
926
951
|
</element>
|
927
952
|
</define>
|
928
953
|
<define name="series">
|