Re: Bug in rdf-raptor?

I'm a little surprised that raptor isn't "doing the right thing" here
(unless, of course, it doesn't have any idea of the context of how the
RDF/XML was received), since rapper does.

See this thread:
http://lists.w3.org/Archives/Public/public-lod/2010Jan/0123.html for
some more backstory on this.

-Ross.

On Tue, Apr 6, 2010 at 5:43 AM, Arto Bendiken <arto.bendiken@gmail.com> wrote:
> Hi Nick,
>
> On Tue, Apr 6, 2010 at 11:10 AM, Nicholas Humfrey
> <nicholas.humfrey@bbc.co.uk> wrote:
>> Hello,
>>
>> I am planning on writing a ruby gem to makes it easy to consume RDF from BBC
>> Programmes. I started by having a play with rdf-raptor:
>>
>> require 'rubygems'
>> require 'rdf'
>> require 'rdf/raptor'
>>
>> puts RDF::Raptor.available?         #=> true
>> puts RDF::Raptor.version            #=> "1.4.21"
>>
>> RDF::Reader.open('http://www.bbc.co.uk/programmes/b00rmssw.rdf') do |reader|
>>   reader.each_statement do |statement|
>>     puts statement.inspect
>>   end
>> end
>>
>> And the output was:
>> #<RDF::Statement:0x810896e4(<file:///programmes/b00rmssw.rdf>
>> <http://www.w3.org/2000/01/rdf-schema#label> "Description of the episode
>> GCHQ: Cracking the Code" .)>
>
> Looking at the RDF/XML file at
> http://www.bbc.co.uk/programmes/b00rmssw.rdf, it seems that all its
> resource descriptions are given with relative URLs and there is no
> explicit base URI defined. So, if Raptor should parse that file
> without an effective base URI, you'd probably get subject URLs like
> the ones you saw.
>
> Therefore this is likely a bug in RDF::Raptor in that the gem
> certainly ought to be passing in the input URL to Raptor as the
> default base URI.
>
> I'll fix this later today and release a new version of the gem, but in
> the meantime the workaround is trivial enough - just define an
> explicit base URI as follows and everything should work fine:
>
>    RDF::Reader.open(url =
> 'http://www.bbc.co.uk/programmes/b00rmssw.rdf', :base_uri => url)
>
> --
> Arto Bendiken | http://datagraph.org/
>
>

Received on Tuesday, 6 April 2010 13:27:29 UTC