relaton-bib 1.20.8 → 2.0.0
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/.gitignore +3 -1
- data/.rubocop.yml +1 -1
- data/CLAUDE.md +96 -0
- data/Gemfile +1 -4
- data/README.adoc +195 -154
- data/bin/console +1 -1
- data/grammars/basicdoc.rng +1572 -671
- data/grammars/biblio-standoc.rng +107 -46
- data/grammars/biblio.rng +1012 -377
- data/grammars/versions.json +26 -26
- data/lib/relaton/bib/converter/asciibib/to_asciibib.rb +663 -0
- data/lib/relaton/bib/converter/asciibib.rb +13 -0
- data/lib/relaton/bib/converter/bibtex/from_bibtex.rb +245 -0
- data/lib/relaton/bib/converter/bibtex/to_bibtex.rb +341 -0
- data/lib/relaton/bib/converter/bibtex.rb +23 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml.rb +383 -0
- data/lib/relaton/bib/converter/bibxml/from_rfcxml_referencegroup.rb +71 -0
- data/lib/relaton/bib/converter/bibxml/to_rfcxml.rb +305 -0
- data/lib/relaton/bib/converter/bibxml/to_rfcxml_referencegroup.rb +52 -0
- data/lib/relaton/bib/converter/bibxml.rb +51 -0
- data/lib/relaton/bib/hash_parser_v1.rb +754 -0
- data/lib/relaton/bib/item_data.rb +229 -0
- data/lib/relaton/bib/model/abstract.rb +16 -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 +31 -0
- data/lib/relaton/bib/model/depiction.rb +16 -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/ext.rb +26 -0
- data/lib/relaton/bib/model/extent.rb +16 -0
- data/lib/relaton/bib/model/formattedref.rb +43 -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 +23 -0
- data/lib/relaton/bib/model/image.rb +28 -0
- data/lib/relaton/bib/model/item.rb +137 -0
- data/lib/relaton/bib/model/item_base.rb +27 -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 +14 -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 +34 -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 +16 -0
- data/lib/relaton/bib/model/title.rb +56 -0
- data/lib/relaton/bib/model/type/string_date.rb +48 -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/namespace_helper.rb +21 -0
- data/lib/relaton/bib/util.rb +18 -0
- data/lib/relaton/bib/version.rb +5 -0
- data/lib/relaton/bib.rb +45 -0
- data/relaton-bib.gemspec +11 -8
- metadata +125 -67
- 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/bibtex_parser.rb +0 -246
- data/lib/relaton_bib/bibxml_parser.rb +0 -422
- 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/deep_dup.rb +0 -30
- 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/hit.rb +0 -52
- data/lib/relaton_bib/hit_collection.rb +0 -105
- 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/workers_pool.rb +0 -43
- data/lib/relaton_bib/workgroup.rb +0 -58
- data/lib/relaton_bib/xml_parser.rb +0 -718
- data/lib/relaton_bib.rb +0 -111
data/grammars/biblio-standoc.rng
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
|
3
|
-
<!--
|
|
4
|
-
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
|
5
|
-
of relaton
|
|
6
|
-
|
|
7
|
-
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
|
8
|
-
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
|
9
|
-
-->
|
|
2
|
+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
|
10
3
|
<include href="biblio.rng">
|
|
4
|
+
<!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
|
|
5
|
+
<!--
|
|
6
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
|
7
|
+
of relaton
|
|
8
|
+
|
|
9
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
|
10
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
|
11
|
+
-->
|
|
11
12
|
<define name="BibData">
|
|
13
|
+
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
|
12
14
|
<ref name="StandardBibliographicItem"/>
|
|
13
15
|
<optional>
|
|
14
|
-
<ref name="ext"
|
|
16
|
+
<ref name="ext">
|
|
17
|
+
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
|
18
|
+
</ref>
|
|
15
19
|
</optional>
|
|
16
20
|
</define>
|
|
17
21
|
<define name="docrelation">
|
|
22
|
+
<a:documentation>Update to StandardReducedBibliographicItem</a:documentation>
|
|
18
23
|
<element name="relation">
|
|
19
24
|
<attribute name="type">
|
|
20
25
|
<ref name="DocRelationType"/>
|
|
21
26
|
</attribute>
|
|
22
27
|
<optional>
|
|
23
28
|
<element name="description">
|
|
24
|
-
<ref name="
|
|
29
|
+
<ref name="LocalizedMarkedUpString"/>
|
|
25
30
|
</element>
|
|
26
31
|
</optional>
|
|
27
32
|
<element name="bibitem">
|
|
@@ -47,34 +52,55 @@
|
|
|
47
52
|
</define>
|
|
48
53
|
</include>
|
|
49
54
|
<define name="ext">
|
|
55
|
+
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
|
50
56
|
<element name="ext">
|
|
51
57
|
<ref name="BibDataExtensionType"/>
|
|
52
58
|
</element>
|
|
53
59
|
</define>
|
|
54
60
|
<define name="BibDataExtensionType">
|
|
55
61
|
<optional>
|
|
56
|
-
<attribute name="schema-version"
|
|
62
|
+
<attribute name="schema-version">
|
|
63
|
+
<a:documentation>The version of the flavour-specific schema that this extension point conforms to</a:documentation>
|
|
64
|
+
</attribute>
|
|
57
65
|
</optional>
|
|
58
|
-
<ref name="doctype"
|
|
66
|
+
<ref name="doctype">
|
|
67
|
+
<a:documentation>Classification of the standardisation document that is treated as a distinct series by the
|
|
68
|
+
standards defining organization, and that is rendered in a distinct manner</a:documentation>
|
|
69
|
+
</ref>
|
|
59
70
|
<optional>
|
|
60
|
-
<ref name="docsubtype"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
71
|
+
<ref name="docsubtype">
|
|
72
|
+
<a:documentation>Subclass of the standardisation document, that is treated or processed differently
|
|
73
|
+
from other documents in the same doctype</a:documentation>
|
|
74
|
+
</ref>
|
|
64
75
|
</optional>
|
|
76
|
+
<ref name="flavor">
|
|
77
|
+
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
|
78
|
+
</ref>
|
|
65
79
|
<zeroOrMore>
|
|
66
|
-
<ref name="ics"
|
|
80
|
+
<ref name="ics">
|
|
81
|
+
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
|
82
|
+
</ref>
|
|
67
83
|
</zeroOrMore>
|
|
68
84
|
<zeroOrMore>
|
|
69
|
-
<ref name="structuredidentifier"
|
|
85
|
+
<ref name="structuredidentifier">
|
|
86
|
+
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
|
87
|
+
</ref>
|
|
70
88
|
</zeroOrMore>
|
|
89
|
+
<ref name="DocumentImages">
|
|
90
|
+
<a:documentation>Coverpage and other images to be rendered with document</a:documentation>
|
|
91
|
+
</ref>
|
|
71
92
|
</define>
|
|
72
93
|
<define name="doctype">
|
|
94
|
+
<a:documentation>Classification of the standardisation document</a:documentation>
|
|
73
95
|
<element name="doctype">
|
|
74
96
|
<optional>
|
|
75
|
-
<attribute name="abbreviation"
|
|
97
|
+
<attribute name="abbreviation">
|
|
98
|
+
<a:documentation>Standard abbreviation for the doctype value used by the standards defining organization</a:documentation>
|
|
99
|
+
</attribute>
|
|
76
100
|
</optional>
|
|
77
|
-
<ref name="DocumentType"
|
|
101
|
+
<ref name="DocumentType">
|
|
102
|
+
<a:documentation>Name of the doctype</a:documentation>
|
|
103
|
+
</ref>
|
|
78
104
|
</element>
|
|
79
105
|
</define>
|
|
80
106
|
<define name="DocumentType">
|
|
@@ -88,120 +114,155 @@
|
|
|
88
114
|
<define name="DocumentSubtype">
|
|
89
115
|
<text/>
|
|
90
116
|
</define>
|
|
91
|
-
<define name="
|
|
92
|
-
<element name="
|
|
93
|
-
<
|
|
94
|
-
<ref name="technical-committee"/>
|
|
95
|
-
</oneOrMore>
|
|
96
|
-
</element>
|
|
97
|
-
</define>
|
|
98
|
-
<define name="technical-committee">
|
|
99
|
-
<element name="technical-committee">
|
|
100
|
-
<ref name="IsoWorkgroup"/>
|
|
117
|
+
<define name="flavor">
|
|
118
|
+
<element name="flavor">
|
|
119
|
+
<ref name="MetanormaFlavor"/>
|
|
101
120
|
</element>
|
|
102
121
|
</define>
|
|
103
|
-
<define name="
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
</optional>
|
|
107
|
-
<optional>
|
|
108
|
-
<attribute name="type"/>
|
|
109
|
-
</optional>
|
|
110
|
-
<optional>
|
|
111
|
-
<attribute name="identifier"/>
|
|
112
|
-
</optional>
|
|
113
|
-
<optional>
|
|
114
|
-
<attribute name="prefix"/>
|
|
115
|
-
</optional>
|
|
122
|
+
<define name="MetanormaFlavor">
|
|
123
|
+
<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.
|
|
124
|
+
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
|
116
125
|
<text/>
|
|
117
126
|
</define>
|
|
118
127
|
<define name="ics">
|
|
128
|
+
<a:documentation>Classification taken from the International Classification of Standards.
|
|
129
|
+
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
|
119
130
|
<element name="ics">
|
|
120
131
|
<element name="code">
|
|
132
|
+
<a:documentation>Classification code taken from the ICS</a:documentation>
|
|
121
133
|
<text/>
|
|
122
134
|
</element>
|
|
123
135
|
<optional>
|
|
124
136
|
<element name="text">
|
|
137
|
+
<a:documentation>Text string associated with the classification code</a:documentation>
|
|
125
138
|
<text/>
|
|
126
139
|
</element>
|
|
127
140
|
</optional>
|
|
128
141
|
</element>
|
|
129
142
|
</define>
|
|
130
143
|
<define name="structuredidentifier">
|
|
144
|
+
<a:documentation>Representation of the identifier for a standardisation document, giving its individual semantic components</a:documentation>
|
|
131
145
|
<element name="structuredidentifier">
|
|
132
146
|
<optional>
|
|
133
|
-
<attribute name="type"
|
|
147
|
+
<attribute name="type">
|
|
148
|
+
<a:documentation>Representation in the identifier of the type of standard document, corresponds to bibitem/ext/doctype</a:documentation>
|
|
149
|
+
</attribute>
|
|
134
150
|
</optional>
|
|
135
151
|
<oneOrMore>
|
|
136
152
|
<element name="agency">
|
|
153
|
+
<a:documentation>Representation in the identifier of the agency responsible for the standard document</a:documentation>
|
|
137
154
|
<text/>
|
|
138
155
|
</element>
|
|
139
156
|
</oneOrMore>
|
|
140
157
|
<optional>
|
|
141
158
|
<element name="class">
|
|
159
|
+
<a:documentation>Representation in the identifier of the class of standard document (as a subclass of the document type),
|
|
160
|
+
corresponds to bibitem/item/docsubtype</a:documentation>
|
|
142
161
|
<text/>
|
|
143
162
|
</element>
|
|
144
163
|
</optional>
|
|
145
164
|
<element name="docnumber">
|
|
165
|
+
<a:documentation>Representation in the identifier of the (typically numeric) component uniquely identifying the document
|
|
166
|
+
or standard. If a document includes parts or supplements, the docnumber identifies the document as whole,
|
|
167
|
+
and not those document components</a:documentation>
|
|
146
168
|
<text/>
|
|
147
169
|
</element>
|
|
148
170
|
<optional>
|
|
149
171
|
<element name="partnumber">
|
|
172
|
+
<a:documentation>Representation in the identifier of the document part, if this is a document part. May be compound</a:documentation>
|
|
150
173
|
<text/>
|
|
151
174
|
</element>
|
|
152
175
|
</optional>
|
|
153
176
|
<optional>
|
|
154
177
|
<element name="edition">
|
|
178
|
+
<a:documentation>Representation in the identifier of the document edition, if this is a published document</a:documentation>
|
|
155
179
|
<text/>
|
|
156
180
|
</element>
|
|
157
181
|
</optional>
|
|
158
182
|
<optional>
|
|
159
183
|
<element name="version">
|
|
184
|
+
<a:documentation>Representation in the identifier of the document version, which can include document drafts</a:documentation>
|
|
160
185
|
<text/>
|
|
161
186
|
</element>
|
|
162
187
|
</optional>
|
|
163
188
|
<optional>
|
|
164
189
|
<element name="supplementtype">
|
|
190
|
+
<a:documentation>Representation in the identifier of the type of document supplement, if this is a document supplement</a:documentation>
|
|
165
191
|
<text/>
|
|
166
192
|
</element>
|
|
167
193
|
</optional>
|
|
168
194
|
<optional>
|
|
169
195
|
<element name="supplementnumber">
|
|
196
|
+
<a:documentation>Representation in the identifier of the document supplement, if this is a document supplement</a:documentation>
|
|
170
197
|
<text/>
|
|
171
198
|
</element>
|
|
172
199
|
</optional>
|
|
173
200
|
<optional>
|
|
174
201
|
<element name="amendment">
|
|
202
|
+
<a:documentation>Representation in the identifier of the document amendment, if this is a document amendment</a:documentation>
|
|
175
203
|
<text/>
|
|
176
204
|
</element>
|
|
177
205
|
</optional>
|
|
178
206
|
<optional>
|
|
179
207
|
<element name="corrigendum">
|
|
208
|
+
<a:documentation>Representation in the identifier of the document corrigendum, if this is a document corrigendum</a:documentation>
|
|
180
209
|
<text/>
|
|
181
210
|
</element>
|
|
182
211
|
</optional>
|
|
183
212
|
<optional>
|
|
184
213
|
<element name="language">
|
|
214
|
+
<a:documentation>Representation in the identifier of the language of the document</a:documentation>
|
|
185
215
|
<text/>
|
|
186
216
|
</element>
|
|
187
217
|
</optional>
|
|
188
218
|
<optional>
|
|
189
219
|
<element name="year">
|
|
220
|
+
<a:documentation>Representation in the identifier of the year of publication or issuance of the document</a:documentation>
|
|
190
221
|
<text/>
|
|
191
222
|
</element>
|
|
192
223
|
</optional>
|
|
193
224
|
</element>
|
|
194
225
|
</define>
|
|
226
|
+
<define name="DocumentImages">
|
|
227
|
+
<zeroOrMore>
|
|
228
|
+
<element name="coverpage-image">
|
|
229
|
+
<a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
|
|
230
|
+
<ref name="image-no-id"/>
|
|
231
|
+
</element>
|
|
232
|
+
</zeroOrMore>
|
|
233
|
+
<zeroOrMore>
|
|
234
|
+
<element name="innercoverpage-image">
|
|
235
|
+
<a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
|
|
236
|
+
<ref name="image-no-id"/>
|
|
237
|
+
</element>
|
|
238
|
+
</zeroOrMore>
|
|
239
|
+
<zeroOrMore>
|
|
240
|
+
<element name="tocside-image">
|
|
241
|
+
<a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
|
|
242
|
+
<ref name="image-no-id"/>
|
|
243
|
+
</element>
|
|
244
|
+
</zeroOrMore>
|
|
245
|
+
<zeroOrMore>
|
|
246
|
+
<element name="backpage-image">
|
|
247
|
+
<a:documentation>Images to be displayed on the backpage of the document</a:documentation>
|
|
248
|
+
<ref name="image-no-id"/>
|
|
249
|
+
</element>
|
|
250
|
+
</zeroOrMore>
|
|
251
|
+
</define>
|
|
195
252
|
<define name="StandardBibliographicItem">
|
|
196
253
|
<ref name="BibliographicItem"/>
|
|
197
254
|
<zeroOrMore>
|
|
198
|
-
<ref name="amend"
|
|
255
|
+
<ref name="amend">
|
|
256
|
+
<a:documentation>Description of changes specific to this document</a:documentation>
|
|
257
|
+
</ref>
|
|
199
258
|
</zeroOrMore>
|
|
200
259
|
</define>
|
|
201
260
|
<define name="StandardReducedBibliographicItem">
|
|
202
261
|
<ref name="ReducedBibliographicItem"/>
|
|
203
262
|
<zeroOrMore>
|
|
204
|
-
<ref name="amend"
|
|
263
|
+
<ref name="amend">
|
|
264
|
+
<a:documentation>Description of changes specific to this document</a:documentation>
|
|
265
|
+
</ref>
|
|
205
266
|
</zeroOrMore>
|
|
206
267
|
</define>
|
|
207
268
|
</grammar>
|