rdf-rdfxml 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +2 -2
- data/VERSION +1 -1
- data/lib/rdf/rdfxml/reader/nokogiri.rb +8 -0
- data/lib/rdf/rdfxml/writer.rb +10 -0
- metadata +25 -25
data/README.markdown
CHANGED
@@ -27,7 +27,7 @@ Instantiate a parser and parse source, specifying type and base-URL
|
|
27
27
|
* Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.5.0)
|
28
28
|
|
29
29
|
## Documentation
|
30
|
-
Full documentation available on [RubyForge](http://rubydoc.info/github/
|
30
|
+
Full documentation available on [RubyForge](http://rubydoc.info/github/ruby-rdf/rdf-rdfxml/master/frames)
|
31
31
|
|
32
32
|
### Principle Classes
|
33
33
|
* {RDF::RDFXML}
|
@@ -84,7 +84,7 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
|
|
84
84
|
|
85
85
|
* gregg@kellogg-assoc.com
|
86
86
|
* <http://rubygems.org/rdf-rdfxml>
|
87
|
-
* <http://github.com/
|
87
|
+
* <http://github.com/ruby-rdf/rdf-rdfxml>
|
88
88
|
* <http://lists.w3.org/Archives/Public/public-rdf-ruby/>
|
89
89
|
|
90
90
|
[RDF.rb]: http://rdf.rubyforge.org/
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
@@ -128,6 +128,14 @@ module RDF::RDFXML
|
|
128
128
|
def namespace
|
129
129
|
@def_namespace || @node.namespace
|
130
130
|
end
|
131
|
+
else
|
132
|
+
def add_namespace(prefix, href)
|
133
|
+
@node.add_namespace(prefix, href)
|
134
|
+
end
|
135
|
+
|
136
|
+
def namespace
|
137
|
+
@node.namespace
|
138
|
+
end
|
131
139
|
end
|
132
140
|
|
133
141
|
# URI of namespace + node_name
|
data/lib/rdf/rdfxml/writer.rb
CHANGED
@@ -81,6 +81,8 @@ module RDF::RDFXML
|
|
81
81
|
# Add standard prefixes to _prefixes_, if necessary.
|
82
82
|
# @option options [String] :default_namespace (nil)
|
83
83
|
# URI to use as default namespace, same as prefix(nil)
|
84
|
+
# @option options [String] :stylesheet (nil)
|
85
|
+
# URI to use as @href for output stylesheet processing instruction.
|
84
86
|
# @yield [writer]
|
85
87
|
# @yieldparam [RDF::Writer] writer
|
86
88
|
def initialize(output = $stdout, options = {}, &block)
|
@@ -151,6 +153,14 @@ module RDF::RDFXML
|
|
151
153
|
doc.root = Nokogiri::XML::Element.new("rdf:RDF", doc)
|
152
154
|
doc.root["xml:lang"] = @lang if @lang
|
153
155
|
doc.root["xml:base"] = base_uri if base_uri
|
156
|
+
|
157
|
+
if @options[:stylesheet]
|
158
|
+
pi = Nokogiri::XML::ProcessingInstruction.new(
|
159
|
+
doc, "xml-stylesheet",
|
160
|
+
"type=\"text/xsl\" href=\"#{@options[:stylesheet]}\""
|
161
|
+
)
|
162
|
+
doc.root.add_previous_sibling pi
|
163
|
+
end
|
154
164
|
|
155
165
|
# Add statements for each subject
|
156
166
|
order_subjects.each do |subject|
|
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: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-05-14 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rdf
|
17
|
-
requirement: &
|
17
|
+
requirement: &70345945239300 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.3.4
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70345945239300
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rdf-xsd
|
28
|
-
requirement: &
|
28
|
+
requirement: &70345945238820 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 0.3.5
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70345945238820
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: nokogiri
|
39
|
-
requirement: &
|
39
|
+
requirement: &70345945238300 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: 1.5.0
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70345945238300
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: equivalent-xml
|
50
|
-
requirement: &
|
50
|
+
requirement: &70345945221360 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: 0.2.8
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70345945221360
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: open-uri-cached
|
61
|
-
requirement: &
|
61
|
+
requirement: &70345945220780 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: 0.0.4
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70345945220780
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: spira
|
72
|
-
requirement: &
|
72
|
+
requirement: &70345945220180 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: 0.0.12
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70345945220180
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec
|
83
|
-
requirement: &
|
83
|
+
requirement: &70345945219600 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: 2.8.0
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70345945219600
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: rdf-isomorphic
|
94
|
-
requirement: &
|
94
|
+
requirement: &70345945219020 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: 0.3.4
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70345945219020
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: rdf-n3
|
105
|
-
requirement: &
|
105
|
+
requirement: &70345945218480 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: 0.3.4
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70345945218480
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: rdf-spec
|
116
|
-
requirement: &
|
116
|
+
requirement: &70345945217940 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: 0.3.4
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70345945217940
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: yard
|
127
|
-
requirement: &
|
127
|
+
requirement: &70345945217420 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,7 +132,7 @@ dependencies:
|
|
132
132
|
version: 0.6.0
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *70345945217420
|
136
136
|
description: RDF::RDFXML is an RDF/XML reader and writer for the RDF.rb library suite.
|
137
137
|
email: public-rdf-ruby@w3.org
|
138
138
|
executables: []
|
@@ -156,7 +156,7 @@ files:
|
|
156
156
|
- lib/rdf/rdfxml/vocab.rb
|
157
157
|
- lib/rdf/rdfxml/writer.rb
|
158
158
|
- lib/rdf/rdfxml.rb
|
159
|
-
homepage: http://github.com/
|
159
|
+
homepage: http://github.com/ruby-rdf/rdf-rdfxml
|
160
160
|
licenses:
|
161
161
|
- Public Domain
|
162
162
|
post_install_message:
|