relaton-bib 1.20.7 → 2.0.0.pre.alpha.1
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 +4 -4
- data/.rubocop.yml +1 -1
- data/README.adoc +183 -154
- data/bin/console +1 -1
- data/grammars/basicdoc.rng +1516 -645
- data/grammars/biblio-standoc.rng +100 -20
- data/grammars/biblio.rng +959 -356
- data/grammars/versions.json +10 -10
- data/lib/relaton/bib/hash_parser_v1.rb +711 -0
- data/lib/relaton/bib/item_data.rb +168 -0
- data/lib/relaton/bib/model/address.rb +22 -0
- data/lib/relaton/bib/model/affiliation.rb +16 -0
- data/lib/relaton/bib/model/bibdata.rb +24 -0
- data/lib/relaton/bib/model/bibitem.rb +23 -0
- data/lib/relaton/bib/model/contact.rb +18 -0
- data/lib/relaton/bib/model/contribution_info.rb +16 -0
- data/lib/relaton/bib/model/contributor.rb +71 -0
- data/lib/relaton/bib/model/copyright.rb +27 -0
- data/lib/relaton/bib/model/date.rb +29 -0
- data/lib/relaton/bib/model/depiction.rb +14 -0
- data/lib/relaton/bib/model/docidentifier.rb +33 -0
- data/lib/relaton/bib/model/doctype.rb +14 -0
- data/lib/relaton/bib/model/edition.rb +14 -0
- data/lib/relaton/bib/model/editorial_group.rb +14 -0
- data/lib/relaton/bib/model/ext.rb +29 -0
- data/lib/relaton/bib/model/extent.rb +16 -0
- data/lib/relaton/bib/model/full_name_type.rb +64 -0
- data/lib/relaton/bib/model/fullname.rb +11 -0
- data/lib/relaton/bib/model/ics.rb +14 -0
- data/lib/relaton/bib/model/image.rb +28 -0
- data/lib/relaton/bib/model/item.rb +129 -0
- data/lib/relaton/bib/model/item_base.rb +19 -0
- data/lib/relaton/bib/model/keyword.rb +30 -0
- data/lib/relaton/bib/model/locality.rb +18 -0
- data/lib/relaton/bib/model/locality_stack.rb +14 -0
- data/lib/relaton/bib/model/localized_string.rb +57 -0
- data/lib/relaton/bib/model/localized_string_attrs.rb +24 -0
- data/lib/relaton/bib/model/logo.rb +12 -0
- data/lib/relaton/bib/model/medium.rb +22 -0
- data/lib/relaton/bib/model/note.rb +16 -0
- data/lib/relaton/bib/model/organization.rb +13 -0
- data/lib/relaton/bib/model/organization_type.rb +42 -0
- data/lib/relaton/bib/model/person.rb +36 -0
- data/lib/relaton/bib/model/phone.rb +14 -0
- data/lib/relaton/bib/model/place.rb +33 -0
- data/lib/relaton/bib/model/price.rb +14 -0
- data/lib/relaton/bib/model/relation.rb +43 -0
- data/lib/relaton/bib/model/series.rb +32 -0
- data/lib/relaton/bib/model/size.rb +23 -0
- data/lib/relaton/bib/model/source_locality_stack.rb +14 -0
- data/lib/relaton/bib/model/status.rb +27 -0
- data/lib/relaton/bib/model/structured_identifier.rb +48 -0
- data/lib/relaton/bib/model/subdivision.rb +14 -0
- data/lib/relaton/bib/model/technical_committee.rb +14 -0
- data/lib/relaton/bib/model/title.rb +18 -0
- data/lib/relaton/bib/model/uri.rb +18 -0
- data/lib/relaton/bib/model/validity.rb +16 -0
- data/lib/relaton/bib/model/version.rb +14 -0
- data/lib/relaton/bib/model/workgroup.rb +20 -0
- data/lib/relaton/bib/parser/rfc_address.rb +60 -0
- data/lib/relaton/bib/parser/rfc_contacts.rb +35 -0
- data/lib/relaton/bib/parser/rfc_docidentifier.rb +70 -0
- data/lib/relaton/bib/parser/rfc_organization.rb +31 -0
- data/lib/relaton/bib/parser/rfc_person.rb +42 -0
- data/lib/relaton/bib/parser/rfc_reference.rb +143 -0
- data/lib/relaton/bib/parser/rfc_referencegroup.rb +45 -0
- data/lib/relaton/bib/parser/rfc_shared.rb +23 -0
- data/lib/relaton/bib/renderer/bibtex_builder.rb +348 -0
- data/lib/relaton/bib/renderer/rfc.rb +297 -0
- data/lib/relaton/bib/util.rb +18 -0
- data/lib/relaton/bib/version.rb +5 -0
- data/lib/{relaton_bib.rb → relaton/bib.rb} +47 -36
- data/lib/{relaton_bib → relaton}/bibtex_parser.rb +24 -27
- data/lib/{relaton_bib → relaton}/bibxml_parser.rb +43 -46
- data/lib/{relaton_bib → relaton}/hit.rb +3 -3
- data/lib/{relaton_bib → relaton}/hit_collection.rb +2 -2
- data/lib/{relaton_bib → relaton}/workers_pool.rb +1 -1
- data/lib/{relaton_bib → relaton}/xml_parser.rb +49 -51
- data/relaton-bib.gemspec +8 -8
- metadata +95 -74
- data/lib/relaton_bib/bib_item_locality.rb +0 -175
- data/lib/relaton_bib/biblio_note.rb +0 -72
- data/lib/relaton_bib/biblio_version.rb +0 -46
- data/lib/relaton_bib/bibliographic_date.rb +0 -119
- data/lib/relaton_bib/bibliographic_item.rb +0 -668
- data/lib/relaton_bib/bibliographic_size.rb +0 -103
- data/lib/relaton_bib/classification.rb +0 -40
- data/lib/relaton_bib/config.rb +0 -16
- data/lib/relaton_bib/contribution_info.rb +0 -117
- data/lib/relaton_bib/contributor.rb +0 -277
- data/lib/relaton_bib/copyright_association.rb +0 -79
- data/lib/relaton_bib/document_identifier.rb +0 -118
- data/lib/relaton_bib/document_relation.rb +0 -95
- data/lib/relaton_bib/document_relation_collection.rb +0 -57
- data/lib/relaton_bib/document_status.rb +0 -92
- data/lib/relaton_bib/document_type.rb +0 -52
- data/lib/relaton_bib/edition.rb +0 -55
- data/lib/relaton_bib/editorial_group.rb +0 -41
- data/lib/relaton_bib/extent.rb +0 -39
- data/lib/relaton_bib/forename.rb +0 -65
- data/lib/relaton_bib/formatted_ref.rb +0 -17
- data/lib/relaton_bib/formatted_string.rb +0 -133
- data/lib/relaton_bib/full_name.rb +0 -108
- data/lib/relaton_bib/hash_converter.rb +0 -568
- data/lib/relaton_bib/ics.rb +0 -42
- data/lib/relaton_bib/image.rb +0 -95
- data/lib/relaton_bib/localized_string.rb +0 -149
- data/lib/relaton_bib/medium.rb +0 -76
- data/lib/relaton_bib/organization.rb +0 -165
- data/lib/relaton_bib/person.rb +0 -129
- data/lib/relaton_bib/place.rb +0 -203
- data/lib/relaton_bib/renderer/bibtex_builder.rb +0 -312
- data/lib/relaton_bib/renderer/bibxml.rb +0 -296
- data/lib/relaton_bib/series.rb +0 -119
- data/lib/relaton_bib/structured_identifier.rb +0 -173
- data/lib/relaton_bib/technical_committee.rb +0 -34
- data/lib/relaton_bib/typed_title_string.rb +0 -191
- data/lib/relaton_bib/typed_uri.rb +0 -57
- data/lib/relaton_bib/util.rb +0 -16
- data/lib/relaton_bib/validity.rb +0 -52
- data/lib/relaton_bib/version.rb +0 -3
- data/lib/relaton_bib/workgroup.rb +0 -58
- /data/lib/{relaton_bib → relaton}/deep_dup.rb +0 -0
data/grammars/biblio-standoc.rng
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
2
|
+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
4
|
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
5
|
of relaton
|
@@ -9,19 +9,23 @@
|
|
9
9
|
-->
|
10
10
|
<include href="biblio.rng">
|
11
11
|
<define name="BibData">
|
12
|
+
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
12
13
|
<ref name="StandardBibliographicItem"/>
|
13
14
|
<optional>
|
14
|
-
<ref name="ext"
|
15
|
+
<ref name="ext">
|
16
|
+
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
17
|
+
</ref>
|
15
18
|
</optional>
|
16
19
|
</define>
|
17
20
|
<define name="docrelation">
|
21
|
+
<a:documentation>Update to StandardReducedBibliographicItem</a:documentation>
|
18
22
|
<element name="relation">
|
19
23
|
<attribute name="type">
|
20
24
|
<ref name="DocRelationType"/>
|
21
25
|
</attribute>
|
22
26
|
<optional>
|
23
27
|
<element name="description">
|
24
|
-
<ref name="
|
28
|
+
<ref name="LocalizedMarkedUpString"/>
|
25
29
|
</element>
|
26
30
|
</optional>
|
27
31
|
<element name="bibitem">
|
@@ -47,34 +51,58 @@
|
|
47
51
|
</define>
|
48
52
|
</include>
|
49
53
|
<define name="ext">
|
54
|
+
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
50
55
|
<element name="ext">
|
51
56
|
<ref name="BibDataExtensionType"/>
|
52
57
|
</element>
|
53
58
|
</define>
|
54
59
|
<define name="BibDataExtensionType">
|
55
60
|
<optional>
|
56
|
-
<attribute name="schema-version"
|
61
|
+
<attribute name="schema-version">
|
62
|
+
<a:documentation>The version of the flavour-specific schema that this extension point conforms to</a:documentation>
|
63
|
+
</attribute>
|
57
64
|
</optional>
|
58
|
-
<ref name="doctype"
|
65
|
+
<ref name="doctype">
|
66
|
+
<a:documentation>Classification of the standardisation document that is treated as a distinct series by the
|
67
|
+
standards defining organization, and that is rendered in a distinct manner</a:documentation>
|
68
|
+
</ref>
|
59
69
|
<optional>
|
60
|
-
<ref name="docsubtype"
|
70
|
+
<ref name="docsubtype">
|
71
|
+
<a:documentation>Subclass of the standardisation document, that is treated or processed differently
|
72
|
+
from other documents in the same doctype</a:documentation>
|
73
|
+
</ref>
|
61
74
|
</optional>
|
75
|
+
<ref name="flavor">
|
76
|
+
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
77
|
+
</ref>
|
62
78
|
<optional>
|
63
|
-
<ref name="editorialgroup"
|
79
|
+
<ref name="editorialgroup">
|
80
|
+
<a:documentation>Groups associated with the production of the standards document, typically within
|
81
|
+
a standards definition organization</a:documentation>
|
82
|
+
</ref>
|
64
83
|
</optional>
|
65
84
|
<zeroOrMore>
|
66
|
-
<ref name="ics"
|
85
|
+
<ref name="ics">
|
86
|
+
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
87
|
+
</ref>
|
67
88
|
</zeroOrMore>
|
68
89
|
<zeroOrMore>
|
69
|
-
<ref name="structuredidentifier"
|
90
|
+
<ref name="structuredidentifier">
|
91
|
+
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
92
|
+
</ref>
|
70
93
|
</zeroOrMore>
|
71
94
|
</define>
|
72
95
|
<define name="doctype">
|
96
|
+
<a:documentation>Classification of the standardisation document</a:documentation>
|
73
97
|
<element name="doctype">
|
74
98
|
<optional>
|
75
|
-
<attribute name="abbreviation"
|
99
|
+
<attribute name="abbreviation">
|
100
|
+
<a:documentation>Standard abbreviation for the doctype value used by the standards defining organization</a:documentation>
|
101
|
+
</attribute>
|
76
102
|
</optional>
|
77
|
-
<ref name="DocumentType"
|
103
|
+
<ref name="DocumentType">
|
104
|
+
<a:documentation>Name of the doctype</a:documentation>
|
105
|
+
</ref>
|
78
106
|
</element>
|
79
107
|
</define>
|
80
108
|
<define name="DocumentType">
|
@@ -88,105 +116,153 @@
|
|
88
116
|
<define name="DocumentSubtype">
|
89
117
|
<text/>
|
90
118
|
</define>
|
119
|
+
<define name="flavor">
|
120
|
+
<element name="flavor">
|
121
|
+
<ref name="MetanormaFlavor"/>
|
122
|
+
</element>
|
123
|
+
</define>
|
124
|
+
<define name="MetanormaFlavor">
|
125
|
+
<a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
|
126
|
+
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
127
|
+
<text/>
|
128
|
+
</define>
|
91
129
|
<define name="editorialgroup">
|
130
|
+
<a:documentation>A group associated with the production of the standards document, typically within
|
131
|
+
a standards definition organization</a:documentation>
|
92
132
|
<element name="editorialgroup">
|
93
133
|
<oneOrMore>
|
94
|
-
<ref name="technical-committee"
|
134
|
+
<ref name="technical-committee">
|
135
|
+
<a:documentation>A technical committee associated with the production of the standards document</a:documentation>
|
136
|
+
</ref>
|
95
137
|
</oneOrMore>
|
96
138
|
</element>
|
97
139
|
</define>
|
98
140
|
<define name="technical-committee">
|
141
|
+
<a:documentation>Technical committee associated with the production of a standards document</a:documentation>
|
99
142
|
<element name="technical-committee">
|
100
143
|
<ref name="IsoWorkgroup"/>
|
101
144
|
</element>
|
102
145
|
</define>
|
103
146
|
<define name="IsoWorkgroup">
|
104
147
|
<optional>
|
105
|
-
<attribute name="number"
|
148
|
+
<attribute name="number">
|
149
|
+
<a:documentation>Numeric identifier of the technical committee</a:documentation>
|
150
|
+
</attribute>
|
106
151
|
</optional>
|
107
152
|
<optional>
|
108
|
-
<attribute name="type"
|
153
|
+
<attribute name="type">
|
154
|
+
<a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
|
155
|
+
</attribute>
|
109
156
|
</optional>
|
110
157
|
<optional>
|
111
|
-
<attribute name="identifier"
|
158
|
+
<attribute name="identifier">
|
159
|
+
<a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
|
160
|
+
</attribute>
|
112
161
|
</optional>
|
113
162
|
<optional>
|
114
|
-
<attribute name="prefix"
|
163
|
+
<attribute name="prefix">
|
164
|
+
<a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
|
165
|
+
typically indicating its type</a:documentation>
|
166
|
+
</attribute>
|
115
167
|
</optional>
|
116
|
-
<text
|
168
|
+
<text>
|
169
|
+
<a:documentation>Name of the technical committee</a:documentation>
|
170
|
+
</text>
|
117
171
|
</define>
|
118
172
|
<define name="ics">
|
173
|
+
<a:documentation>Classification taken from the International Classification of Standards.
|
174
|
+
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
119
175
|
<element name="ics">
|
120
176
|
<element name="code">
|
177
|
+
<a:documentation>Classification code taken from the ICS</a:documentation>
|
121
178
|
<text/>
|
122
179
|
</element>
|
123
180
|
<optional>
|
124
181
|
<element name="text">
|
182
|
+
<a:documentation>Text string associated with the classification code</a:documentation>
|
125
183
|
<text/>
|
126
184
|
</element>
|
127
185
|
</optional>
|
128
186
|
</element>
|
129
187
|
</define>
|
130
188
|
<define name="structuredidentifier">
|
189
|
+
<a:documentation>Representation of the identifier for a standardisation document, giving its individual semantic components</a:documentation>
|
131
190
|
<element name="structuredidentifier">
|
132
191
|
<optional>
|
133
|
-
<attribute name="type"
|
192
|
+
<attribute name="type">
|
193
|
+
<a:documentation>Representation in the identifier of the type of standard document, corresponds to bibitem/ext/doctype</a:documentation>
|
194
|
+
</attribute>
|
134
195
|
</optional>
|
135
196
|
<oneOrMore>
|
136
197
|
<element name="agency">
|
198
|
+
<a:documentation>Representation in the identifier of the agency responsible for the standard document</a:documentation>
|
137
199
|
<text/>
|
138
200
|
</element>
|
139
201
|
</oneOrMore>
|
140
202
|
<optional>
|
141
203
|
<element name="class">
|
204
|
+
<a:documentation>Representation in the identifier of the class of standard document (as a subclass of the document type),
|
205
|
+
corresponds to bibitem/item/docsubtype</a:documentation>
|
142
206
|
<text/>
|
143
207
|
</element>
|
144
208
|
</optional>
|
145
209
|
<element name="docnumber">
|
210
|
+
<a:documentation>Representation in the identifier of the (typically numeric) component uniquely identifying the document
|
211
|
+
or standard. If a document includes parts or supplements, the docnumber identifies the document as whole,
|
212
|
+
and not those document components</a:documentation>
|
146
213
|
<text/>
|
147
214
|
</element>
|
148
215
|
<optional>
|
149
216
|
<element name="partnumber">
|
217
|
+
<a:documentation>Representation in the identifier of the document part, if this is a document part. May be compound</a:documentation>
|
150
218
|
<text/>
|
151
219
|
</element>
|
152
220
|
</optional>
|
153
221
|
<optional>
|
154
222
|
<element name="edition">
|
223
|
+
<a:documentation>Representation in the identifier of the document edition, if this is a published document</a:documentation>
|
155
224
|
<text/>
|
156
225
|
</element>
|
157
226
|
</optional>
|
158
227
|
<optional>
|
159
228
|
<element name="version">
|
229
|
+
<a:documentation>Representation in the identifier of the document version, which can include document drafts</a:documentation>
|
160
230
|
<text/>
|
161
231
|
</element>
|
162
232
|
</optional>
|
163
233
|
<optional>
|
164
234
|
<element name="supplementtype">
|
235
|
+
<a:documentation>Representation in the identifier of the type of document supplement, if this is a document supplement</a:documentation>
|
165
236
|
<text/>
|
166
237
|
</element>
|
167
238
|
</optional>
|
168
239
|
<optional>
|
169
240
|
<element name="supplementnumber">
|
241
|
+
<a:documentation>Representation in the identifier of the document supplement, if this is a document supplement</a:documentation>
|
170
242
|
<text/>
|
171
243
|
</element>
|
172
244
|
</optional>
|
173
245
|
<optional>
|
174
246
|
<element name="amendment">
|
247
|
+
<a:documentation>Representation in the identifier of the document amendment, if this is a document amendment</a:documentation>
|
175
248
|
<text/>
|
176
249
|
</element>
|
177
250
|
</optional>
|
178
251
|
<optional>
|
179
252
|
<element name="corrigendum">
|
253
|
+
<a:documentation>Representation in the identifier of the document corrigendum, if this is a document corrigendum</a:documentation>
|
180
254
|
<text/>
|
181
255
|
</element>
|
182
256
|
</optional>
|
183
257
|
<optional>
|
184
258
|
<element name="language">
|
259
|
+
<a:documentation>Representation in the identifier of the language of the document</a:documentation>
|
185
260
|
<text/>
|
186
261
|
</element>
|
187
262
|
</optional>
|
188
263
|
<optional>
|
189
264
|
<element name="year">
|
265
|
+
<a:documentation>Representation in the identifier of the year of publication or issuance of the document</a:documentation>
|
190
266
|
<text/>
|
191
267
|
</element>
|
192
268
|
</optional>
|
@@ -195,13 +271,17 @@
|
|
195
271
|
<define name="StandardBibliographicItem">
|
196
272
|
<ref name="BibliographicItem"/>
|
197
273
|
<zeroOrMore>
|
198
|
-
<ref name="amend"
|
274
|
+
<ref name="amend">
|
275
|
+
<a:documentation>Description of changes specific to this document</a:documentation>
|
276
|
+
</ref>
|
199
277
|
</zeroOrMore>
|
200
278
|
</define>
|
201
279
|
<define name="StandardReducedBibliographicItem">
|
202
280
|
<ref name="ReducedBibliographicItem"/>
|
203
281
|
<zeroOrMore>
|
204
|
-
<ref name="amend"
|
282
|
+
<ref name="amend">
|
283
|
+
<a:documentation>Description of changes specific to this document</a:documentation>
|
284
|
+
</ref>
|
205
285
|
</zeroOrMore>
|
206
286
|
</define>
|
207
287
|
</grammar>
|