Closed balhoff closed 13 years ago
Sorry - I just realized there was a bug in my test script. I was using the RDF::List directly in a statement instead of list.subject. Sorry for the noise!
Never-the-less, the error reporting could have been better. I added some other changes to specs I had left out of the last release and added specific checks to be sure that subject, predicate, and object are all appropriate RDF value types.
I am encountering an exception when trying to serialize a graph - example code here:
https://gist.github.com/824997
It works as expected when I serialize to N-triples and convert to RDF-XML using rapper and then open in Protege.
The exception is: /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:370:in
predicate': undefined method
pop' for nil:NilClass (NoMethodError) from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:339:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:337:in
each' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:337:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:334:in
each' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:334:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:408:in
predicate' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:339:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:337:in
each' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:337:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:334:in
each' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:334:insubject' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:157:in
write_epilogue' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:155:ineach' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:155:in
write_epilogue' from /Library/Ruby/Gems/1.8/gems/rdf-0.3.1/lib/rdf/writer.rb:188:ininitialize' from /Library/Ruby/Gems/1.8/gems/rdf-rdfxml-0.3.1/lib/rdf/rdfxml/writer.rb:87:in
initialize' from /Library/Ruby/Gems/1.8/gems/rdf-0.3.1/lib/rdf/writer.rb:140:innew' from /Library/Ruby/Gems/1.8/gems/rdf-0.3.1/lib/rdf/writer.rb:140:in
buffer' from /Library/Ruby/Gems/1.8/gems/rdf-0.3.1/lib/rdf/writer.rb:139:inopen' from /Library/Ruby/Gems/1.8/gems/rdf-0.3.1/lib/rdf/writer.rb:139:in
buffer' from test.rb:27