relaton-bipm 1.9.1 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14553012c5084d04727a4dc053691295f9dbfb1d9844ba7abeaf78de950c28ff
4
- data.tar.gz: f665d38e8f7d94f7f33787fb8a759c96579a4cfcfe943bcc5bc170b13fd0ef78
3
+ metadata.gz: 62e2b0e8e3e760434471aee77019fa507d36cab63dc64efe988723adc198c87a
4
+ data.tar.gz: 305943e857f09997c5d883967ef2bc25904ff6958bce9ccd2788199aa1b3cbee
5
5
  SHA512:
6
- metadata.gz: 8805d5051e4716d05b0e039e7433d3709d527541fd0971106974e8119e0dc07a3c17bb9544b2550d4d3aaed4aa3cefc42860d0837add025693faa89586f3c389
7
- data.tar.gz: 369846fe5052361189fe0aa63eba5459083617ad025f753b2b16bcba76d6c3a5decd65ee92cee5875101913ea56537b4a74eef3d16072263061749cf16bd557a
6
+ metadata.gz: 5ecfd3a440ccd9d40d88b93a8621e5cac30b340acccc18cad7f44fd383334f0354f3ceb7963b99b4dc4eb58ff9a397565d940dd3d1463304faa1358a0dd78967
7
+ data.tar.gz: 013f356a1d17c03058f359b7e9ce20b5338d45e90f25a9bcbc8481239acad75949b26472bf1bf654dcfae868197702f7c0337e186ca0137a108683e18b8cadf9
data/.rubocop.yml CHANGED
@@ -2,6 +2,8 @@
2
2
  # https://github.com/riboseinc/oss-guides
3
3
  # All project-specific additions and overrides should be specified in this file.
4
4
 
5
+ require: rubocop-rails
6
+
5
7
  inherit_from:
6
8
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
9
  AllCops:
data/README.adoc CHANGED
@@ -46,11 +46,25 @@ item = RelatonBipm::BipmBibliography.get "BIPM si-brochure"
46
46
  ...
47
47
 
48
48
  # get BIPM Metrologia article
49
- RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
49
+ bib = RelatonBipm::BipmBibliography.get "BIPM Metrologia 29 6 373"
50
50
  [relaton-bipm] ("BIPM Metrologia 29 6 373") fetching...
51
51
  [relaton-bipm] ("BIPM Metrologia 29 6 373") found Metrologia 29 6 373
52
52
  => #<RelatonBipm::BipmBibliographicItem:0x007f8857f94d40
53
53
  ...
54
+
55
+ # get CGPM resolutions
56
+ RelatonBipm::BipmBibliography.get "BIPM CGPM01 1"
57
+ [relaton-bipm] ("BIPM CGPM01 1") fetching...
58
+ [relaton-bipm] ("BIPM CGPM01 1") found CGPM01-1
59
+ => #<RelatonBipm::BipmBibliographicItem:0x00007f9e92817968
60
+ ...
61
+
62
+ # get CIPM resolutions
63
+ RelatonBipm::BipmBibliography.get "BIPM CIPM101 1"
64
+ [relaton-bipm] ("BIPM CIPM101 1") fetching...
65
+ [relaton-bipm] ("BIPM CIPM101 1") found CIPM101-1
66
+ => #<RelatonBipm::BipmBibliographicItem:0x00007f9e9293d658
67
+ ...
54
68
  ----
55
69
 
56
70
  === XML serialization
@@ -90,6 +104,7 @@ item.to_xml bibdata: true
90
104
  <fetched>2021-01-10</fetched>
91
105
  <title format="text/plain" language="en" script="Latn">The International System of Units (SI)</title>
92
106
  <title format="text/plain" language="fr" script="Latn">Le Système international d’unités (SI)</title>
107
+ <uri type="src">https://www.bipm.org/en/publications/si-brochure</uri>
93
108
  <docidentifier type="BIPM">si-brochure</docidentifier>
94
109
  <date type="updated">
95
110
  <on>2019-05-20</on>
@@ -112,6 +127,17 @@ item.to_xml bibdata: true
112
127
  </bibdata>"
113
128
  ----
114
129
 
130
+ === Typed links
131
+
132
+ Each BIPM document has `src` type link and optional `doi` type link.
133
+
134
+ [source,ruby]
135
+ ----
136
+ bib.link
137
+ => [#<RelatonBib::TypedUri:0x00007fa6d6a51728 @content=#<Addressable::URI:0xc29c URI:https://iopscience.iop.org/article/10.1088/0026-1394/29/6/001>, @type="src">,
138
+ #<RelatonBib::TypedUri:0x00007fa6d6a29250 @content=#<Addressable::URI:0xc2b0 URI:https://doi.org/10.1088/0026-1394/29/6/001>, @type="doi">]
139
+ ----
140
+
115
141
  === Create bibliographic item from XML
116
142
 
117
143
  [source,ruby]
@@ -173,9 +173,11 @@
173
173
  <data type="dateTime"/>
174
174
  </attribute>
175
175
  </optional>
176
- <attribute name="from">
177
- <data type="IDREF"/>
178
- </attribute>
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
- <ref name="PureTextElement"/>
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
- <text/>
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
- <text/>
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
- <text/>
869
+ <oneOrMore>
870
+ <ref name="PureTextElement"/>
871
+ </oneOrMore>
853
872
  </element>
854
873
  </define>
855
874
  <define name="fn">
data/grammars/biblio.rng CHANGED
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
data/grammars/bipm.rng CHANGED
@@ -16,6 +16,13 @@
16
16
  <param name="pattern">\i\c*|\c+#\c+</param>
17
17
  </data>
18
18
  </attribute>
19
+ <optional>
20
+ <attribute name="to">
21
+ <data type="string">
22
+ <param name="pattern">\i\c*|\c+#\c+</param>
23
+ </data>
24
+ </attribute>
25
+ </optional>
19
26
  <optional>
20
27
  <attribute name="type">
21
28
  <ref name="ReferenceFormat"/>
@@ -93,14 +100,9 @@
93
100
  </optional>
94
101
  <group>
95
102
  <choice>
96
- <group>
97
- <zeroOrMore>
98
- <ref name="BasicBlock"/>
99
- </zeroOrMore>
100
- <zeroOrMore>
101
- <ref name="note"/>
102
- </zeroOrMore>
103
- </group>
103
+ <zeroOrMore>
104
+ <ref name="BasicBlock"/>
105
+ </zeroOrMore>
104
106
  <ref name="amend"/>
105
107
  </choice>
106
108
  <zeroOrMore>
@@ -108,6 +110,7 @@
108
110
  <ref name="clause-subsection"/>
109
111
  <ref name="terms"/>
110
112
  <ref name="definitions"/>
113
+ <ref name="floating-title"/>
111
114
  </choice>
112
115
  </zeroOrMore>
113
116
  </group>
@@ -146,20 +149,16 @@
146
149
  <ref name="section-title"/>
147
150
  </optional>
148
151
  <group>
149
- <group>
150
- <zeroOrMore>
151
- <ref name="BasicBlock"/>
152
- </zeroOrMore>
153
- <zeroOrMore>
154
- <ref name="note"/>
155
- </zeroOrMore>
156
- </group>
152
+ <zeroOrMore>
153
+ <ref name="BasicBlock"/>
154
+ </zeroOrMore>
157
155
  <zeroOrMore>
158
156
  <choice>
159
157
  <ref name="annex-subsection"/>
160
158
  <ref name="terms"/>
161
159
  <ref name="definitions"/>
162
160
  <ref name="references"/>
161
+ <ref name="floating-title"/>
163
162
  </choice>
164
163
  </zeroOrMore>
165
164
  </group>
@@ -179,6 +178,14 @@
179
178
  <data type="boolean"/>
180
179
  </attribute>
181
180
  </optional>
181
+ <optional>
182
+ <attribute name="tag"/>
183
+ </optional>
184
+ <optional>
185
+ <attribute name="multilingual-rendering">
186
+ <ref name="MultilingualRenderingType"/>
187
+ </attribute>
188
+ </optional>
182
189
  <attribute name="type">
183
190
  <choice>
184
191
  <value>roman</value>
@@ -307,7 +314,7 @@
307
314
  <value>CCT</value>
308
315
  <value>CCTF</value>
309
316
  <value>CCU</value>
310
- <value>CCL-CCTF</value>
317
+ <value>CCL-CCTF-WGFS</value>
311
318
  <value>JCGM</value>
312
319
  <value>JCRB</value>
313
320
  <value>JCTLM</value>