relaton-un 0.1.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grammars/biblio.rng +144 -49
- data/grammars/isodoc.rng +54 -5
- data/grammars/un.rng +107 -1
- data/lib/relaton_un.rb +3 -1
- data/lib/relaton_un/editorialgroup.rb +25 -0
- data/lib/relaton_un/hash_converter.rb +29 -1
- data/lib/relaton_un/hit.rb +108 -15
- data/lib/relaton_un/hit_collection.rb +124 -47
- data/lib/relaton_un/session.rb +65 -0
- data/lib/relaton_un/un_bibliographic_item.rb +37 -1
- data/lib/relaton_un/un_bibliography.rb +8 -5
- data/lib/relaton_un/version.rb +1 -1
- data/lib/relaton_un/xml_parser.rb +50 -5
- data/relaton_un.gemspec +14 -12
- metadata +19 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f71e444700515b65a12a9e78398bbb1f7f130929acbe7970b4314da4db4bc0db
|
4
|
+
data.tar.gz: 8b1294644b333cd832b2c725afb73820fd62c3bc16db09acb7b121c91fcb9992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eadba3d12ae0111bf66e4c8a1b427b88dc43a3afcc18cf83f36d692c17c0f7f7557d5bb91b482f6e8a88312b80c1995df0736ce82b030bf9313b6dd63200811
|
7
|
+
data.tar.gz: bd0c9c8123c157206622ef6eede17f3e5badde27e2746c2487f1bbbae52c3dec6c4da97b32e4c8df3ce1d8289105abd0175b0653578918744ef621f3c1004948
|
data/grammars/biblio.rng
CHANGED
@@ -49,11 +49,17 @@
|
|
49
49
|
</define>
|
50
50
|
<define name="stage">
|
51
51
|
<element name="stage">
|
52
|
+
<optional>
|
53
|
+
<attribute name="abbreviation"/>
|
54
|
+
</optional>
|
52
55
|
<text/>
|
53
56
|
</element>
|
54
57
|
</define>
|
55
58
|
<define name="substage">
|
56
59
|
<element name="substage">
|
60
|
+
<optional>
|
61
|
+
<attribute name="abbreviation"/>
|
62
|
+
</optional>
|
57
63
|
<text/>
|
58
64
|
</element>
|
59
65
|
</define>
|
@@ -82,7 +88,7 @@
|
|
82
88
|
<text/>
|
83
89
|
</element>
|
84
90
|
</define>
|
85
|
-
<define name="
|
91
|
+
<define name="LocalizedString1">
|
86
92
|
<optional>
|
87
93
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
88
94
|
<attribute name="language"/>
|
@@ -92,6 +98,16 @@
|
|
92
98
|
</optional>
|
93
99
|
<text/>
|
94
100
|
</define>
|
101
|
+
<define name="LocalizedString">
|
102
|
+
<choice>
|
103
|
+
<ref name="LocalizedString1"/>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="variant">
|
106
|
+
<ref name="LocalizedString1"/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
</choice>
|
110
|
+
</define>
|
95
111
|
<!--
|
96
112
|
Unlike UML, change type to format: type is overloaded
|
97
113
|
Would be need if plain were default value and could omit the attribute
|
@@ -115,7 +131,7 @@
|
|
115
131
|
</optional>
|
116
132
|
<ref name="LocalizedStringOrXsAny"/>
|
117
133
|
</define>
|
118
|
-
<define name="
|
134
|
+
<define name="LocalizedStringOrXsAny1">
|
119
135
|
<optional>
|
120
136
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
121
137
|
<attribute name="language"/>
|
@@ -130,6 +146,16 @@
|
|
130
146
|
</choice>
|
131
147
|
</oneOrMore>
|
132
148
|
</define>
|
149
|
+
<define name="LocalizedStringOrXsAny">
|
150
|
+
<choice>
|
151
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
152
|
+
<oneOrMore>
|
153
|
+
<element name="variant">
|
154
|
+
<ref name="LocalizedStringOrXsAny1"/>
|
155
|
+
</element>
|
156
|
+
</oneOrMore>
|
157
|
+
</choice>
|
158
|
+
</define>
|
133
159
|
<define name="contributor">
|
134
160
|
<element name="contributor">
|
135
161
|
<zeroOrMore>
|
@@ -452,9 +478,14 @@
|
|
452
478
|
<attribute name="bibitemid">
|
453
479
|
<data type="IDREF"/>
|
454
480
|
</attribute>
|
455
|
-
<
|
456
|
-
<
|
457
|
-
|
481
|
+
<choice>
|
482
|
+
<zeroOrMore>
|
483
|
+
<ref name="locality"/>
|
484
|
+
</zeroOrMore>
|
485
|
+
<zeroOrMore>
|
486
|
+
<ref name="localityStack"/>
|
487
|
+
</zeroOrMore>
|
488
|
+
</choice>
|
458
489
|
<optional>
|
459
490
|
<ref name="date"/>
|
460
491
|
</optional>
|
@@ -469,6 +500,25 @@
|
|
469
500
|
<ref name="BibItemLocality"/>
|
470
501
|
</element>
|
471
502
|
</define>
|
503
|
+
<define name="localityStack">
|
504
|
+
<element name="localityStack">
|
505
|
+
<zeroOrMore>
|
506
|
+
<ref name="locality"/>
|
507
|
+
</zeroOrMore>
|
508
|
+
</element>
|
509
|
+
</define>
|
510
|
+
<define name="sourceLocality">
|
511
|
+
<element name="sourceLocality">
|
512
|
+
<ref name="BibItemLocality"/>
|
513
|
+
</element>
|
514
|
+
</define>
|
515
|
+
<define name="sourceLocalityStack">
|
516
|
+
<element name="sourceLocalityStack">
|
517
|
+
<zeroOrMore>
|
518
|
+
<ref name="sourceLocality"/>
|
519
|
+
</zeroOrMore>
|
520
|
+
</element>
|
521
|
+
</define>
|
472
522
|
<define name="BibItemLocality">
|
473
523
|
<attribute name="type">
|
474
524
|
<ref name="LocalityType"/>
|
@@ -611,9 +661,9 @@
|
|
611
661
|
<optional>
|
612
662
|
<ref name="status"/>
|
613
663
|
</optional>
|
614
|
-
<
|
664
|
+
<zeroOrMore>
|
615
665
|
<ref name="copyright"/>
|
616
|
-
</
|
666
|
+
</zeroOrMore>
|
617
667
|
<zeroOrMore>
|
618
668
|
<ref name="docrelation"/>
|
619
669
|
</zeroOrMore>
|
@@ -703,21 +753,11 @@
|
|
703
753
|
</define>
|
704
754
|
<define name="TypedTitleString">
|
705
755
|
<optional>
|
706
|
-
<attribute name="type"
|
707
|
-
<ref name="TitleType"/>
|
708
|
-
</attribute>
|
756
|
+
<attribute name="type"/>
|
709
757
|
</optional>
|
710
758
|
<ref name="FormattedString"/>
|
711
759
|
</define>
|
712
|
-
|
713
|
-
<choice>
|
714
|
-
<value>alternative</value>
|
715
|
-
<value>original</value>
|
716
|
-
<value>unofficial</value>
|
717
|
-
<value>subtitle</value>
|
718
|
-
<value>main</value>
|
719
|
-
</choice>
|
720
|
-
</define>
|
760
|
+
<!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
|
721
761
|
<define name="TypedUri">
|
722
762
|
<optional>
|
723
763
|
<attribute name="type"/>
|
@@ -747,6 +787,8 @@
|
|
747
787
|
<value>unchanged</value>
|
748
788
|
<value>circulated</value>
|
749
789
|
<value>adapted</value>
|
790
|
+
<value>vote-started</value>
|
791
|
+
<value>vote-ended</value>
|
750
792
|
</choice>
|
751
793
|
</define>
|
752
794
|
<define name="bdate">
|
@@ -979,7 +1021,17 @@
|
|
979
1021
|
<optional>
|
980
1022
|
<ref name="to"/>
|
981
1023
|
</optional>
|
982
|
-
<
|
1024
|
+
<oneOrMore>
|
1025
|
+
<ref name="owner"/>
|
1026
|
+
</oneOrMore>
|
1027
|
+
<optional>
|
1028
|
+
<ref name="copyright_scope"/>
|
1029
|
+
</optional>
|
1030
|
+
</element>
|
1031
|
+
</define>
|
1032
|
+
<define name="copyright_scope">
|
1033
|
+
<element name="scope">
|
1034
|
+
<text/>
|
983
1035
|
</element>
|
984
1036
|
</define>
|
985
1037
|
<define name="from">
|
@@ -999,38 +1051,63 @@
|
|
999
1051
|
</define>
|
1000
1052
|
<define name="DocRelationType">
|
1001
1053
|
<choice>
|
1002
|
-
<value>obsoletes</value>
|
1003
|
-
<value>obsoletedBy</value>
|
1004
|
-
<value>supersedes</value>
|
1005
|
-
<value>supersededBy</value>
|
1006
|
-
<value>updates</value>
|
1007
|
-
<value>updatedBy</value>
|
1008
|
-
<value>complements</value>
|
1009
|
-
<value>derivedFrom</value>
|
1010
|
-
<value>translatedFrom</value>
|
1011
|
-
<value>hasTranslation</value>
|
1012
|
-
<value>adoptedFrom</value>
|
1013
|
-
<value>equivalent</value>
|
1014
|
-
<value>identical</value>
|
1015
|
-
<value>nonequivalent</value>
|
1016
|
-
<value>includedIn</value>
|
1017
1054
|
<value>includes</value>
|
1018
|
-
<value>
|
1019
|
-
<value>instanceOf</value>
|
1020
|
-
<value>partOf</value>
|
1055
|
+
<value>includedIn</value>
|
1021
1056
|
<value>hasPart</value>
|
1022
|
-
<value>
|
1023
|
-
<value>draftOf</value>
|
1057
|
+
<value>partOf</value>
|
1024
1058
|
<value>merges</value>
|
1059
|
+
<value>mergedInto</value>
|
1025
1060
|
<value>splits</value>
|
1026
|
-
<value>
|
1027
|
-
<value>
|
1028
|
-
<value>
|
1029
|
-
<value>
|
1030
|
-
<value>
|
1031
|
-
<value>
|
1061
|
+
<value>splitInto</value>
|
1062
|
+
<value>instance</value>
|
1063
|
+
<value>hasInstance</value>
|
1064
|
+
<value>exemplarOf</value>
|
1065
|
+
<value>hasExemplar</value>
|
1066
|
+
<value>manifestationOf</value>
|
1067
|
+
<value>hasManifestation</value>
|
1068
|
+
<value>reproductionOf</value>
|
1069
|
+
<value>hasReproduction</value>
|
1070
|
+
<value>reprintOf</value>
|
1071
|
+
<value>hasReprint</value>
|
1072
|
+
<value>expressionOf</value>
|
1073
|
+
<value>hasExpression</value>
|
1074
|
+
<value>translatedFrom</value>
|
1075
|
+
<value>hasTranslation</value>
|
1076
|
+
<value>arrangementOf</value>
|
1077
|
+
<value>hasArrangement</value>
|
1078
|
+
<value>abridgementOf</value>
|
1079
|
+
<value>hasAbridgement</value>
|
1080
|
+
<value>annotationOf</value>
|
1081
|
+
<value>hasAnnotation</value>
|
1082
|
+
<value>draftOf</value>
|
1083
|
+
<value>hasDraft</value>
|
1084
|
+
<value>editionOf</value>
|
1085
|
+
<value>hasEdition</value>
|
1086
|
+
<value>updates</value>
|
1087
|
+
<value>updatedBy</value>
|
1088
|
+
<value>derivedFrom</value>
|
1089
|
+
<value>derives</value>
|
1032
1090
|
<value>describes</value>
|
1033
1091
|
<value>describedBy</value>
|
1092
|
+
<value>catalogues</value>
|
1093
|
+
<value>cataloguedBy</value>
|
1094
|
+
<value>hasSuccessor</value>
|
1095
|
+
<value>successorOf</value>
|
1096
|
+
<value>adaptedFrom</value>
|
1097
|
+
<value>hasAdaptation</value>
|
1098
|
+
<value>adoptedFrom</value>
|
1099
|
+
<value>adoptedAs</value>
|
1100
|
+
<value>reviewOf</value>
|
1101
|
+
<value>hasReview</value>
|
1102
|
+
<value>commentaryOf</value>
|
1103
|
+
<value>hasCommentary</value>
|
1104
|
+
<value>related</value>
|
1105
|
+
<value>complements</value>
|
1106
|
+
<value>complementOf</value>
|
1107
|
+
<value>obsoletes</value>
|
1108
|
+
<value>obsoletedBy</value>
|
1109
|
+
<value>cited</value>
|
1110
|
+
<value>isCitedIn</value>
|
1034
1111
|
</choice>
|
1035
1112
|
</define>
|
1036
1113
|
<define name="docrelation">
|
@@ -1038,12 +1115,30 @@
|
|
1038
1115
|
<attribute name="type">
|
1039
1116
|
<ref name="DocRelationType"/>
|
1040
1117
|
</attribute>
|
1118
|
+
<optional>
|
1119
|
+
<element name="description">
|
1120
|
+
<ref name="FormattedString"/>
|
1121
|
+
</element>
|
1122
|
+
</optional>
|
1041
1123
|
<element name="bibitem">
|
1042
1124
|
<ref name="BibliographicItem"/>
|
1043
1125
|
</element>
|
1044
|
-
<
|
1045
|
-
<
|
1046
|
-
|
1126
|
+
<choice>
|
1127
|
+
<zeroOrMore>
|
1128
|
+
<ref name="locality"/>
|
1129
|
+
</zeroOrMore>
|
1130
|
+
<zeroOrMore>
|
1131
|
+
<ref name="localityStack"/>
|
1132
|
+
</zeroOrMore>
|
1133
|
+
</choice>
|
1134
|
+
<choice>
|
1135
|
+
<zeroOrMore>
|
1136
|
+
<ref name="sourceLocality"/>
|
1137
|
+
</zeroOrMore>
|
1138
|
+
<zeroOrMore>
|
1139
|
+
<ref name="sourceLocalityStack"/>
|
1140
|
+
</zeroOrMore>
|
1141
|
+
</choice>
|
1047
1142
|
</element>
|
1048
1143
|
</define>
|
1049
1144
|
<define name="version">
|
data/grammars/isodoc.rng
CHANGED
@@ -53,6 +53,14 @@
|
|
53
53
|
<optional>
|
54
54
|
<attribute name="alt"/>
|
55
55
|
</optional>
|
56
|
+
<optional>
|
57
|
+
<attribute name="case">
|
58
|
+
<choice>
|
59
|
+
<value>capital</value>
|
60
|
+
<value>lowercase</value>
|
61
|
+
</choice>
|
62
|
+
</attribute>
|
63
|
+
</optional>
|
56
64
|
<text/>
|
57
65
|
</element>
|
58
66
|
</define>
|
@@ -101,9 +109,7 @@
|
|
101
109
|
<ref name="structuredidentifier"/>
|
102
110
|
</zeroOrMore>
|
103
111
|
</define>
|
104
|
-
|
105
|
-
<text/>
|
106
|
-
</define>
|
112
|
+
<!-- TitleType = text -->
|
107
113
|
<define name="sections">
|
108
114
|
<element name="sections">
|
109
115
|
<oneOrMore>
|
@@ -131,6 +137,9 @@
|
|
131
137
|
</choice>
|
132
138
|
</attribute>
|
133
139
|
</optional>
|
140
|
+
<attribute name="normative">
|
141
|
+
<data type="boolean"/>
|
142
|
+
</attribute>
|
134
143
|
<optional>
|
135
144
|
<ref name="section-title"/>
|
136
145
|
</optional>
|
@@ -307,6 +316,21 @@
|
|
307
316
|
</define>
|
308
317
|
</include>
|
309
318
|
<!-- end overrides -->
|
319
|
+
<define name="TextElement" combine="choice">
|
320
|
+
<ref name="concept"/>
|
321
|
+
</define>
|
322
|
+
<define name="concept">
|
323
|
+
<element name="concept">
|
324
|
+
<optional>
|
325
|
+
<attribute name="term"/>
|
326
|
+
</optional>
|
327
|
+
<choice>
|
328
|
+
<ref name="eref"/>
|
329
|
+
<ref name="xref"/>
|
330
|
+
<ref name="termref"/>
|
331
|
+
</choice>
|
332
|
+
</element>
|
333
|
+
</define>
|
310
334
|
<define name="BasicBlock" combine="choice">
|
311
335
|
<choice>
|
312
336
|
<ref name="requirement"/>
|
@@ -645,6 +669,11 @@
|
|
645
669
|
<optional>
|
646
670
|
<attribute name="script"/>
|
647
671
|
</optional>
|
672
|
+
<optional>
|
673
|
+
<attribute name="inline-header">
|
674
|
+
<data type="boolean"/>
|
675
|
+
</attribute>
|
676
|
+
</optional>
|
648
677
|
<optional>
|
649
678
|
<attribute name="obligation">
|
650
679
|
<choice>
|
@@ -881,7 +910,15 @@
|
|
881
910
|
<attribute name="id">
|
882
911
|
<data type="ID"/>
|
883
912
|
</attribute>
|
884
|
-
<
|
913
|
+
<oneOrMore>
|
914
|
+
<choice>
|
915
|
+
<ref name="paragraph"/>
|
916
|
+
<ref name="ul"/>
|
917
|
+
<ref name="ol"/>
|
918
|
+
<ref name="dl"/>
|
919
|
+
<ref name="formula"/>
|
920
|
+
</choice>
|
921
|
+
</oneOrMore>
|
885
922
|
</element>
|
886
923
|
</define>
|
887
924
|
<define name="termexample">
|
@@ -908,7 +945,10 @@
|
|
908
945
|
</define>
|
909
946
|
<define name="origin">
|
910
947
|
<element name="origin">
|
911
|
-
<
|
948
|
+
<choice>
|
949
|
+
<ref name="erefType"/>
|
950
|
+
<ref name="termref"/>
|
951
|
+
</choice>
|
912
952
|
</element>
|
913
953
|
</define>
|
914
954
|
<define name="modification">
|
@@ -916,6 +956,15 @@
|
|
916
956
|
<ref name="paragraph"/>
|
917
957
|
</element>
|
918
958
|
</define>
|
959
|
+
<define name="termref">
|
960
|
+
<element name="termref">
|
961
|
+
<attribute name="base"/>
|
962
|
+
<attribute name="target"/>
|
963
|
+
<optional>
|
964
|
+
<text/>
|
965
|
+
</optional>
|
966
|
+
</element>
|
967
|
+
</define>
|
919
968
|
<define name="structuredidentifier">
|
920
969
|
<element name="structuredidentifier">
|
921
970
|
<optional>
|
data/grammars/un.rng
CHANGED
@@ -107,7 +107,9 @@
|
|
107
107
|
<zeroOrMore>
|
108
108
|
<ref name="submissionlanguage"/>
|
109
109
|
</zeroOrMore>
|
110
|
-
<
|
110
|
+
<optional>
|
111
|
+
<ref name="editorialgroup"/>
|
112
|
+
</optional>
|
111
113
|
<zeroOrMore>
|
112
114
|
<ref name="ics"/>
|
113
115
|
</zeroOrMore>
|
@@ -136,6 +138,109 @@
|
|
136
138
|
<ref name="Basic-Section"/>
|
137
139
|
</element>
|
138
140
|
</define>
|
141
|
+
<define name="Clause-Section">
|
142
|
+
<optional>
|
143
|
+
<attribute name="id">
|
144
|
+
<data type="ID"/>
|
145
|
+
</attribute>
|
146
|
+
</optional>
|
147
|
+
<optional>
|
148
|
+
<attribute name="language"/>
|
149
|
+
</optional>
|
150
|
+
<optional>
|
151
|
+
<attribute name="script"/>
|
152
|
+
</optional>
|
153
|
+
<optional>
|
154
|
+
<attribute name="inline-header">
|
155
|
+
<data type="boolean"/>
|
156
|
+
</attribute>
|
157
|
+
</optional>
|
158
|
+
<optional>
|
159
|
+
<attribute name="obligation">
|
160
|
+
<choice>
|
161
|
+
<value>normative</value>
|
162
|
+
<value>informative</value>
|
163
|
+
</choice>
|
164
|
+
</attribute>
|
165
|
+
</optional>
|
166
|
+
<optional>
|
167
|
+
<attribute name="unnumbered">
|
168
|
+
<data type="boolean"/>
|
169
|
+
</attribute>
|
170
|
+
</optional>
|
171
|
+
<optional>
|
172
|
+
<ref name="section-title"/>
|
173
|
+
</optional>
|
174
|
+
<group>
|
175
|
+
<group>
|
176
|
+
<zeroOrMore>
|
177
|
+
<ref name="BasicBlock"/>
|
178
|
+
</zeroOrMore>
|
179
|
+
<zeroOrMore>
|
180
|
+
<ref name="note"/>
|
181
|
+
</zeroOrMore>
|
182
|
+
</group>
|
183
|
+
<zeroOrMore>
|
184
|
+
<choice>
|
185
|
+
<ref name="clause-subsection"/>
|
186
|
+
<ref name="terms"/>
|
187
|
+
<ref name="definitions"/>
|
188
|
+
</choice>
|
189
|
+
</zeroOrMore>
|
190
|
+
</group>
|
191
|
+
</define>
|
192
|
+
<define name="Annex-Section">
|
193
|
+
<optional>
|
194
|
+
<attribute name="id">
|
195
|
+
<data type="ID"/>
|
196
|
+
</attribute>
|
197
|
+
</optional>
|
198
|
+
<optional>
|
199
|
+
<attribute name="language"/>
|
200
|
+
</optional>
|
201
|
+
<optional>
|
202
|
+
<attribute name="script"/>
|
203
|
+
</optional>
|
204
|
+
<optional>
|
205
|
+
<attribute name="inline-header">
|
206
|
+
<data type="boolean"/>
|
207
|
+
</attribute>
|
208
|
+
</optional>
|
209
|
+
<optional>
|
210
|
+
<attribute name="obligation">
|
211
|
+
<choice>
|
212
|
+
<value>normative</value>
|
213
|
+
<value>informative</value>
|
214
|
+
</choice>
|
215
|
+
</attribute>
|
216
|
+
</optional>
|
217
|
+
<optional>
|
218
|
+
<attribute name="unnumbered">
|
219
|
+
<data type="boolean"/>
|
220
|
+
</attribute>
|
221
|
+
</optional>
|
222
|
+
<optional>
|
223
|
+
<ref name="section-title"/>
|
224
|
+
</optional>
|
225
|
+
<group>
|
226
|
+
<group>
|
227
|
+
<zeroOrMore>
|
228
|
+
<ref name="BasicBlock"/>
|
229
|
+
</zeroOrMore>
|
230
|
+
<zeroOrMore>
|
231
|
+
<ref name="note"/>
|
232
|
+
</zeroOrMore>
|
233
|
+
</group>
|
234
|
+
<zeroOrMore>
|
235
|
+
<choice>
|
236
|
+
<ref name="annex-subsection"/>
|
237
|
+
<ref name="terms"/>
|
238
|
+
<ref name="definitions"/>
|
239
|
+
<ref name="references"/>
|
240
|
+
</choice>
|
241
|
+
</zeroOrMore>
|
242
|
+
</group>
|
243
|
+
</define>
|
139
244
|
</include>
|
140
245
|
<define name="session">
|
141
246
|
<element name="session">
|
@@ -221,6 +326,7 @@
|
|
221
326
|
<value>general</value>
|
222
327
|
<value>limited</value>
|
223
328
|
<value>restricted</value>
|
329
|
+
<value>provisional</value>
|
224
330
|
</choice>
|
225
331
|
</element>
|
226
332
|
</define>
|