rdf-rdfxml 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHORS +1 -1
- data/README.md +26 -22
- data/UNLICENSE +1 -1
- data/VERSION +1 -1
- data/lib/rdf/rdfxml.rb +3 -4
- data/lib/rdf/rdfxml/reader.rb +13 -3
- data/lib/rdf/rdfxml/writer.rb +1 -1
- metadata +11 -32
- data/lib/rdf/rdfxml/vocab.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d78b045742a7ce1dcdc9cf7c25130db97bb5b6ad5c8107c725f1a1fd237eaaa
|
4
|
+
data.tar.gz: 01cc1867ba1b6d8c60e295c9f9726cc31452d99834038d4c8318f1aade2c7bed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f54dfe13e5296e938b30b461f889aa2f78f3b5b76bff54f5c1a3393b94d84f66f36f47b461531a5948089e1baac899f973315c88e099341d1d85dd68df8ee253
|
7
|
+
data.tar.gz: ed0b13aa3345e47438bbab0d036bcaf248d80e5a46c70a22eb39a45520846002f911ef6b7bde7dcdbdb3c3c6412008ca26ff7189054404e7123481b9d5801285
|
data/AUTHORS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* Gregg Kellogg <
|
1
|
+
* Gregg Kellogg <https://greggkellogg.net>
|
data/README.md
CHANGED
@@ -2,8 +2,10 @@
|
|
2
2
|
|
3
3
|
[RDF/XML][] reader/writer for [RDF.rb][].
|
4
4
|
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/rdf-rdfxml.png)](
|
6
|
-
[![Build Status](https://
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/rdf-rdfxml.png)](https://badge.fury.io/rb/rdf-rdfxml)
|
6
|
+
[![Build Status](https://github.com/ruby-rdf/rdf-rdfxml/workflows/CI/badge.svg?branch=develop)](https://github.com/ruby-rdf/rdf-rdfxml/actions?query=workflow%3ACI)
|
7
|
+
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf-rdfxml/badge.svg?branch=develop)](https://coveralls.io/github/ruby-rdf/rdf-rdfxml?branch=develop)
|
8
|
+
[![Gitter chat](https://badges.gitter.im/ruby-rdf/rdf.png)](https://gitter.im/ruby-rdf/rdf)
|
7
9
|
|
8
10
|
## DESCRIPTION
|
9
11
|
|
@@ -16,7 +18,7 @@ Fully compliant [RDF/XML][] parser and serializer.
|
|
16
18
|
|
17
19
|
Install with `gem install rdf-rdfxml`
|
18
20
|
|
19
|
-
* 100% free and unencumbered [public domain](
|
21
|
+
* 100% free and unencumbered [public domain](https://unlicense.org/) software.
|
20
22
|
* Implements a complete parser for [RDF/XML][].
|
21
23
|
* Compatible with Ruby >= 2.4.
|
22
24
|
|
@@ -40,8 +42,8 @@ Write a graph to a file:
|
|
40
42
|
end
|
41
43
|
|
42
44
|
## Dependencies
|
43
|
-
* [RDF.rb](
|
44
|
-
* Soft dependency on [Nokogiri](
|
45
|
+
* [RDF.rb](https://rubygems.org/gems/rdf) (~> 3.1)
|
46
|
+
* Soft dependency on [Nokogiri](https://rubygems.org/gems/nokogiri) (>= 1.10)
|
45
47
|
|
46
48
|
## Documentation
|
47
49
|
Full documentation available on [Rubydoc.info][RDF/XML doc])
|
@@ -63,13 +65,13 @@ Full documentation available on [Rubydoc.info][RDF/XML doc])
|
|
63
65
|
* [RDF/XML][RDF/XML]
|
64
66
|
* [Distiller](http://rdf.greggkellogg.net)
|
65
67
|
* [Documentation][RDF/XML doc]
|
66
|
-
* [RDF Tests](
|
68
|
+
* [RDF Tests](https://www.w3.org/2000/10/rdf-tests/rdfcore/allTestCases.html)
|
67
69
|
|
68
70
|
## Author
|
69
|
-
* [Gregg Kellogg](
|
71
|
+
* [Gregg Kellogg](https://github.com/gkellogg) - <https://greggkellogg.net/>
|
70
72
|
|
71
73
|
## Contributors
|
72
|
-
* [Nicholas Humfrey](
|
74
|
+
* [Nicholas Humfrey](https://github.com/njh) - <http://njh.me/>
|
73
75
|
|
74
76
|
## Contributing
|
75
77
|
This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange development and release activity. All submissions _must_ be on a feature branch based on the _develop_ branch to ease staging and integration.
|
@@ -84,25 +86,27 @@ This repository uses [Git Flow](https://github.com/nvie/gitflow) to mange develo
|
|
84
86
|
list in the the `README`. Alphabetical order applies.
|
85
87
|
* Do note that in order for us to merge any non-trivial changes (as a rule
|
86
88
|
of thumb, additions larger than about 15 lines of code), we need an
|
87
|
-
explicit [public domain dedication][PDD] on record from you
|
89
|
+
explicit [public domain dedication][PDD] on record from you,
|
90
|
+
which you will be asked to agree to on the first commit to a repo within the organization.
|
91
|
+
Note that the agreement applies to all repos in the [Ruby RDF](https://github.com/ruby-rdf/) organization.
|
88
92
|
|
89
93
|
## License
|
90
94
|
|
91
95
|
This is free and unencumbered public domain software. For more information,
|
92
|
-
see <
|
96
|
+
see <https://unlicense.org/> or the accompanying {file:UNLICENSE} file.
|
93
97
|
|
94
98
|
## FEEDBACK
|
95
99
|
|
96
100
|
* gregg@greggkellogg.net
|
97
|
-
* <
|
98
|
-
* <
|
99
|
-
* <
|
100
|
-
|
101
|
-
[Ruby]:
|
102
|
-
[RDF]:
|
103
|
-
[RDF.rb]:
|
104
|
-
[RDF/XML]:
|
105
|
-
[YARD]:
|
106
|
-
[YARD-GS]:
|
107
|
-
[PDD]:
|
108
|
-
[RDF/XML doc]:
|
101
|
+
* <https://rubygems.org/rdf-rdfxml>
|
102
|
+
* <https://github.com/ruby-rdf/rdf-rdfxml>
|
103
|
+
* <https://lists.w3.org/Archives/Public/public-rdf-ruby/>
|
104
|
+
|
105
|
+
[Ruby]: https://ruby-lang.org/
|
106
|
+
[RDF]: https://www.w3.org/RDF/
|
107
|
+
[RDF.rb]: https://rubygems.org/gems/rdf
|
108
|
+
[RDF/XML]: http://www.w3.org/TR/rdf-syntax-grammar/ "RDF/XML Syntax Specification"
|
109
|
+
[YARD]: https://yardoc.org/
|
110
|
+
[YARD-GS]: https://rubydoc.info/docs/yard/file/docs/GettingStarted.md
|
111
|
+
[PDD]: https://unlicense.org/#unlicensing-contributions
|
112
|
+
[RDF/XML doc]: https://rubydoc.info/github/ruby-rdf/rdf-rdfxml/master/frames
|
data/UNLICENSE
CHANGED
@@ -21,4 +21,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
21
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
22
|
OTHER DEALINGS IN THE SOFTWARE.
|
23
23
|
|
24
|
-
For more information, please refer to <
|
24
|
+
For more information, please refer to <https://unlicense.org/>
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.1.
|
1
|
+
3.1.1
|
data/lib/rdf/rdfxml.rb
CHANGED
@@ -2,6 +2,7 @@ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..')))
|
|
2
2
|
require 'rdf'
|
3
3
|
|
4
4
|
module RDF
|
5
|
+
autoload :XML, 'rdf/rdfa/vocab'
|
5
6
|
##
|
6
7
|
# **`RDF::RDFXML`** is an RDF/XML extension for RDF.rb.
|
7
8
|
#
|
@@ -15,17 +16,15 @@ module RDF
|
|
15
16
|
# end
|
16
17
|
# end
|
17
18
|
#
|
18
|
-
# @see
|
19
|
+
# @see https://rubygems.org/gems/rdf
|
19
20
|
# @see http://www.w3.org/TR/REC-rdf-syntax/
|
20
21
|
#
|
21
|
-
# @author [Gregg Kellogg](http://
|
22
|
+
# @author [Gregg Kellogg](http://greggkellogg.net/)
|
22
23
|
module RDFXML
|
23
24
|
require 'rdf/rdfxml/format'
|
24
|
-
require 'rdf/rdfxml/vocab'
|
25
25
|
autoload :Reader, 'rdf/rdfxml/reader'
|
26
26
|
autoload :Writer, 'rdf/rdfxml/writer'
|
27
27
|
autoload :VERSION, 'rdf/rdfxml/version'
|
28
|
-
autoload :XML, 'rdf/rdfxml/vocab'
|
29
28
|
|
30
29
|
# Regexp matching an NCName.
|
31
30
|
NC_REGEXP = Regexp.new(
|
data/lib/rdf/rdfxml/reader.rb
CHANGED
@@ -11,7 +11,9 @@ module RDF::RDFXML
|
|
11
11
|
#
|
12
12
|
# Based on RDF/XML Syntax Specification: http://www.w3.org/TR/REC-rdf-syntax/
|
13
13
|
#
|
14
|
-
#
|
14
|
+
# Extension: A nodeElement can also use the rdf:resource attribute, if none of the other standard attributes are defined.
|
15
|
+
#
|
16
|
+
# @author [Gregg Kellogg](http://greggkellogg.net/)
|
15
17
|
class Reader < RDF::Reader
|
16
18
|
format Format
|
17
19
|
include RDF::Util::Logger
|
@@ -158,8 +160,11 @@ module RDF::RDFXML
|
|
158
160
|
input.rewind if input.respond_to?(:rewind)
|
159
161
|
initialize_xml(input, **options) rescue log_fatal($!.message)
|
160
162
|
|
161
|
-
|
162
|
-
|
163
|
+
if root.nil?
|
164
|
+
log_info("Empty document")
|
165
|
+
elsif !doc_errors.empty?
|
166
|
+
log_error("Synax errors") {doc_errors}
|
167
|
+
end
|
163
168
|
|
164
169
|
block.call(self) if block_given?
|
165
170
|
end
|
@@ -583,6 +588,7 @@ module RDF::RDFXML
|
|
583
588
|
about = el.attribute_with_ns("about", RDF.to_uri.to_s)
|
584
589
|
id = el.attribute_with_ns("ID", RDF.to_uri.to_s)
|
585
590
|
nodeID = el.attribute_with_ns("nodeID", RDF.to_uri.to_s)
|
591
|
+
resource = el.attribute_with_ns("resource", RDF.to_uri.to_s)
|
586
592
|
|
587
593
|
if nodeID && about
|
588
594
|
add_error(el, "Cannot have rdf:nodeID and rdf:about.")
|
@@ -603,6 +609,10 @@ module RDF::RDFXML
|
|
603
609
|
about = RDF::NTriples.unescape(about.value)
|
604
610
|
add_debug(el) {"parse_subject, about: #{about.inspect}"}
|
605
611
|
uri(ec.base, about)
|
612
|
+
when resource
|
613
|
+
resource = RDF::NTriples.unescape(resource.value)
|
614
|
+
add_debug(el) {"parse_subject, resource: #{resource.inspect}"}
|
615
|
+
uri(ec.base, resource)
|
606
616
|
else
|
607
617
|
add_debug(el, "parse_subject, BNode")
|
608
618
|
RDF::Node.new
|
data/lib/rdf/rdfxml/writer.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-rdfxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg
|
8
8
|
- Kellogg
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -67,26 +67,6 @@ dependencies:
|
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '4.3'
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: open-uri-cached
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
73
|
-
requirements:
|
74
|
-
- - "~>"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0.0'
|
77
|
-
- - ">="
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
version: 0.0.5
|
80
|
-
type: :development
|
81
|
-
prerelease: false
|
82
|
-
version_requirements: !ruby/object:Gem::Requirement
|
83
|
-
requirements:
|
84
|
-
- - "~>"
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '0.0'
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.0.5
|
90
70
|
- !ruby/object:Gem::Dependency
|
91
71
|
name: json-ld
|
92
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,14 +87,14 @@ dependencies:
|
|
107
87
|
requirements:
|
108
88
|
- - "~>"
|
109
89
|
- !ruby/object:Gem::Version
|
110
|
-
version: '3.
|
90
|
+
version: '3.10'
|
111
91
|
type: :development
|
112
92
|
prerelease: false
|
113
93
|
version_requirements: !ruby/object:Gem::Requirement
|
114
94
|
requirements:
|
115
95
|
- - "~>"
|
116
96
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
97
|
+
version: '3.10'
|
118
98
|
- !ruby/object:Gem::Dependency
|
119
99
|
name: rspec-its
|
120
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,14 +171,14 @@ dependencies:
|
|
191
171
|
requirements:
|
192
172
|
- - "~>"
|
193
173
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.9
|
174
|
+
version: '0.9'
|
195
175
|
type: :development
|
196
176
|
prerelease: false
|
197
177
|
version_requirements: !ruby/object:Gem::Requirement
|
198
178
|
requirements:
|
199
179
|
- - "~>"
|
200
180
|
- !ruby/object:Gem::Version
|
201
|
-
version: 0.9
|
181
|
+
version: '0.9'
|
202
182
|
description: RDF::RDFXML is an RDF/XML reader and writer for the RDF.rb library suite.
|
203
183
|
email: public-rdf-ruby@w3.org
|
204
184
|
executables: []
|
@@ -218,14 +198,13 @@ files:
|
|
218
198
|
- lib/rdf/rdfxml/reader/nokogiri.rb
|
219
199
|
- lib/rdf/rdfxml/reader/rexml.rb
|
220
200
|
- lib/rdf/rdfxml/version.rb
|
221
|
-
- lib/rdf/rdfxml/vocab.rb
|
222
201
|
- lib/rdf/rdfxml/writer.rb
|
223
202
|
- lib/rdf/rdfxml/writer/haml_templates.rb
|
224
|
-
homepage:
|
203
|
+
homepage: https://github.com/ruby-rdf/rdf-rdfxml
|
225
204
|
licenses:
|
226
205
|
- Unlicense
|
227
206
|
metadata: {}
|
228
|
-
post_install_message:
|
207
|
+
post_install_message:
|
229
208
|
rdoc_options: []
|
230
209
|
require_paths:
|
231
210
|
- lib
|
@@ -240,8 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
219
|
- !ruby/object:Gem::Version
|
241
220
|
version: '0'
|
242
221
|
requirements: []
|
243
|
-
rubygems_version: 3.
|
244
|
-
signing_key:
|
222
|
+
rubygems_version: 3.2.3
|
223
|
+
signing_key:
|
245
224
|
specification_version: 4
|
246
225
|
summary: RDF/XML reader/writer for RDF.rb.
|
247
226
|
test_files: []
|
data/lib/rdf/rdfxml/vocab.rb
DELETED