rdf-rdfxml 1.99.0 → 1.99.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/VERSION +1 -1
- data/lib/rdf/rdfxml/format.rb +16 -3
- data/lib/rdf/rdfxml/writer/haml_templates.rb +10 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5a53c64ca08c4b1ba11a7bfd1a2e53e1150b4b1dc9adf6a006c409a09459f4d5
|
4
|
+
data.tar.gz: da09af1c4ded29d47b46c0a8a2abf16f3f997625ef9c155c196ab9fbdc53a4f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da1d0c673da3e3c2a3d36632e0f69886ce8d318fcb207dd61145798621b9cd8532d2dc920df08280a0b83cfd937506d5fa168574245c5fd65b6cb8792c631af1
|
7
|
+
data.tar.gz: 93db4498130704ff853f9d9747fc01bb1db713e9d9d0c8e700e2b8ace1622787fa40058022e345fcc395bbdefc73726fc8a264c22b867c1f3091411e86af7afa
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.99.
|
1
|
+
1.99.1
|
data/lib/rdf/rdfxml/format.rb
CHANGED
@@ -43,9 +43,22 @@ module RDF::RDFXML
|
|
43
43
|
def self.name
|
44
44
|
"RDF/XML"
|
45
45
|
end
|
46
|
+
end
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
48
|
+
# Aliases for RDF::Format
|
49
|
+
#
|
50
|
+
# This allows the following:
|
51
|
+
#
|
52
|
+
# @example Obtaining an HTML format class
|
53
|
+
# RDF::Format.for(:rdf) # RDF::RDFXML::Lite
|
54
|
+
# RDF::Format.for(:rdf).reader # RDF::RDFXML::Reader
|
55
|
+
# RDF::Format.for(:rdf).writer # RDF::RDFXML::Writer
|
56
|
+
class RDFFormat < RDF::Format
|
57
|
+
content_type 'application/rdf+xml'
|
58
|
+
content_encoding 'utf-8'
|
59
|
+
reader { RDF::RDFXML::Reader }
|
60
|
+
writer { RDF::RDFXML::Writer }
|
61
|
+
|
62
|
+
def self.to_sym; :rdf; end
|
50
63
|
end
|
51
64
|
end
|
@@ -38,7 +38,8 @@ module RDF::RDFXML
|
|
38
38
|
- if expanded_type.start_with?('_:')
|
39
39
|
- haml_tag(get_qname(RDF.type), "rdf:nodeID" => expanded_type[2..-1])
|
40
40
|
-else
|
41
|
-
-
|
41
|
+
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
|
42
|
+
- haml_tag(get_qname(RDF.type), "", "rdf:resource" => expanded_type)
|
42
43
|
- predicates.each do |p|
|
43
44
|
= yield(p)
|
44
45
|
),
|
@@ -59,9 +60,11 @@ module RDF::RDFXML
|
|
59
60
|
- haml_tag(property, :"<", "xml:lang" => object.language, "rdf:datatype" => (object.datatype unless object.plain?)) do
|
60
61
|
= object.value.to_s.encode(xml: :text)
|
61
62
|
- elsif object.node?
|
62
|
-
-
|
63
|
+
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
|
64
|
+
- haml_tag(property, "", "rdf:nodeID" => object.id)
|
63
65
|
- else
|
64
|
-
-
|
66
|
+
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
|
67
|
+
- haml_tag(property, "", "rdf:resource" => relativize(object))
|
65
68
|
),
|
66
69
|
|
67
70
|
# Outpust for a list
|
@@ -75,9 +78,11 @@ module RDF::RDFXML
|
|
75
78
|
- if recurse && res = yield(object)
|
76
79
|
= res
|
77
80
|
- elsif object.node?
|
78
|
-
-
|
81
|
+
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
|
82
|
+
- haml_tag(get_qname(RDF.Description), "", "rdf:nodeID" => (object.id if ref_count(object) > 1))
|
79
83
|
- else
|
80
|
-
-
|
84
|
+
- # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1
|
85
|
+
- haml_tag(get_qname(RDF.Description), "", "rdf:about" => relativize(object))
|
81
86
|
),
|
82
87
|
}
|
83
88
|
HAML_TEMPLATES = {:base => BASE_HAML}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-rdfxml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.99.
|
4
|
+
version: 1.99.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregg
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rdf
|
@@ -255,9 +255,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
requirements: []
|
257
257
|
rubyforge_project: rdf-rdfxml
|
258
|
-
rubygems_version: 2.
|
258
|
+
rubygems_version: 2.7.6
|
259
259
|
signing_key:
|
260
260
|
specification_version: 4
|
261
261
|
summary: RDF/XML reader/writer for RDF.rb.
|
262
262
|
test_files: []
|
263
|
-
has_rdoc: false
|