rdf-rdfa 0.3.15 → 0.3.16
Sign up to get free protection for your applications and to get access to all the features.
- data/README +14 -12
- data/VERSION +1 -1
- data/lib/rdf/rdfa.rb +1 -1
- data/lib/rdf/rdfa/expansion.rb +1 -1
- data/lib/rdf/rdfa/reader.rb +50 -48
- data/lib/rdf/rdfa/reader/nokogiri.rb +5 -4
- data/lib/rdf/rdfa/reader/rexml.rb +4 -4
- data/lib/rdf/rdfa/writer.rb +47 -133
- metadata +123 -123
data/README
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# RDF::RDFa reader/writer
|
2
|
+
[![Build Status](https://secure.travis-ci.org/ruby-rdf/rdf-rdfa.png?branch=master)](http://travis-ci.org/ruby-rdf/rdf-rdfa)
|
2
3
|
|
3
4
|
[RDFa][RDFa 1.1 Core] parser for RDF.rb.
|
4
5
|
|
@@ -278,11 +279,11 @@ use the same prefix definitions found during parsing:
|
|
278
279
|
puts graph.dump(:rdfa, :prefixes => prefixes)
|
279
280
|
|
280
281
|
### Template-based Writer
|
281
|
-
The RDFa writer uses [Haml][Haml] templates for code generation. This allows
|
282
|
-
customizable RDFa output in a variety of host languages.
|
283
|
-
|
284
|
-
output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML,
|
285
|
-
intended for human consumption.
|
282
|
+
The RDFa writer uses [Haml][Haml] templates for code generation. This allows
|
283
|
+
fully customizable RDFa output in a variety of host languages. The [default
|
284
|
+
template]({RDF::RDFa::Writer::DEFAULT_HAML}) generates human readable HTML5
|
285
|
+
output. A [minimal template]({RDF::RDFa::Writer::MIN_HAML}) generates HTML,
|
286
|
+
which is not intended for human consumption.
|
286
287
|
|
287
288
|
To specify an alternative Haml template, consider the following:
|
288
289
|
|
@@ -398,10 +399,10 @@ The template hash defines four Haml templates:
|
|
398
399
|
|
399
400
|
## Dependencies
|
400
401
|
* [Ruby](http://ruby-lang.org/) (>= 1.9) or (>= 1.8.1 with [Backports][])
|
401
|
-
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 0.3.
|
402
|
-
* [Haml](https://rubygems.org/gems/haml) (>= 3.
|
403
|
-
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('>= 4.3.
|
404
|
-
* Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.
|
402
|
+
* [RDF.rb](http://rubygems.org/gems/rdf) (>= 0.3.11)
|
403
|
+
* [Haml](https://rubygems.org/gems/haml) (>= 3.1.7)
|
404
|
+
* [HTMLEntities](https://rubygems.org/gems/htmlentities) ('>= 4.3.1')
|
405
|
+
* Soft dependency on [Nokogiri](http://rubygems.org/gems/nokogiri) (>= 1.5.5)
|
405
406
|
|
406
407
|
## Documentation
|
407
408
|
Full documentation available on [Rubydoc.info][RDFa doc]
|
@@ -436,16 +437,16 @@ Full documentation available on [Rubydoc.info][RDFa doc]
|
|
436
437
|
* [RDF.rb][RDF.rb]
|
437
438
|
* [Distiller](http://rdf.greggkellogg.net/distiller)
|
438
439
|
* [Documentation][RDFa doc]
|
439
|
-
* [History]
|
440
|
+
* [History](file:History.markdown)
|
440
441
|
* [RDFa 1.1 Core][RDFa 1.1 Core]
|
441
442
|
* [XHTML+RDFa 1.1][XHTML+RDFa 1.1]
|
442
443
|
* [RDFa-test-suite](http://rdfa.info/test-suite/ "RDFa test suite")
|
443
444
|
|
444
445
|
## Author
|
445
|
-
* [Gregg Kellogg](http://github.com/gkellogg) - <http://
|
446
|
+
* [Gregg Kellogg](http://github.com/gkellogg) - <http://greggkellogg.net/>
|
446
447
|
|
447
448
|
## Contributors
|
448
|
-
* [Nicholas Humfrey](http://github.com/njh)
|
449
|
+
* [Nicholas Humfrey](http://github.com/njh) - <http://njh.me/>
|
449
450
|
|
450
451
|
## Contributing
|
451
452
|
|
@@ -486,3 +487,4 @@ see <http://unlicense.org/> or the accompanying {file:UNLICENSE} file.
|
|
486
487
|
[RDFa doc]: http://rubydoc.info/github/ruby-rdf/rdf-rdfa/frames
|
487
488
|
[Haml]: http://haml-lang.com/
|
488
489
|
[Turtle]: http://www.w3.org/TR/2011/WD-turtle-20110809/
|
490
|
+
[Backports]: http://rubygems.org/gems/backports
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.16
|
data/lib/rdf/rdfa.rb
CHANGED
@@ -17,7 +17,7 @@ module RDF
|
|
17
17
|
#
|
18
18
|
# @see http://rubygems.org/gems/rdf
|
19
19
|
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
|
20
|
-
# @see http://www.w3.org/TR/2012/
|
20
|
+
# @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
|
21
21
|
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
|
22
22
|
# @see http://dev.w3.org/html5/rdfa/
|
23
23
|
#
|
data/lib/rdf/rdfa/expansion.rb
CHANGED
@@ -10,7 +10,7 @@ module RDF::RDFa
|
|
10
10
|
##
|
11
11
|
# Perform vocabulary expansion on the resulting default graph.
|
12
12
|
#
|
13
|
-
# Vocabulary expansion relies on a sub-set of OWL
|
13
|
+
# Vocabulary expansion relies on a sub-set of OWL entailment to add
|
14
14
|
# triples to the default graph based on rules and property/class relationships
|
15
15
|
# described in referenced vocabularies.
|
16
16
|
#
|
data/lib/rdf/rdfa/reader.rb
CHANGED
@@ -21,7 +21,7 @@ module RDF::RDFa
|
|
21
21
|
#
|
22
22
|
# Based on processing rules described here:
|
23
23
|
# @see http://www.w3.org/TR/rdfa-syntax/#s_model RDFa 1.0
|
24
|
-
# @see http://www.w3.org/TR/2012/
|
24
|
+
# @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/
|
25
25
|
# @see http://www.w3.org/TR/2012/CR-xhtml-rdfa-20120313/
|
26
26
|
# @see http://dev.w3.org/html5/rdfa/
|
27
27
|
#
|
@@ -61,11 +61,11 @@ module RDF::RDFa
|
|
61
61
|
Regexp::EXTENDED)
|
62
62
|
|
63
63
|
# This expression matches an term as defined in
|
64
|
-
# [RDFA-CORE](
|
64
|
+
# [RDFA-CORE](http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms)
|
65
65
|
#
|
66
66
|
# For the avoidance of doubt, this definition means a 'term'
|
67
67
|
# in RDFa is an XML NCName that also permits slash as a non-leading character.
|
68
|
-
# @see http://www.w3.org/TR/2012/
|
68
|
+
# @see http://www.w3.org/TR/2012/REC-rdfa-core-20120607/#s_terms
|
69
69
|
TERM_REGEXP = Regexp.new(
|
70
70
|
%{^
|
71
71
|
(?!\\\\u0301) # ́ is a non-spacing acute accent.
|
@@ -235,7 +235,7 @@ module RDF::RDFa
|
|
235
235
|
# @option options [Symbol] :library
|
236
236
|
# One of :nokogiri or :rexml. If nil/unspecified uses :nokogiri if available, :rexml otherwise.
|
237
237
|
# @option options [Boolean] :vocab_expansion (false)
|
238
|
-
# whether to perform
|
238
|
+
# whether to perform OWL2 expansion on the resulting graph
|
239
239
|
# @option options [:xml, :xhtml1, :xhtml5, :html4, :html5, :svg] :host_language (:html5)
|
240
240
|
# Host Language
|
241
241
|
# @option options [:"rdfa1.0", :"rdfa1.1"] :version (:"rdfa1.1")
|
@@ -253,7 +253,7 @@ module RDF::RDFa
|
|
253
253
|
# @yield [reader] `self`
|
254
254
|
# @yieldparam [RDF::Reader] reader
|
255
255
|
# @yieldreturn [void] ignored
|
256
|
-
# @raise [
|
256
|
+
# @raise [RDF::ReaderError] if _validate_
|
257
257
|
def initialize(input = $stdin, options = {}, &block)
|
258
258
|
super do
|
259
259
|
@debug = options[:debug]
|
@@ -498,8 +498,9 @@ module RDF::RDFa
|
|
498
498
|
# @raise [RDF::ReaderError] Checks parameter types and raises if they are incorrect if parsing mode is _validate_.
|
499
499
|
def add_triple(node, subject, predicate, object, context = nil)
|
500
500
|
statement = RDF::Statement.new(subject, predicate, object)
|
501
|
+
add_error(node, "statement #{RDF::NTriples.serialize(statement)} is invalid") unless statement.valid?
|
501
502
|
add_info(node, "statement: #{RDF::NTriples.serialize(statement)}")
|
502
|
-
@callback.call(statement) if @options[:rdfagraph].include?(:output)
|
503
|
+
@callback.call(statement) if @options[:rdfagraph].include?(:output)
|
503
504
|
end
|
504
505
|
|
505
506
|
# Parsing an RDFa document (this is *not* the recursive method)
|
@@ -788,60 +789,61 @@ module RDF::RDFa
|
|
788
789
|
else
|
789
790
|
# If the current element contains no @rel or @rev attribute, then the next step is to establish a value for new subject.
|
790
791
|
# This step has two possible alternatives.
|
791
|
-
# 1. If the current element contains the @property attribute, but does not contain the @content
|
792
|
-
# or the @datatype attribute
|
792
|
+
# 1. If the current element contains the @property attribute, but does not contain the @content or the @datatype attributes, then
|
793
793
|
if attrs[:property] && !(attrs[:content] || attrs[:datatype])
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
add_debug(element) {
|
802
|
-
"[Step 5] new_subject: #{new_subject.to_ntriples rescue 'nil'}, " +
|
803
|
-
"typed_resource: #{typed_resource.to_ntriples rescue 'nil'}"
|
804
|
-
}
|
805
|
-
|
806
|
-
# If no URI is provided by a resource attribute, then the first match from the following rules
|
807
|
-
# will apply:
|
808
|
-
new_subject ||= if [:xhtml1, :xhtml5, :html4, :html5].include?(@host_language) && element.name =~ /^(head|body)$/
|
794
|
+
# new subject is set to the resource obtained from the first match from the following rule:
|
795
|
+
new_subject ||= if attrs[:about]
|
796
|
+
# by using the resource from @about, if present, obtained according to the section on CURIE and IRI Processing;
|
797
|
+
process_uri(element, attrs[:about], evaluation_context, base,
|
798
|
+
:uri_mappings => uri_mappings,
|
799
|
+
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, []))
|
800
|
+
elsif [:xhtml1, :xhtml5, :html4, :html5].include?(@host_language) && element.name =~ /^(head|body)$/
|
809
801
|
# From XHTML+RDFa 1.1:
|
810
|
-
# if no URI is provided, then first check to see if the element is the head or body element.
|
811
|
-
# If it is, then act as if the new subject is set to the parent object.
|
802
|
+
# if no URI is provided, then first check to see if the element is the head or body element. If it is, then act as if the new subject is set to the parent object.
|
812
803
|
evaluation_context.parent_object
|
813
804
|
elsif element == root && base
|
814
|
-
# if the element is the root element of the document, then act as if there is an empty @about present,
|
815
|
-
# and process it according to the rule for @about, above;
|
805
|
+
# otherwise, if the element is the root element of the document, then act as if there is an empty @about present, and process it according to the rule for @about, above;
|
816
806
|
uri(base)
|
817
|
-
else
|
818
|
-
# otherwise, if parent object is present, new subject is set to the value of parent object.
|
819
|
-
evaluation_context.parent_object
|
820
807
|
end
|
821
808
|
|
822
|
-
if
|
823
|
-
|
809
|
+
# if the @typeof attribute is present, set typed resource to new subject
|
810
|
+
typed_resource = new_subject if attrs[:typeof]
|
811
|
+
|
812
|
+
# otherwise, if parent object is present, new subject is set to the value of parent object.
|
813
|
+
new_subject ||= evaluation_context.parent_object
|
814
|
+
|
815
|
+
# If @typeof is present then typed resource is set to the resource obtained from the first match from the following rules:
|
816
|
+
|
817
|
+
# by using the resource from @about, if present, obtained according to the section on CURIE and IRI Processing; (done above)
|
818
|
+
# otherwise, if the element is the root element of the document, then act as if there is an empty @about present and process it according to the previous rule; (done above)
|
819
|
+
|
820
|
+
if attrs[:typeof] && typed_resource.nil?
|
821
|
+
# otherwise,
|
822
|
+
typed_resource ||= if attrs[:resource]
|
823
|
+
# by using the resource from @resource, if present, obtained according to the section on CURIE and IRI Processing;
|
824
824
|
process_uri(element, attrs[:resource], evaluation_context, base,
|
825
825
|
:uri_mappings => uri_mappings,
|
826
|
-
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, []))
|
827
|
-
|
826
|
+
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, []))
|
827
|
+
elsif attrs[:href] || attrs[:src]
|
828
|
+
# otherwise, by using the IRI from @href, if present, obtained according to the section on CURIE and IRI Processing;
|
829
|
+
# otherwise, by using the IRI from @src, if present, obtained according to the section on CURIE and IRI Processing;
|
828
830
|
process_uri(element, (attrs[:href] || attrs[:src]), evaluation_context, base,
|
829
|
-
:restrictions => [:uri])
|
830
|
-
|
831
|
-
|
831
|
+
:restrictions => [:uri])
|
832
|
+
else
|
833
|
+
# otherwise, the value of typed resource is set to a newly created bnode.
|
834
|
+
RDF::Node.new
|
835
|
+
end
|
836
|
+
|
832
837
|
# The value of the current object resource is set to the value of typed resource.
|
833
838
|
current_object_resource = typed_resource
|
834
839
|
end
|
835
840
|
else
|
836
841
|
# otherwise (ie, the @content or @datatype)
|
837
842
|
new_subject =
|
838
|
-
process_uri(element, attrs[:about]
|
843
|
+
process_uri(element, (attrs[:about] || attrs[:resource]),
|
844
|
+
evaluation_context, base,
|
839
845
|
:uri_mappings => uri_mappings,
|
840
|
-
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, [])) if attrs[:about]
|
841
|
-
new_subject ||=
|
842
|
-
process_uri(element, attrs[:resource], evaluation_context, base,
|
843
|
-
:uri_mappings => uri_mappings,
|
844
|
-
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, [])) if attrs[:resource]
|
846
|
+
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, [])) if attrs[:about] ||attrs[:resource]
|
845
847
|
new_subject ||=
|
846
848
|
process_uri(element, (attrs[:href] || attrs[:src]), evaluation_context, base,
|
847
849
|
:restrictions => [:uri]) if attrs[:href] || attrs[:src]
|
@@ -874,6 +876,7 @@ module RDF::RDFa
|
|
874
876
|
add_debug(element) {
|
875
877
|
"[Step 5] new_subject: #{new_subject.to_ntriples rescue 'nil'}, " +
|
876
878
|
"typed_resource: #{typed_resource.to_ntriples rescue 'nil'}, " +
|
879
|
+
"current_object_resource: #{current_object_resource.to_ntriples rescue 'nil'}, " +
|
877
880
|
"skip = #{skip}"
|
878
881
|
}
|
879
882
|
else
|
@@ -932,7 +935,7 @@ module RDF::RDFa
|
|
932
935
|
}
|
933
936
|
end
|
934
937
|
|
935
|
-
#
|
938
|
+
# [Step 7] If in any of the previous steps a typed resource was set to a non-null value, it is now used to provide a subject for type values;
|
936
939
|
if typed_resource
|
937
940
|
# Typeof is TERMorCURIEorAbsIRIs
|
938
941
|
types = process_uris(element, attrs[:typeof], evaluation_context, base,
|
@@ -961,8 +964,7 @@ module RDF::RDFa
|
|
961
964
|
|
962
965
|
# Generate triples with given object [Step 9]
|
963
966
|
#
|
964
|
-
# If the current
|
965
|
-
# list associated with that property, creating a new list if necessary.
|
967
|
+
# If in any of the previous steps a current object resource was set to a non-null value, it is now used to generate triples and add entries to the local list mapping:
|
966
968
|
if new_subject && current_object_resource && (attrs[:rel] || attrs[:rev])
|
967
969
|
add_debug(element) {"[Step 9] rels: #{rels.inspect} revs: #{revs.inspect}"}
|
968
970
|
rels.each do |r|
|
@@ -976,6 +978,7 @@ module RDF::RDFa
|
|
976
978
|
add_debug(element) {"[Step 9] add #{current_object_resource.to_ntriples} to #{r} #{list_mapping[r].inspect}"}
|
977
979
|
list_mapping[r] << current_object_resource
|
978
980
|
else
|
981
|
+
# Predicates for the current object resource can be set by using one or both of the @rel and the @rev attributes but, in case of the @rel attribute, only if the @inlist is not present:
|
979
982
|
add_triple(element, new_subject, r, current_object_resource)
|
980
983
|
end
|
981
984
|
end
|
@@ -1108,9 +1111,8 @@ module RDF::RDFa
|
|
1108
1111
|
RDF::Literal.new(attrs[:content], :language => language, :validate => validate?, :canonicalize => canonicalize?)
|
1109
1112
|
when (attrs[:resource] || attrs[:href] || attrs[:src]) &&
|
1110
1113
|
!(attrs[:rel] || attrs[:rev]) &&
|
1111
|
-
evaluation_context.incomplete_triples.empty? &&
|
1112
1114
|
@version != :"rdfa1.0"
|
1113
|
-
add_debug(element, "[Step 11]
|
1115
|
+
add_debug(element, "[Step 11] resource (resource|href|src)")
|
1114
1116
|
res = process_uri(element, attrs[:resource], evaluation_context, base,
|
1115
1117
|
:uri_mappings => uri_mappings,
|
1116
1118
|
:restrictions => SafeCURIEorCURIEorIRI.fetch(@version, [])) if attrs[:resource]
|
@@ -26,7 +26,7 @@ module RDF::RDFa
|
|
26
26
|
##
|
27
27
|
# Element language
|
28
28
|
#
|
29
|
-
# From HTML5
|
29
|
+
# From HTML5 3.2.3.3
|
30
30
|
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
|
31
31
|
# on an element, user agents must use the lang attribute in the XML namespace, and the lang
|
32
32
|
# attribute in no namespace must be ignored for the purposes of determining the element's
|
@@ -140,8 +140,8 @@ module RDF::RDFa
|
|
140
140
|
##
|
141
141
|
# Return a proxy for each child
|
142
142
|
#
|
143
|
-
# @yield
|
144
|
-
# @yieldparam
|
143
|
+
# @yield child
|
144
|
+
# @yieldparam [NodeProxy]
|
145
145
|
def each
|
146
146
|
@node_set.each do |c|
|
147
147
|
yield NodeProxy.new(c, parent)
|
@@ -278,7 +278,8 @@ module RDF::RDFa
|
|
278
278
|
##
|
279
279
|
# Document errors
|
280
280
|
def doc_errors
|
281
|
-
|
281
|
+
# FIXME: Nokogiri version 1.5.5 things <time> is invalid
|
282
|
+
@doc.errors.reject {|e| e.to_s =~ /Tag time invalid/}
|
282
283
|
end
|
283
284
|
|
284
285
|
##
|
@@ -28,7 +28,7 @@ module RDF::RDFa
|
|
28
28
|
##
|
29
29
|
# Element language
|
30
30
|
#
|
31
|
-
# From HTML5
|
31
|
+
# From HTML5 3.2.3.3
|
32
32
|
# If both the lang attribute in no namespace and the lang attribute in the XML namespace are set
|
33
33
|
# on an element, user agents must use the lang attribute in the XML namespace, and the lang
|
34
34
|
# attribute in no namespace must be ignored for the purposes of determining the element's
|
@@ -143,7 +143,7 @@ module RDF::RDFa
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
-
# Simple case for
|
146
|
+
# Simple case for <script>
|
147
147
|
def css(path)
|
148
148
|
xpath("//script[@type]")
|
149
149
|
end
|
@@ -169,8 +169,8 @@ module RDF::RDFa
|
|
169
169
|
##
|
170
170
|
# Return a proxy for each child
|
171
171
|
#
|
172
|
-
# @yield
|
173
|
-
# @yieldparam
|
172
|
+
# @yield child
|
173
|
+
# @yieldparam [NodeProxy]
|
174
174
|
def each
|
175
175
|
@node_set.each do |c|
|
176
176
|
yield NodeProxy.new(c, parent)
|
data/lib/rdf/rdfa/writer.rb
CHANGED
@@ -3,51 +3,47 @@ require 'cgi'
|
|
3
3
|
|
4
4
|
module RDF::RDFa
|
5
5
|
##
|
6
|
-
# An RDFa 1.1 serialiser in Ruby. The RDFa serializer makes use of Haml templates,
|
7
|
-
# allowing runtime-replacement with alternate templates. Note, however, that templates
|
8
|
-
# should be checked against the W3C test suite to ensure that valid RDFa is emitted.
|
6
|
+
# An RDFa 1.1 serialiser in Ruby. The RDFa serializer makes use of Haml templates, allowing runtime-replacement with alternate templates. Note, however, that templates should be checked against the W3C test suite to ensure that valid RDFa is emitted.
|
9
7
|
#
|
10
|
-
# Note that the natural interface is to write a whole graph at a time.
|
11
|
-
# Writing statements or Triples will create a graph to add them to
|
12
|
-
# and then serialize the graph.
|
8
|
+
# Note that the natural interface is to write a whole graph at a time. Writing statements or Triples will create a graph to add them to and then serialize the graph.
|
13
9
|
#
|
14
10
|
# The writer will add prefix definitions, and use them for creating @prefix definitions, and minting CURIEs
|
15
11
|
#
|
16
12
|
# @example Obtaining a RDFa writer class
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
#
|
22
|
-
#
|
13
|
+
# RDF::Writer.for(:html) => RDF::RDFa::Writer
|
14
|
+
# RDF::Writer.for("etc/test.html")
|
15
|
+
# RDF::Writer.for(:file_name => "etc/test.html")
|
16
|
+
# RDF::Writer.for(:file_extension => "html")
|
17
|
+
# RDF::Writer.for(:content_type => "application/xhtml+xml")
|
18
|
+
# RDF::Writer.for(:content_type => "text/html")
|
23
19
|
#
|
24
20
|
# @example Serializing RDF graph into an XHTML+RDFa file
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
21
|
+
# RDF::RDFa::Write.open("etc/test.html") do |writer|
|
22
|
+
# writer << graph
|
23
|
+
# end
|
28
24
|
#
|
29
25
|
# @example Serializing RDF statements into an XHTML+RDFa file
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
26
|
+
# RDF::RDFa::Writer.open("etc/test.html") do |writer|
|
27
|
+
# graph.each_statement do |statement|
|
28
|
+
# writer << statement
|
29
|
+
# end
|
33
30
|
# end
|
34
|
-
# end
|
35
31
|
#
|
36
32
|
# @example Serializing RDF statements into an XHTML+RDFa string
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
33
|
+
# RDF::RDFa::Writer.buffer do |writer|
|
34
|
+
# graph.each_statement do |statement|
|
35
|
+
# writer << statement
|
36
|
+
# end
|
40
37
|
# end
|
41
|
-
# end
|
42
38
|
#
|
43
39
|
# @example Creating @base and @prefix definitions in output
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
#
|
40
|
+
# RDF::RDFa::Writer.buffer(:base_uri => "http://example.com/", :prefixes => {
|
41
|
+
# :foaf => "http://xmlns.com/foaf/0.1/"}
|
42
|
+
# ) do |writer|
|
43
|
+
# graph.each_statement do |statement|
|
44
|
+
# writer << statement
|
45
|
+
# end
|
49
46
|
# end
|
50
|
-
# end
|
51
47
|
#
|
52
48
|
# @author [Gregg Kellogg](http://kellogg-assoc.com/)
|
53
49
|
class Writer < RDF::Writer
|
@@ -57,8 +53,7 @@ module RDF::RDFa
|
|
57
53
|
# @return [Array<URI>]
|
58
54
|
attr :top_classes
|
59
55
|
|
60
|
-
# Defines order of predicates to to emit at begninning of a resource description. Defaults to
|
61
|
-
# [rdf:type, rdfs:label, dc:title]
|
56
|
+
# Defines order of predicates to to emit at begninning of a resource description. Defaults to `[rdf:type, rdfs:label, dc:title]`
|
62
57
|
# @return [Array<URI>]
|
63
58
|
attr :predicate_order
|
64
59
|
|
@@ -99,11 +94,9 @@ module RDF::RDFa
|
|
99
94
|
# Defines order of predicates to to emit at begninning of a resource description..
|
100
95
|
# @option options [Array<RDF::URI>] :heading_predicates ([RDF::RDFS.label, RDF::DC.title])
|
101
96
|
# Defines order of predicates to use in heading.
|
102
|
-
# @option options [String, Symbol, Hash{Symbol => String}] :haml (DEFAULT_HAML)
|
103
|
-
# HAML templates used for generating code
|
97
|
+
# @option options [String, Symbol, Hash{Symbol => String}] :haml (DEFAULT_HAML) HAML templates used for generating code
|
104
98
|
# @option options [Hash] :haml_options (HAML_OPTIONS)
|
105
|
-
# Options to pass to Haml::Engine.new. Default options set
|
106
|
-
# to ensure that whitespace in literals with newlines is properly preserved.
|
99
|
+
# Options to pass to Haml::Engine.new. Default options set `:ugly => false` to ensure that whitespace in literals with newlines is properly preserved.
|
107
100
|
# @yield [writer]
|
108
101
|
# @yieldparam [RDF::Writer] writer
|
109
102
|
def initialize(output = $stdout, options = {}, &block)
|
@@ -202,22 +195,7 @@ module RDF::RDFa
|
|
202
195
|
|
203
196
|
protected
|
204
197
|
|
205
|
-
# Render document using haml_template[:doc].
|
206
|
-
# Yields each subject to be rendered separately.
|
207
|
-
#
|
208
|
-
# The default Haml template is:
|
209
|
-
# !!! XML
|
210
|
-
# !!! 5
|
211
|
-
# %html{:xmlns => "http://www.w3.org/1999/xhtml", :lang => lang, :prefix => prefix}
|
212
|
-
# - if base || title
|
213
|
-
# %head
|
214
|
-
# - if base
|
215
|
-
# %base{:href => base}
|
216
|
-
# - if title
|
217
|
-
# %title= title
|
218
|
-
# %body
|
219
|
-
# - subjects.each do |subject|
|
220
|
-
# != yield(subject)
|
198
|
+
# Render document using `haml_template[:doc]`. Yields each subject to be rendered separately.
|
221
199
|
#
|
222
200
|
# @param [Array<RDF::Resource>] subjects
|
223
201
|
# Ordered list of subjects. Template must yield to each subject, which returns
|
@@ -252,28 +230,11 @@ module RDF::RDFa
|
|
252
230
|
end
|
253
231
|
end
|
254
232
|
|
255
|
-
# Render a subject using haml_template[:subject]
|
256
|
-
#
|
257
|
-
# The _subject_ template may be called either as a top-level element, or recursively under another element
|
258
|
-
# if the _rel_ local is not nil.
|
259
|
-
#
|
260
|
-
# Yields each predicate/property to be rendered separately (@see #render_property_value and
|
261
|
-
# {#render_property_values}).
|
233
|
+
# Render a subject using `haml_template[:subject]`.
|
262
234
|
#
|
263
|
-
# The
|
264
|
-
# - if element == :li
|
265
|
-
# %li{:rel => rel, :resource => (about || resource), :typeof => typeof, :inlist => inlist}
|
266
|
-
# - if typeof
|
267
|
-
# %span.type!= typeof
|
268
|
-
# - predicates.each do |predicate|
|
269
|
-
# != yield(predicate)
|
270
|
-
# - else
|
271
|
-
# %div{:rel => rel, :resource => (about || resource), :typeof => typeof, :inlist => inlist}
|
272
|
-
# - if typeof
|
273
|
-
# %span.type!= typeof
|
274
|
-
# - predicates.each do |predicate|
|
275
|
-
# != yield(predicate)
|
235
|
+
# The _subject_ template may be called either as a top-level element, or recursively under another element if the _rel_ local is not nil.
|
276
236
|
#
|
237
|
+
# Yields each predicate/property to be rendered separately (@see #render_property_value and `#render_property_values`).
|
277
238
|
#
|
278
239
|
# @param [Array<RDF::Resource>] subject
|
279
240
|
# Subject to render
|
@@ -292,7 +253,7 @@ module RDF::RDFa
|
|
292
253
|
# RDF type as a CURIE, URI or Node definition.
|
293
254
|
# If :about is nil, this defaults to the empty string ("").
|
294
255
|
# @option options [:li, nil] element (nil)
|
295
|
-
# Render with
|
256
|
+
# Render with <li>, otherwise with template default.
|
296
257
|
# @option options [String] haml (haml_template[:subject])
|
297
258
|
# Haml template to render.
|
298
259
|
# @yield [predicate]
|
@@ -301,7 +262,7 @@ module RDF::RDFa
|
|
301
262
|
# @yieldreturn [:ignored]
|
302
263
|
# @return String
|
303
264
|
# The rendered document is returned as a string
|
304
|
-
# Return Haml template for document from haml_template[:subject]
|
265
|
+
# Return Haml template for document from `haml_template[:subject]`
|
305
266
|
def render_subject(subject, predicates, options = {})
|
306
267
|
template = options[:haml] || :subject
|
307
268
|
options = {
|
@@ -320,62 +281,17 @@ module RDF::RDFa
|
|
320
281
|
end
|
321
282
|
end
|
322
283
|
|
323
|
-
# Render a single- or multi-valued predicate using haml_template[:property_value] or haml_template[:property_values].
|
324
|
-
# Yields each object for optional rendering. The block should only
|
325
|
-
# render for recursive subject definitions (i.e., where the object
|
326
|
-
# is also a subject and is rendered underneath the first referencing subject).
|
327
|
-
#
|
328
|
-
# The default Haml template for a single-valued property is:
|
329
|
-
# - if heading_predicates.include?(predicate) && object.literal?
|
330
|
-
# %h1{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
|
331
|
-
# - else
|
332
|
-
# %div.property
|
333
|
-
# %span.label
|
334
|
-
# = get_predicate_name(predicate)
|
335
|
-
# - if res = yield(object)
|
336
|
-
# != res
|
337
|
-
# - elsif get_curie(object) == 'rdf:nil'
|
338
|
-
# %span{:rel => get_curie(predicate), :inlist => ''}
|
339
|
-
# - elsif object.node?
|
340
|
-
# %span{:property => get_curie(predicate), :resource => get_curie(object), :inlist => inlist}= get_curie(object)
|
341
|
-
# - elsif object.uri?
|
342
|
-
# %a{:property => get_curie(predicate), :href => object.to_s, :inlist => inlist}= object.to_s
|
343
|
-
# - elsif object.datatype == RDF.XMLLiteral
|
344
|
-
# %span{:property => get_curie(predicate), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}<!= get_value(object)
|
345
|
-
# - else
|
346
|
-
# %span{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
|
347
|
-
#
|
348
|
-
#
|
349
|
-
# The default Haml template for a multi-valued property is:
|
350
|
-
# %div.property
|
351
|
-
# %span.label
|
352
|
-
# = get_predicate_name(predicate)
|
353
|
-
# %ul
|
354
|
-
# - objects.each do |object|
|
355
|
-
# - if res = yield(object)
|
356
|
-
# != res
|
357
|
-
# - elsif object.node?
|
358
|
-
# %li{:property => get_curie(predicate), :resource => get_curie(object), :inlist => inlist}= get_curie(object)
|
359
|
-
# - elsif object.uri?
|
360
|
-
# %li
|
361
|
-
# %a{:property => get_curie(predicate), :href => object.to_s, :inlist => inlist}= object.to_s
|
362
|
-
# - elsif object.datatype == RDF.XMLLiteral
|
363
|
-
# %li{:property => get_curie(predicate), :lang => get_lang(object), :datatype => get_curie(object.datatype), :inlist => inlist}<!= get_value(object)
|
364
|
-
# - else
|
365
|
-
# %li{:property => get_curie(predicate), :content => get_content(object), :lang => get_lang(object), :datatype => get_dt_curie(object), :inlist => inlist}= escape_entities(get_value(object))
|
284
|
+
# Render a single- or multi-valued predicate using `haml_template[:property_value]` or `haml_template[:property_values]`. Yields each object for optional rendering. The block should only render for recursive subject definitions (i.e., where the object is also a subject and is rendered underneath the first referencing subject).
|
366
285
|
#
|
367
|
-
# If a multi-valued property definition is not found within the template,
|
368
|
-
# the writer will use the single-valued property definition multiple times.
|
286
|
+
# If a multi-valued property definition is not found within the template, the writer will use the single-valued property definition multiple times.
|
369
287
|
#
|
370
288
|
# @param [Array<RDF::Resource>] predicate
|
371
289
|
# Predicate to render.
|
372
290
|
# @param [Array<RDF::Resource>] objects
|
373
|
-
# List of objects to render.
|
374
|
-
# If the list contains only a single element, the :property_value template will be used.
|
375
|
-
# Otherwise, the :property_values template is used.
|
291
|
+
# List of objects to render. If the list contains only a single element, the :property_value template will be used. Otherwise, the :property_values template is used.
|
376
292
|
# @param [Hash{Symbol => Object}] options Rendering options passed to Haml render.
|
377
293
|
# @option options [String] haml (haml_template[:property_value], haml_template[:property_values])
|
378
|
-
# Haml template to render. Otherwise, uses haml_template[:property_value] or haml_template[:property_values]
|
294
|
+
# Haml template to render. Otherwise, uses `haml_template[:property_value] or haml_template[:property_values]`
|
379
295
|
# depending on the cardinality of objects.
|
380
296
|
# @yield [object]
|
381
297
|
# Yields object.
|
@@ -523,8 +439,7 @@ module RDF::RDFa
|
|
523
439
|
prop_list
|
524
440
|
end
|
525
441
|
|
526
|
-
# Perform any statement preprocessing required. This is used to perform reference counts and determine required
|
527
|
-
# prefixes.
|
442
|
+
# Perform any statement preprocessing required. This is used to perform reference counts and determine required prefixes.
|
528
443
|
# @param [RDF::Statement] statement
|
529
444
|
# @return [ignored]
|
530
445
|
def preprocess_statement(statement)
|
@@ -551,21 +466,20 @@ module RDF::RDFa
|
|
551
466
|
|
552
467
|
# Display a subject.
|
553
468
|
#
|
554
|
-
# If the Haml template contains an entry matching the subject's rdf:type URI,
|
555
|
-
# that entry will be used as the template for this subject and it's properties.
|
469
|
+
# If the Haml template contains an entry matching the subject's rdf:type URI, that entry will be used as the template for this subject and it's properties.
|
556
470
|
#
|
557
471
|
# @example Displays a subject as a Resource Definition:
|
558
|
-
#
|
559
|
-
#
|
560
|
-
#
|
561
|
-
#
|
562
|
-
#
|
563
|
-
#
|
472
|
+
# <div typeof="rdfs:Resource" about="http://example.com/resource">
|
473
|
+
# <h1 property="dc:title">label</h1>
|
474
|
+
# <ul>
|
475
|
+
# <li content="2009-04-30T06:15:51Z" property="dc:created">2009-04-30T06:15:51+00:00</li>
|
476
|
+
# </ul>
|
477
|
+
# </div>
|
564
478
|
#
|
565
479
|
# @param [RDF::Resource] subject
|
566
480
|
# @param [Hash{Symbol => Object}] options
|
567
481
|
# @option options [:li, nil] :element(:div)
|
568
|
-
# Serialize using
|
482
|
+
# Serialize using <li> rather than template default element
|
569
483
|
# @option options [RDF::Resource] :rel (nil)
|
570
484
|
# Optional @rel property
|
571
485
|
# @return [Nokogiri::XML::Element, {Namespace}]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-rdfa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,264 +10,264 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-11-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
|
17
|
-
requirements:
|
18
|
-
- - ! '>='
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 0.3.5
|
21
|
-
none: false
|
16
|
+
name: rdf
|
22
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
23
19
|
requirements:
|
24
20
|
- - ! '>='
|
25
21
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.3.
|
27
|
-
none: false
|
28
|
-
name: rdf
|
29
|
-
prerelease: false
|
22
|
+
version: 0.3.11
|
30
23
|
type: :runtime
|
31
|
-
|
24
|
+
prerelease: false
|
32
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
33
27
|
requirements:
|
34
28
|
- - ! '>='
|
35
29
|
- !ruby/object:Gem::Version
|
36
|
-
version: 3.
|
37
|
-
|
30
|
+
version: 0.3.11
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: haml
|
38
33
|
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
39
35
|
requirements:
|
40
36
|
- - ! '>='
|
41
37
|
- !ruby/object:Gem::Version
|
42
|
-
version: 3.1.
|
43
|
-
none: false
|
44
|
-
name: haml
|
45
|
-
prerelease: false
|
38
|
+
version: 3.1.7
|
46
39
|
type: :runtime
|
47
|
-
|
40
|
+
prerelease: false
|
48
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
49
43
|
requirements:
|
50
44
|
- - ! '>='
|
51
45
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
53
|
-
|
46
|
+
version: 3.1.7
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rdf-xsd
|
54
49
|
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
55
51
|
requirements:
|
56
52
|
- - ! '>='
|
57
53
|
- !ruby/object:Gem::Version
|
58
|
-
version: 0.3.
|
59
|
-
none: false
|
60
|
-
name: rdf-xsd
|
61
|
-
prerelease: false
|
54
|
+
version: 0.3.8
|
62
55
|
type: :runtime
|
63
|
-
|
56
|
+
prerelease: false
|
64
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
65
59
|
requirements:
|
66
60
|
- - ! '>='
|
67
61
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
|
62
|
+
version: 0.3.8
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: htmlentities
|
70
65
|
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
71
67
|
requirements:
|
72
68
|
- - ! '>='
|
73
69
|
- !ruby/object:Gem::Version
|
74
|
-
version: 4.3.
|
75
|
-
none: false
|
76
|
-
name: htmlentities
|
77
|
-
prerelease: false
|
70
|
+
version: 4.3.1
|
78
71
|
type: :runtime
|
79
|
-
|
72
|
+
prerelease: false
|
80
73
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
81
75
|
requirements:
|
82
76
|
- - ! '>='
|
83
77
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
85
|
-
|
78
|
+
version: 4.3.1
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: nokogiri
|
86
81
|
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
87
83
|
requirements:
|
88
84
|
- - ! '>='
|
89
85
|
- !ruby/object:Gem::Version
|
90
|
-
version: 1.
|
91
|
-
none: false
|
92
|
-
name: nokogiri
|
93
|
-
prerelease: false
|
86
|
+
version: 1.5.5
|
94
87
|
type: :development
|
95
|
-
|
88
|
+
prerelease: false
|
96
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
97
91
|
requirements:
|
98
92
|
- - ! '>='
|
99
93
|
- !ruby/object:Gem::Version
|
100
|
-
version:
|
101
|
-
|
94
|
+
version: 1.5.5
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: equivalent-xml
|
102
97
|
requirement: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
103
99
|
requirements:
|
104
100
|
- - ! '>='
|
105
101
|
- !ruby/object:Gem::Version
|
106
|
-
version: 0.
|
107
|
-
none: false
|
108
|
-
name: equivalent-xml
|
109
|
-
prerelease: false
|
102
|
+
version: 0.3.0
|
110
103
|
type: :development
|
111
|
-
|
104
|
+
prerelease: false
|
112
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
113
107
|
requirements:
|
114
108
|
- - ! '>='
|
115
109
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.0
|
117
|
-
|
110
|
+
version: 0.3.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: open-uri-cached
|
118
113
|
requirement: !ruby/object:Gem::Requirement
|
114
|
+
none: false
|
119
115
|
requirements:
|
120
116
|
- - ! '>='
|
121
117
|
- !ruby/object:Gem::Version
|
122
118
|
version: 0.0.5
|
123
|
-
none: false
|
124
|
-
name: open-uri-cached
|
125
|
-
prerelease: false
|
126
119
|
type: :development
|
127
|
-
|
120
|
+
prerelease: false
|
128
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
129
123
|
requirements:
|
130
124
|
- - ! '>='
|
131
125
|
- !ruby/object:Gem::Version
|
132
|
-
version: 0.0.
|
133
|
-
|
126
|
+
version: 0.0.5
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: spira
|
134
129
|
requirement: !ruby/object:Gem::Requirement
|
130
|
+
none: false
|
135
131
|
requirements:
|
136
132
|
- - ! '>='
|
137
133
|
- !ruby/object:Gem::Version
|
138
134
|
version: 0.0.12
|
139
|
-
none: false
|
140
|
-
name: spira
|
141
|
-
prerelease: false
|
142
135
|
type: :development
|
143
|
-
|
136
|
+
prerelease: false
|
144
137
|
version_requirements: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
145
139
|
requirements:
|
146
140
|
- - ! '>='
|
147
141
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
149
|
-
|
142
|
+
version: 0.0.12
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: rspec
|
150
145
|
requirement: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
151
147
|
requirements:
|
152
148
|
- - ! '>='
|
153
149
|
- !ruby/object:Gem::Version
|
154
|
-
version: 2.
|
155
|
-
none: false
|
156
|
-
name: rspec
|
157
|
-
prerelease: false
|
150
|
+
version: 2.12.0
|
158
151
|
type: :development
|
159
|
-
|
152
|
+
prerelease: false
|
160
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
161
155
|
requirements:
|
162
156
|
- - ! '>='
|
163
157
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
165
|
-
|
158
|
+
version: 2.12.0
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: rdf-microdata
|
166
161
|
requirement: !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
167
163
|
requirements:
|
168
164
|
- - ! '>='
|
169
165
|
- !ruby/object:Gem::Version
|
170
166
|
version: 0.2.5
|
171
|
-
none: false
|
172
|
-
name: rdf-microdata
|
173
|
-
prerelease: false
|
174
167
|
type: :development
|
175
|
-
|
168
|
+
prerelease: false
|
176
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
177
171
|
requirements:
|
178
172
|
- - ! '>='
|
179
173
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
181
|
-
|
174
|
+
version: 0.2.5
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: rdf-spec
|
182
177
|
requirement: !ruby/object:Gem::Requirement
|
178
|
+
none: false
|
183
179
|
requirements:
|
184
180
|
- - ! '>='
|
185
181
|
- !ruby/object:Gem::Version
|
186
|
-
version: 0.3.
|
187
|
-
none: false
|
188
|
-
name: rdf-spec
|
189
|
-
prerelease: false
|
182
|
+
version: 0.3.11
|
190
183
|
type: :development
|
191
|
-
|
184
|
+
prerelease: false
|
192
185
|
version_requirements: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
193
187
|
requirements:
|
194
188
|
- - ! '>='
|
195
189
|
- !ruby/object:Gem::Version
|
196
|
-
version: 0.
|
197
|
-
|
190
|
+
version: 0.3.11
|
191
|
+
- !ruby/object:Gem::Dependency
|
192
|
+
name: rdf-turtle
|
198
193
|
requirement: !ruby/object:Gem::Requirement
|
194
|
+
none: false
|
199
195
|
requirements:
|
200
196
|
- - ! '>='
|
201
197
|
- !ruby/object:Gem::Version
|
202
|
-
version: 0.
|
203
|
-
none: false
|
204
|
-
name: rdf-turtle
|
205
|
-
prerelease: false
|
198
|
+
version: 0.3.0
|
206
199
|
type: :development
|
207
|
-
|
200
|
+
prerelease: false
|
208
201
|
version_requirements: !ruby/object:Gem::Requirement
|
202
|
+
none: false
|
209
203
|
requirements:
|
210
204
|
- - ! '>='
|
211
205
|
- !ruby/object:Gem::Version
|
212
|
-
version: 0.3.
|
213
|
-
|
206
|
+
version: 0.3.0
|
207
|
+
- !ruby/object:Gem::Dependency
|
208
|
+
name: rdf-rdfxml
|
214
209
|
requirement: !ruby/object:Gem::Requirement
|
210
|
+
none: false
|
215
211
|
requirements:
|
216
212
|
- - ! '>='
|
217
213
|
- !ruby/object:Gem::Version
|
218
|
-
version: 0.3.
|
219
|
-
none: false
|
220
|
-
name: rdf-rdfxml
|
221
|
-
prerelease: false
|
214
|
+
version: 0.3.8
|
222
215
|
type: :development
|
223
|
-
|
216
|
+
prerelease: false
|
224
217
|
version_requirements: !ruby/object:Gem::Requirement
|
218
|
+
none: false
|
225
219
|
requirements:
|
226
220
|
- - ! '>='
|
227
221
|
- !ruby/object:Gem::Version
|
228
|
-
version: 0.3.
|
229
|
-
|
222
|
+
version: 0.3.8
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rdf-isomorphic
|
230
225
|
requirement: !ruby/object:Gem::Requirement
|
226
|
+
none: false
|
231
227
|
requirements:
|
232
228
|
- - ! '>='
|
233
229
|
- !ruby/object:Gem::Version
|
234
230
|
version: 0.3.4
|
235
|
-
none: false
|
236
|
-
name: rdf-isomorphic
|
237
|
-
prerelease: false
|
238
231
|
type: :development
|
239
|
-
|
232
|
+
prerelease: false
|
240
233
|
version_requirements: !ruby/object:Gem::Requirement
|
234
|
+
none: false
|
241
235
|
requirements:
|
242
236
|
- - ! '>='
|
243
237
|
- !ruby/object:Gem::Version
|
244
|
-
version: 0.
|
245
|
-
|
238
|
+
version: 0.3.4
|
239
|
+
- !ruby/object:Gem::Dependency
|
240
|
+
name: sparql
|
246
241
|
requirement: !ruby/object:Gem::Requirement
|
242
|
+
none: false
|
247
243
|
requirements:
|
248
244
|
- - ! '>='
|
249
245
|
- !ruby/object:Gem::Version
|
250
|
-
version: 0.1
|
251
|
-
none: false
|
252
|
-
name: sparql
|
253
|
-
prerelease: false
|
246
|
+
version: 0.3.1
|
254
247
|
type: :development
|
255
|
-
|
248
|
+
prerelease: false
|
256
249
|
version_requirements: !ruby/object:Gem::Requirement
|
250
|
+
none: false
|
257
251
|
requirements:
|
258
252
|
- - ! '>='
|
259
253
|
- !ruby/object:Gem::Version
|
260
|
-
version: 0.
|
261
|
-
|
254
|
+
version: 0.3.1
|
255
|
+
- !ruby/object:Gem::Dependency
|
256
|
+
name: yard
|
262
257
|
requirement: !ruby/object:Gem::Requirement
|
258
|
+
none: false
|
263
259
|
requirements:
|
264
260
|
- - ! '>='
|
265
261
|
- !ruby/object:Gem::Version
|
266
|
-
version: 0.
|
267
|
-
none: false
|
268
|
-
name: yard
|
269
|
-
prerelease: false
|
262
|
+
version: 0.8.3
|
270
263
|
type: :development
|
264
|
+
prerelease: false
|
265
|
+
version_requirements: !ruby/object:Gem::Requirement
|
266
|
+
none: false
|
267
|
+
requirements:
|
268
|
+
- - ! '>='
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: 0.8.3
|
271
271
|
description: RDF::RDFa is an RDFa reader/writer for Ruby using the RDF.rb library
|
272
272
|
suite.
|
273
273
|
email: public-rdf-ruby@w3.org
|
@@ -279,17 +279,10 @@ files:
|
|
279
279
|
- README
|
280
280
|
- UNLICENSE
|
281
281
|
- VERSION
|
282
|
-
- lib/rdf/rdfa.rb
|
283
|
-
- lib/rdf/rdfa/context.rb
|
284
|
-
- lib/rdf/rdfa/expansion.rb
|
285
|
-
- lib/rdf/rdfa/format.rb
|
286
|
-
- lib/rdf/rdfa/reader.rb
|
287
|
-
- lib/rdf/rdfa/version.rb
|
288
|
-
- lib/rdf/rdfa/vocab.rb
|
289
|
-
- lib/rdf/rdfa/writer.rb
|
290
282
|
- lib/rdf/rdfa/context/html.rb
|
291
283
|
- lib/rdf/rdfa/context/xhtml.rb
|
292
284
|
- lib/rdf/rdfa/context/xml.rb
|
285
|
+
- lib/rdf/rdfa/context.rb
|
293
286
|
- lib/rdf/rdfa/expansion/cc.rb
|
294
287
|
- lib/rdf/rdfa/expansion/dc.rb
|
295
288
|
- lib/rdf/rdfa/expansion/doap.rb
|
@@ -300,10 +293,17 @@ files:
|
|
300
293
|
- lib/rdf/rdfa/expansion/skos.rb
|
301
294
|
- lib/rdf/rdfa/expansion/skosxl.rb
|
302
295
|
- lib/rdf/rdfa/expansion/v.rb
|
296
|
+
- lib/rdf/rdfa/expansion.rb
|
297
|
+
- lib/rdf/rdfa/format.rb
|
303
298
|
- lib/rdf/rdfa/patches/string_hacks.rb
|
304
299
|
- lib/rdf/rdfa/reader/nokogiri.rb
|
305
300
|
- lib/rdf/rdfa/reader/rexml.rb
|
301
|
+
- lib/rdf/rdfa/reader.rb
|
302
|
+
- lib/rdf/rdfa/version.rb
|
303
|
+
- lib/rdf/rdfa/vocab.rb
|
306
304
|
- lib/rdf/rdfa/writer/haml_templates.rb
|
305
|
+
- lib/rdf/rdfa/writer.rb
|
306
|
+
- lib/rdf/rdfa.rb
|
307
307
|
homepage: http://github.com/ruby-rdf/rdf-rdfa
|
308
308
|
licenses:
|
309
309
|
- Public Domain
|
@@ -312,17 +312,17 @@ rdoc_options: []
|
|
312
312
|
require_paths:
|
313
313
|
- lib
|
314
314
|
required_ruby_version: !ruby/object:Gem::Requirement
|
315
|
+
none: false
|
315
316
|
requirements:
|
316
317
|
- - ! '>='
|
317
318
|
- !ruby/object:Gem::Version
|
318
319
|
version: 1.8.1
|
319
|
-
none: false
|
320
320
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
321
|
+
none: false
|
321
322
|
requirements:
|
322
323
|
- - ! '>='
|
323
324
|
- !ruby/object:Gem::Version
|
324
325
|
version: '0'
|
325
|
-
none: false
|
326
326
|
requirements: []
|
327
327
|
rubyforge_project: rdf-rdfa
|
328
328
|
rubygems_version: 1.8.24
|