diff --git a/VERSION b/VERSION index 7ec1d6d..ccbccc3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0 +2.2.0 diff --git a/lib/rdf/rdfxml/writer/haml_templates.rb b/lib/rdf/rdfxml/writer/haml_templates.rb index 9dbaf89..a981926 100644 --- a/lib/rdf/rdfxml/writer/haml_templates.rb +++ b/lib/rdf/rdfxml/writer/haml_templates.rb @@ -38,8 +38,7 @@ class Writer - if expanded_type.start_with?('_:') - haml_tag(get_qname(RDF.type), "rdf:nodeID" => expanded_type[2..-1]) -else - - # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1 - - haml_tag(get_qname(RDF.type), "", "rdf:resource" => expanded_type) + - haml_tag(get_qname(RDF.type), "rdf:resource" => expanded_type) - predicates.each do |p| = yield(p) ), @@ -60,11 +59,9 @@ class Writer - haml_tag(property, :"<", "xml:lang" => object.language, "rdf:datatype" => (object.datatype unless object.plain?)) do = object.value.to_s.encode(xml: :text) - elsif object.node? - - # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1 - - haml_tag(property, "", "rdf:nodeID" => object.id) + - haml_tag(property, :"/", "rdf:nodeID" => object.id) - else - - # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1 - - haml_tag(property, "", "rdf:resource" => relativize(object)) + - haml_tag(property, :"/", "rdf:resource" => relativize(object)) ), # Outpust for a list @@ -78,11 +75,9 @@ class Writer - if recurse && res = yield(object) = res - elsif object.node? - - # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1 - - haml_tag(get_qname(RDF.Description), "", "rdf:nodeID" => (object.id if ref_count(object) > 1)) + - haml_tag(get_qname(RDF.Description), :"/", "rdf:nodeID" => (object.id if ref_count(object) > 1)) - else - - # FIXME: closing tag forces close tag, as :/ is not honored in 5.0.1 - - haml_tag(get_qname(RDF.Description), "", "rdf:about" => relativize(object)) + - haml_tag(get_qname(RDF.Description), :"/", "rdf:about" => relativize(object)) ), } HAML_TEMPLATES = {base: BASE_HAML} diff --git a/spec/writer_spec.rb b/spec/writer_spec.rb index 632314c..dd0c174 100644 --- a/spec/writer_spec.rb +++ b/spec/writer_spec.rb @@ -690,10 +690,7 @@ class FOO < RDF::Vocabulary("http://foo/"); end describe m.comment do m.entries.each do |t| next unless t.positive_test? && t.evaluate? - # Literal serialization adds namespace definitions - specify "#{t.name}" do - pending if t.name == 'xml-canon-test001' unless defined?(::Nokogiri) pending("XML-C14XL") if t.name == "xml-canon-test001" end