relaton-w3c 1.9.1 → 1.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/README.adoc +68 -70
  4. data/grammars/isodoc.rng +2106 -0
  5. data/grammars/reqt.rng +194 -0
  6. data/lib/relaton_w3c/data_fethcer.rb +4 -0
  7. data/lib/relaton_w3c/data_parser.rb +1 -1
  8. data/lib/relaton_w3c/hit_collection.rb +1 -1
  9. data/lib/relaton_w3c/version.rb +1 -1
  10. data/lib/relaton_w3c/w3c_bibliography.rb +19 -6
  11. data/relaton_w3c.gemspec +1 -1
  12. data/withdrawn/reference.W3C.CR-rdf-schema.xml +16 -0
  13. data/withdrawn/reference.W3C.DSig-label.xml +32 -0
  14. data/withdrawn/reference.W3C.P3P-rdfschema.xml +26 -0
  15. data/withdrawn/reference.W3C.P3P.xml +38 -0
  16. data/withdrawn/reference.W3C.PICS-labels.xml +43 -0
  17. data/withdrawn/reference.W3C.PICS-rules.xml +38 -0
  18. data/withdrawn/reference.W3C.PICS-services.xml +37 -0
  19. data/withdrawn/reference.W3C.REC-RUBY.xml +22 -0
  20. data/withdrawn/reference.W3C.REC-XHTML.xml +12 -0
  21. data/withdrawn/reference.W3C.REC-rdf-syntax.xml +31 -0
  22. data/withdrawn/reference.W3C.REC-xml-1998.xml +20 -0
  23. data/withdrawn/reference.W3C.REC-xml-names.xml +28 -0
  24. data/withdrawn/reference.W3C.REC-xml.xml +35 -0
  25. data/withdrawn/reference.W3C.REC-xmlenc-core.xml +23 -0
  26. data/withdrawn/reference.W3C.REC-xmlschema-1.xml +23 -0
  27. data/withdrawn/reference.W3C.REC-xmlschema-2.xml +17 -0
  28. data/withdrawn/reference.W3C.daml-oil-reference.xml +39 -0
  29. data/withdrawn/reference.W3C.soap11.xml +56 -0
  30. data/withdrawn/reference.W3C.soap12-part1.xml +38 -0
  31. data/withdrawn/reference.W3C.soap12-part2.xml +38 -0
  32. data/withdrawn/reference.W3C.xkms.xml +50 -0
  33. data/withdrawn/reference.W3C.xml-c14n.xml +15 -0
  34. data/withdrawn/reference.W3C.xmldsig-core.xml +26 -0
  35. data/withdrawn/reference.W3C.xmlenc-core.xml +20 -0
  36. data/withdrawn/reference.W3C.xpath.xml +22 -0
  37. metadata +31 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea91306625ad2f0f53980c20651589cd04de493874cbc209a91bafaec46fa9a2
4
- data.tar.gz: '04608d998f36b0fc01cfd2a284e422bdc24120e91ea2d8f2e1e4a3dea44189dc'
3
+ metadata.gz: 59cff3693d7bd2f1b525babbed370b0cd5a1eff11b351cb85c57abbc5f63fa9c
4
+ data.tar.gz: 430214c0eeb2bb22bad775f2ecca8af989ba71271abffd664a94838bcefe3581
5
5
  SHA512:
6
- metadata.gz: 03ce95e1ed894df67208a6be15d61f36a8ba186553bf99f458244b07ba68eebe7c4d5a9ed7ff0d4739f05452f8a6ccd541c0462a760cd99bf9ce53bb61360220
7
- data.tar.gz: edb1f2b02e369e0056291e7c55a2d0115cd2f09e8ad1896e027a4fbe9928494b304099bb0cd9ae4dd9a71a11395b0b98d6f1235e2346ba86a06f59d5aa0b50ec
6
+ metadata.gz: 0012f520613136a2848d875390c159c6a1ec5d39dd60bb046ac90dcada9191a8a515de70681fa6f84837857149ba18e042057c536e06319222c9618b7591a381
7
+ data.tar.gz: ae8731ef0921be794f4259014ef43ccc0a46b0b28ce9077b5a9209e5e22198f0b275ae9f8b488a097da1a31a9841704f706483fff6ff878f725e6af6565e8b36
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
@@ -30,11 +30,10 @@ Or install it yourself as:
30
30
  require 'relaton_w3c'
31
31
  => true
32
32
 
33
- hits = RelatonW3c::W3cBibliography.search("W3C JSON-LD 1.1")
34
- => <RelatonW3c::HitCollection:0x007f93b5e4ff48 @ref=W3C JSON-LD 1.1 @fetched=false>
35
-
36
- item = hits[0].fetch
37
- => #<RelatonW3c::W3cBibliographicItem:0x007f93a58a0670
33
+ item = RelatonW3c::W3cBibliography.get "W3C REC-json-ld11-20200716"
34
+ [relaton-w3c] ("W3C REC-json-ld11-20200716") fetching...
35
+ [relaton-w3c] ("W3C REC-json-ld11-20200716") found JSON-LD 1.1
36
+ => #<RelatonW3c::W3cBibliographicItem:0x00007fc4ea03c6c0
38
37
  ...
39
38
  ----
40
39
 
@@ -43,16 +42,51 @@ item = hits[0].fetch
43
42
  [source,ruby]
44
43
  ----
45
44
  item.to_xml
46
- => "<bibitem id="CR-json-ld11-20200316" type="standard">
47
- <fetched>2020-04-07</fetched>
48
- <title type="main" format="text/plain" language="en" script="Latn">JSON-LD 1.1</title>
49
- <title format="text/plain" language="en" script="Latn">A JSON-based Serialization for Linked Data</title>
50
- <uri type="src">https://www.w3.org/TR/2020/CR-json-ld11-20200316/</uri>
51
- <date type="published">
52
- <on>2020</on>
53
- </date>
54
- ...
55
- </bibitem>"
45
+ => "<bibitem id="W3CREC-json-ld11-20200716" type="standard">
46
+ <fetched>2021-11-20</fetched>
47
+ <title format="text/plain">JSON-LD 1.1</title>
48
+ <uri type="src">https://www.w3.org/TR/2020/REC-json-ld11-20200716/</uri>
49
+ <docidentifier type="W3C">W3C REC-json-ld11-20200716</docidentifier>
50
+ <docnumber>REC-json-ld11-20200716</docnumber>
51
+ <date type="published">
52
+ <on>2020-07-16</on>
53
+ </date>
54
+ <contributor>
55
+ <role type="editor"/>
56
+ <person>
57
+ <name>
58
+ <completename language="en" script="Latn">Dave Longley</completename>
59
+ </name>
60
+ </person>
61
+ </contributor>
62
+ <contributor>
63
+ <role type="editor"/>
64
+ <person>
65
+ <name>
66
+ <completename language="en" script="Latn">Gregg Kellogg</completename>
67
+ </name>
68
+ </person>
69
+ </contributor>
70
+ <contributor>
71
+ <role type="editor"/>
72
+ <person>
73
+ <name>
74
+ <completename language="en" script="Latn">Pierre-Antoine Champin</completename>
75
+ </name>
76
+ </person>
77
+ </contributor>
78
+ <language>en</language>
79
+ <script>Latn</script>
80
+ <relation type="obsoletes">
81
+ <bibitem>
82
+ <formattedref format="text/plain">W3C PR-json-ld11-20200507</formattedref>
83
+ </bibitem>
84
+ </relation>
85
+ <series>
86
+ <title format="text/plain">W3C REC</title>
87
+ <number>REC-json-ld11-20200716</number>
88
+ </series>
89
+ </bibitem>"
56
90
  ----
57
91
 
58
92
  With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and adds flavour `ext` element.
@@ -61,58 +95,19 @@ With argument `bibdata: true` it ouputs XML wrapped by `bibdata` element and add
61
95
  ----
62
96
  item.to_xml bibdata: true
63
97
  => "<bibdata type="standard">
64
- <fetched>2020-04-07</fetched>
65
- <title type="main" format="text/plain" language="en" script="Latn">JSON-LD 1.1</title>
66
- <title format="text/plain" language="en" script="Latn">A JSON-based Serialization for Linked Data</title>
67
- <uri type="src">https://www.w3.org/TR/2020/CR-json-ld11-20200316/</uri>
68
- <date type="published">
69
- <on>2020</on>
70
- </date>
71
- ...
72
- <ext>
73
- <doctype>candidateRecommendation</doctype>
74
- </ext>
75
- </bibdata>"
76
- ----
77
-
78
- === Get document by title
79
- [source,ruby]
80
- ----
81
- RelatonW3c::W3cBibliography.get "W3C JSON-LD 1.1"
82
- [relaton-w3c] ("W3C JSON-LD 1.1") fetching...
83
- [relaton-w3c] ("W3C JSON-LD 1.1") found JSON-LD 1.1
84
- => #<RelatonW3c::W3cBibliographicItem:0x007f93b655bb48
85
- ...
86
- ----
87
-
88
- === Get document by title and type
89
- [source,ruby]
90
- ----
91
- RelatonW3c::W3cBibliography.get "W3C Candidate Recommendation JSON-LD 1.1"
92
- [relaton-w3c] ("W3C Candidate Recommendation JSON-LD 1.1") fetching...
93
- [relaton-w3c] ("W3C Candidate Recommendation JSON-LD 1.1") found JSON-LD 1.1
94
- => #<RelatonW3c::W3cBibliographicItem:0x007f9357199b90
95
- ...
96
- ----
97
-
98
- === Get document by title and short type
99
- [source,ruby]
100
- ----
101
- RelatonW3c::W3cBibliography.get "W3C CR JSON-LD 1.1"
102
- [relaton-w3c] ("W3C CR JSON-LD 1.1") fetching...
103
- [relaton-w3c] ("W3C CR JSON-LD 1.1") found JSON-LD 1.1
104
- => #<RelatonW3c::W3cBibliographicItem:0x007f93b6d37dd0
105
- ...
106
- ----
107
-
108
- === Get document by title, type, and date
109
- [source,ruby]
110
- ----
111
- RelatonW3c::W3cBibliography.get "W3C WD JSON-LD 1.1 2019-10-18"
112
- [relaton-w3c] ("W3C WD JSON-LD 1.1 2019-10-18") fetching...
113
- [relaton-w3c] ("W3C WD JSON-LD 1.1 2019-10-18") found JSON-LD 1.1
114
- => #<RelatonW3c::W3cBibliographicItem:0x007f9345a198b8
115
- ...
98
+ <fetched>2021-11-20</fetched>
99
+ <title format="text/plain">JSON-LD 1.1</title>
100
+ <uri type="src">https://www.w3.org/TR/2020/REC-json-ld11-20200716/</uri>
101
+ <docidentifier type="W3C">W3C REC-json-ld11-20200716</docidentifier>
102
+ <docnumber>REC-json-ld11-20200716</docnumber>
103
+ ...
104
+ <ext>
105
+ <doctype>recommendation</doctype>
106
+ <editorialgroup>
107
+ <technical-committee>JSON-LD Working Group</technical-committee>
108
+ </editorialgroup>
109
+ </ext>
110
+ </bibdata>"
116
111
  ----
117
112
 
118
113
  === Typed links
@@ -121,8 +116,11 @@ Each W3C document has `src` type link.
121
116
 
122
117
  [source,ruby]
123
118
  ----
124
- item.link
125
- => [#<RelatonBib::TypedUri:0x00007fc533ed4040 @content=#<Addressable::URI:0xcc22c URI:https://www.w3.org/TR/2020/REC-json-ld11-20200716/>, @type="src">]
119
+ item.link.first.type
120
+ => "src"
121
+
122
+ item.link.first.content
123
+ => #<Addressable::URI:0x75634 URI:https://www.w3.org/TR/2020/REC-json-ld11-20200716/>
126
124
  ----
127
125
 
128
126
  === Create bibliographic item from XML
@@ -146,7 +144,7 @@ bib_hash = RelatonW3c::HashConverter.hash_to_bib hash
146
144
  [{:type=>"main", :content=>"JSON-LD 1.1", :language=>"en", :script=>"Latn", :format=>"text/plain"},
147
145
  ...
148
146
 
149
- RelatonW3c::W3cBibliographicItem.new bib_hash
147
+ RelatonW3c::W3cBibliographicItem.new **bib_hash
150
148
  => #<RelatonW3c::W3cBibliographicItem:0x007f9381ec6a00
151
149
  ...
152
150
  ----