ruby-rdf / rdf-rdfa

Ruby RDFa reader/writer for RDF.rb.
http://ruby-rdf.github.com/rdf-rdfa
The Unlicense
35 stars 11 forks source link

Prefixes with '#' at the end are not processed correctly #2

Closed njh closed 14 years ago

njh commented 14 years ago

For example this code:

graph = RDF::Graph.load('http://www.w3.org/2007/08/pyRdfa/profiles/basic', :format => :rdfa, :base_uri => 'http://www.w3.org/2007/08/pyRdfa/profiles/basic')
graph.each_statement do |statement|
  statement.inspect!
end

Outputs:

#<RDF::Statement:0x80b55ca4(_:g2159543960 <http://www.w3.org/ns/rdfa/uri> "http://purl.org/dc/terms/" <http://www.w3.org/2007/08/pyRdfa/profiles/basic> .)>

When the subject should be: http://www.w3.org/ns/rdfa#uri

gkellogg commented 14 years ago

Namespaces were stored as URIs, which used URI arithmetic when joining suffixes. Changed to store as string and use string concatenation to ensure proper results.

njh commented 14 years ago

I did some more digging and I think this is a bug in RDF::URI's join() method: http://github.com/bendiken/rdf/issues/issue/20