ruby-rdf / rdf-rdfxml

Ruby RDF/XML reader/writer for RDF.rb.
http://rubygems.org/gems/rdf-rdfxml
The Unlicense
17 stars 7 forks source link

RDF-XML blank nodes not working with OWL-API #7

Closed balhoff closed 13 years ago

balhoff commented 13 years ago

Hi,

I'm still having some problems opening files I generate with rdf-rdfxml using the Java OWL-API. This script generates output which doesn't open using the OWL-API:

https://gist.github.com/833914

The error from OWL-API is: IRI '_:g2165070100' cannot be resolved against curent base IRI file:/Users/jim/Desktop/test2.rb-3.owl

The output file is here:

https://gist.github.com/833918

Could this line be the problem:

Should it be instead:

?

I'm not sure of the proper RDF syntax here, but that change does allow OWL-API to load the file, with the correct axioms. I keep trying to narrow this down to the precise issue causing problems for OWL-API. Thanks for all your help so far.

gkellogg commented 13 years ago

Yup, that would be the problem! It should be rdf:nodeID, not about (that would have been correct for RDFa).

gkellogg commented 13 years ago

You're using version 0.3.2 of the gem? I can't reproduce the problem. This is the output I get: https://gist.github.com/834074.

However, examining the code, I can see an opportunity to output a BNode where there's an about. I'll see if I can come up with another test case that provokes this and put in a fix in a new release.

balhoff commented 13 years ago

Yes, I do have 0.3.2 installed:

jim$ gem list rdf

*** LOCAL GEMS ***

rdf (0.3.1, 0.2.3)
rdf-rdfxml (0.3.2, 0.3.1, 0.3.0)    
jim$ sudo gem update rdf-rdfxml
Password:
Updating installed gems
Nothing to update
jim$
gkellogg commented 13 years ago

I pushed 0.3.2.1 in which I re-wrote the Collection serialization (which is a real pain in RDF/XML!).

Thanks for your patience. Let me know if you continue to have serialization issues.

balhoff commented 13 years ago

Hi - thanks again for looking into this. I may still be having some issues, but it might be a week or two before I can focus on this again. I'll let you know once I am able to look at it closely.

balhoff commented 13 years ago

Hi Gregg,

The issue was the Ruby version. I get incorrect output with Ruby 1.8.7. Testing with 1.9.2p0 produces a correct OWL ontology.

gkellogg commented 13 years ago

I haven't spent too much time on 1.8.* branches. All specs pass. If you have a test case I'll add it and try to get it working properly with 1.8.7.