relaton-gb 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/README.adoc +10 -0
- data/grammars/basicdoc.rng +26 -7
- data/grammars/biblio.rng +2 -2
- data/grammars/gbstandard.rng +1 -1
- data/grammars/isodoc.rng +617 -89
- data/grammars/isostandard.rng +24 -23
- data/grammars/reqt.rng +34 -5
- data/lib/relaton_gb/gb_scrapper.rb +6 -7
- data/lib/relaton_gb/sec_scrapper.rb +1 -1
- data/lib/relaton_gb/version.rb +1 -1
- data/relaton_gb.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b931b589f3f95dd9d3011cf8284eb2407020af43fd2948b8655f54a043776627
|
4
|
+
data.tar.gz: 40f9665b5a74ed4e8118a5bc27ae6820b5620553f4d6c2a001953c665c887cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af21950b6ef87ac1be5075363fa1c1587ad07f9769b33dbaf0c7c43e0fd185fd02cf5accfadc4b86287734acc3b126fa29ee85bc3aa0186a6c803104065db71b
|
7
|
+
data.tar.gz: e8ec6a99f8c77ed47977fd4cebf20b7319b8e94534e61f6894db84a21c20699eca86d49ed99486d7da04a83e5cc76bc1235b67430cbca0e134f4ecca683db12e
|
data/.rubocop.yml
CHANGED
data/README.adoc
CHANGED
@@ -183,6 +183,16 @@ hit_collection.first.fetch.to_xml bibdata: true
|
|
183
183
|
</bibdata>"
|
184
184
|
----
|
185
185
|
|
186
|
+
=== Typed links
|
187
|
+
|
188
|
+
Each GB document has `src` type link.
|
189
|
+
|
190
|
+
[source,ruby]
|
191
|
+
----
|
192
|
+
hit_collection.first.fetch.link
|
193
|
+
=> [#<RelatonBib::TypedUri:0x00007fee2c0257e8 @content=#<Addressable::URI:0x67c URI:http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=083B48FA72DBD3B9BDE74507BC31736A>, @type="src">]
|
194
|
+
----
|
195
|
+
|
186
196
|
== Development
|
187
197
|
|
188
198
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/grammars/basicdoc.rng
CHANGED
@@ -173,9 +173,11 @@
|
|
173
173
|
<data type="dateTime"/>
|
174
174
|
</attribute>
|
175
175
|
</optional>
|
176
|
-
<
|
177
|
-
<
|
178
|
-
|
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
|
-
<
|
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
|
-
<
|
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
|
-
<
|
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
|
-
<
|
869
|
+
<oneOrMore>
|
870
|
+
<ref name="PureTextElement"/>
|
871
|
+
</oneOrMore>
|
853
872
|
</element>
|
854
873
|
</define>
|
855
874
|
<define name="fn">
|
data/grammars/biblio.rng
CHANGED