relaton-gb 2.0.0.pre.alpha.1 → 2.0.0.pre.alpha.2

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
2
  SHA256:
3
- metadata.gz: bc45456d59ae3857a4161bcf3ecff02c96a35e6919b53f1a7d2b4d7d386ddcd1
4
- data.tar.gz: df75a3aa8d81d04a4a1f8f80f38346202eb38bf4b5b5ea1a0681b896e66571e3
3
+ metadata.gz: 1b120cebe494766b26bb882d0b0ea16adc56c3ac35b02c57425ea6af994d8ad1
4
+ data.tar.gz: 19f0ce8e61e8110ab1e73bd6a6d04cfc9ced139443321360110c9f6688432cd8
5
5
  SHA512:
6
- metadata.gz: 9c54eb6f16e435a14f387714c5bfc048a929e859c31f915dde57318cb7c49887dd2340d0646051f51ef2df97281530550c1863ddb4b5eefa838e216a5cf3edf7
7
- data.tar.gz: 0f529d1464a0317358c5e4c632b6f5f7517e8667110b6102992ebb83d3908c6f521fe6cb7eaabefa165695890ecacf85fc1250f08cd02f39ef038ce9d6c7d5bf
6
+ metadata.gz: 8c5a8bfd2c7b2862ad026c046056d210283565213b6f9dcdfc6957ec85868eb0529dd0f1a5155d2647073bff667e80d971a9889b60bf90cd55757d7d57b20dfb
7
+ data.tar.gz: 13e570342c2efb011eb2ff71f0f0fb56916d4a73b5037a5c7f53012a8fb284234b83e7a804def400b3c05d6e6f6aa7f34a4405605ec720e6546651cc3d7024d6
data/README.adoc CHANGED
@@ -128,7 +128,7 @@ Relaton::Gb::Item.from_yaml File.read('spec/fixtures/item.yaml')
128
128
  [source,ruby]
129
129
  ----
130
130
  hit_collection.first.item.to_xml
131
- => "<bibitem id="GBT202232006" type="standard" schema-version="v1.4.1">
131
+ => "<bibitem id="GBT202232006" type="standard" schema-version="v1.5.6">
132
132
  <fetched>2026-01-26</fetched>
133
133
  <title language="zh" script="Hans" type="title-main">棉短绒</title>
134
134
  <title language="zh" script="Hans" type="main">棉短绒</title>
@@ -145,7 +145,7 @@ With `bibdata: true` option XML output is wrapped with `bibdata` element and `ex
145
145
  [source,ruby]
146
146
  ----
147
147
  hit_collection.first.item.to_xml bibdata: true
148
- => "<bibdata type="standard" schema-version="v1.4.1">
148
+ => "<bibdata type="standard" schema-version="v1.5.6">
149
149
  <fetched>2026-01-26</fetched>
150
150
  <title language="zh" script="Hans" type="title-main">棉短绒</title>
151
151
  <title language="zh" script="Hans" type="main">棉短绒</title>
@@ -154,7 +154,7 @@ hit_collection.first.item.to_xml bibdata: true
154
154
  <uri type="src">http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=083B48FA72DBD3B9BDE74507BC31736A</uri>
155
155
  <docidentifier type="Chinese Standard" primary="true">GB/T 20223-2006</docidentifier>
156
156
  ...
157
- <ext schema-version="v1.0.0">
157
+ <ext schema-version="v1.1.2">
158
158
  <doctype>standard</doctype>
159
159
  ...
160
160
  </ext>
@@ -187,6 +187,15 @@ Applicable to modify and delete</a:documentation>
187
187
  <a:documentation>Optional caption of this block</a:documentation>
188
188
  </attribute>
189
189
  </optional>
190
+ <optional>
191
+ <attribute name="position">
192
+ <a:documentation>For an "add" change, whether the change is added before or after the location</a:documentation>
193
+ <choice>
194
+ <value>before</value>
195
+ <value>after</value>
196
+ </choice>
197
+ </attribute>
198
+ </optional>
190
199
  <optional>
191
200
  <element name="location">
192
201
  <a:documentation>The location(s) in the original document which have undergone the change described in this block</a:documentation>
@@ -208,11 +217,15 @@ Applicable to modify and delete</a:documentation>
208
217
  </zeroOrMore>
209
218
  <optional>
210
219
  <element name="newcontent">
211
- <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
220
+ <a:documentation>New content to be added to the document; applicable to add and modify.
221
+ Can be blocks and/or sections</a:documentation>
212
222
  <ref name="OptionalId"/>
213
223
  <zeroOrMore>
214
224
  <ref name="BasicBlock"/>
215
225
  </zeroOrMore>
226
+ <zeroOrMore>
227
+ <ref name="section"/>
228
+ </zeroOrMore>
216
229
  </element>
217
230
  </optional>
218
231
  <zeroOrMore>
data/grammars/biblio.rng CHANGED
@@ -466,11 +466,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
466
466
  <a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
467
467
  </ref>
468
468
  </optional>
469
- <optional>
469
+ <zeroOrMore>
470
470
  <ref name="logo">
471
471
  <a:documentation>A logo for the organization</a:documentation>
472
472
  </ref>
473
- </optional>
473
+ </zeroOrMore>
474
474
  </define>
475
475
  <define name="orgname">
476
476
  <element name="name">
@@ -502,6 +502,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
502
502
  </define>
503
503
  <define name="logo">
504
504
  <element name="logo">
505
+ <optional>
506
+ <attribute name="type">
507
+ <a:documentation>The type of logo</a:documentation>
508
+ </attribute>
509
+ </optional>
505
510
  <ref name="image-no-id"/>
506
511
  </element>
507
512
  </define>
@@ -513,6 +518,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
513
518
  <a:documentation>Description of what is being depicted</a:documentation>
514
519
  </attribute>
515
520
  </optional>
521
+ <optional>
522
+ <attribute name="type">
523
+ <a:documentation>Description of what kind of depiction this</a:documentation>
524
+ </attribute>
525
+ </optional>
516
526
  <zeroOrMore>
517
527
  <ref name="image-no-id">
518
528
  <a:documentation>A visual depiction of the bibliographic item</a:documentation>
@@ -690,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
690
700
  <define name="CitationType">
691
701
  <attribute name="bibitemid">
692
702
  <a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
693
- <data type="IDREF"/>
703
+ <ref name="IdRefType"/>
694
704
  </attribute>
695
705
  <choice>
696
706
  <zeroOrMore>
@@ -1132,11 +1142,11 @@ NOTE: This should preferably be encoded as a URI or short identifier, rather th
1132
1142
  <a:documentation>Information about how long the current description of the bibliographic item is valid for</a:documentation>
1133
1143
  </ref>
1134
1144
  </optional>
1135
- <optional>
1145
+ <zeroOrMore>
1136
1146
  <ref name="depiction">
1137
1147
  <a:documentation>Depiction of the bibliographic item, typically an image</a:documentation>
1138
1148
  </ref>
1139
- </optional>
1149
+ </zeroOrMore>
1140
1150
  </define>
1141
1151
  <define name="ReducedBibliographicItem">
1142
1152
  <a:documentation>Reduced description of a bibliographic resource, without mandatory title and docidentifier, used for document relations
@@ -1236,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
1236
1246
  <optional>
1237
1247
  <ref name="validity"/>
1238
1248
  </optional>
1239
- <optional>
1249
+ <zeroOrMore>
1240
1250
  <ref name="depiction"/>
1241
- </optional>
1251
+ </zeroOrMore>
1242
1252
  </define>
1243
1253
  <define name="btitle">
1244
1254
  <a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
@@ -1296,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
1296
1306
  </define>
1297
1307
  <define name="validityBegins">
1298
1308
  <element name="validityBegins">
1299
- <ref name="ISO8601Date"/>
1309
+ <ref name="ISO8601DateTime"/>
1300
1310
  </element>
1301
1311
  </define>
1302
1312
  <define name="validityEnds">
1303
1313
  <element name="validityEnds">
1304
- <ref name="ISO8601Date"/>
1314
+ <ref name="ISO8601DateTime"/>
1305
1315
  </element>
1306
1316
  </define>
1307
1317
  <define name="validityRevision">
1308
1318
  <element name="revision">
1309
- <ref name="ISO8601Date"/>
1319
+ <ref name="ISO8601DateTime"/>
1310
1320
  </element>
1311
1321
  </define>
1312
1322
  <define name="TypedTitleString">
@@ -1929,10 +1939,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1929
1939
  <value>hasAnnotation</value>
1930
1940
  <value>draftOf</value>
1931
1941
  <value>hasDraft</value>
1932
- <value>preliminaryDraftOf</value>
1933
- <value>hasPreliminaryDraft</value>
1934
- <value>revisionDraftOf</value>
1935
- <value>hasRevisionDraft</value>
1942
+ <value>predecessorDraftOf</value>
1943
+ <value>hasPredecessorDraft</value>
1944
+ <value>successorDraftOf</value>
1945
+ <value>hasSuccessorDraft</value>
1936
1946
  <value>editionOf</value>
1937
1947
  <value>hasEdition</value>
1938
1948
  <value>updates</value>
@@ -2053,13 +2063,13 @@ provided that it is not the entire bibliographic item that is so related</a:docu
2053
2063
  <ref name="LocalizedString"/>
2054
2064
  </element>
2055
2065
  </optional>
2056
- <oneOrMore>
2066
+ <zeroOrMore>
2057
2067
  <element name="taxon">
2058
2068
  <a:documentation>The keywords as a hierarchical taxonomy. For example, the sequence of `taxon` elements
2059
2069
  `pump`, `centrifugal pump`, `line shaft pump` represents a taxonomic classification</a:documentation>
2060
2070
  <ref name="LocalizedString"/>
2061
2071
  </element>
2062
- </oneOrMore>
2072
+ </zeroOrMore>
2063
2073
  <zeroOrMore>
2064
2074
  <ref name="vocabid">
2065
2075
  <a:documentation>Identifiers for the keyword as a controlled vocabulary</a:documentation>
@@ -1,31 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
3
  <include href="biblio-standoc.rng">
4
- <define name="BibDataExtensionType">
5
- <optional>
6
- <attribute name="schema-version"/>
7
- </optional>
8
- <optional>
9
- <ref name="doctype"/>
10
- </optional>
11
- <optional>
12
- <ref name="docsubtype"/>
13
- </optional>
14
- <zeroOrMore>
15
- <ref name="ics"/>
16
- </zeroOrMore>
17
- <ref name="structuredidentifier"/>
18
- <optional>
19
- <ref name="stagename"/>
20
- </optional>
21
- <ref name="gbtype"/>
22
- <oneOrMore>
23
- <ref name="gbccs"/>
24
- </oneOrMore>
25
- <optional>
26
- <ref name="gbplannumber"/>
27
- </optional>
28
- </define>
29
4
  <define name="bdate">
30
5
  <element name="date">
31
6
  <attribute name="type">
@@ -83,6 +58,18 @@
83
58
  </element>
84
59
  </define>
85
60
  </include>
61
+ <define name="BibDataExtensionType" combine="interleave">
62
+ <optional>
63
+ <ref name="stagename"/>
64
+ </optional>
65
+ <ref name="gbtype"/>
66
+ <oneOrMore>
67
+ <ref name="gbccs"/>
68
+ </oneOrMore>
69
+ <optional>
70
+ <ref name="gbplannumber"/>
71
+ </optional>
72
+ </define>
86
73
  <define name="updates_document_type">
87
74
  <element name="updates-document-type">
88
75
  <ref name="DocumentType"/>
@@ -7,12 +7,11 @@ require_relative "ccs"
7
7
 
8
8
  module Relaton
9
9
  module Gb
10
- class Ext < Lutaml::Model::Serializable
10
+ class Ext < Bib::Ext
11
11
  attribute :schema_version, method: :get_schema_version
12
12
  attribute :doctype, Doctype
13
13
  attribute :subdoctype, :string, values: %w[specification method-of-test vocabulary code-of-practice]
14
14
  # attribute :gbcommittee, Committee, collection: true
15
- attribute :ics, Bib::ICS, collection: true
16
15
  attribute :structuredidentifier, StructuredIdentifier
17
16
  attribute :stagename, StageName
18
17
  attribute :gbtype, GbType
@@ -20,12 +19,7 @@ module Relaton
20
19
  attribute :plannumber, :string
21
20
 
22
21
  xml do
23
- map_attribute "schema-version", to: :schema_version
24
- map_element "doctype", to: :doctype
25
- map_element "subdoctype", to: :subdoctype
26
22
  # map_element "gbcommittee", to: :gbcommittee
27
- map_element "ics", to: :ics
28
- map_element "structuredidentifier", to: :structuredidentifier
29
23
  map_element "stagename", to: :stagename
30
24
  map_element "gbtype", to: :gbtype
31
25
  map_element "ccs", to: :ccs
@@ -162,6 +162,7 @@ module Relaton
162
162
  Ext.new(
163
163
  doctype: get_type,
164
164
  gbtype: get_gbtype(doc, docref),
165
+ flavor: "gb",
165
166
  # gbcommittee: get_committee(doc, docref),
166
167
  ccs: get_ccs(doc),
167
168
  ics: get_ics(doc),
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Gb
3
- VERSION = "2.0.0-alpha.1".freeze
3
+ VERSION = "2.0.0-alpha.2".freeze
4
4
  end
5
5
  end
data/relaton_gb.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_dependency "cnccs", "~> 0.1.1"
28
28
  spec.add_dependency "gb-agencies", "~> 0.0.1"
29
29
  spec.add_dependency "mechanize", "~> 2.10"
30
- spec.add_dependency "relaton-core", "~> 0.0.9"
31
- spec.add_dependency "relaton-iso", "~> 2.0.0-alpha.2"
30
+ spec.add_dependency "relaton-core", "~> 0.0.13"
31
+ spec.add_dependency "relaton-iso", "~> 2.0.0-alpha.7"
32
32
  spec.add_dependency "csv", "~> 3.0"
33
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.1
4
+ version: 2.0.0.pre.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -57,28 +57,28 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 0.0.9
60
+ version: 0.0.13
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 0.0.9
67
+ version: 0.0.13
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: relaton-iso
70
70
  requirement: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 2.0.0.pre.alpha.2
74
+ version: 2.0.0.pre.alpha.7
75
75
  type: :runtime
76
76
  prerelease: false
77
77
  version_requirements: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 2.0.0.pre.alpha.2
81
+ version: 2.0.0.pre.alpha.7
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: csv
84
84
  requirement: !ruby/object:Gem::Requirement