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

nokogiri crashes when parsing some RDFa #4

Closed njh closed 13 years ago

njh commented 13 years ago

Sorry if I have reported this already. I have having trouble with the RDFa parser, which I use for testing dbpedialite.org. However I am not sure if it is just my machine.

/Library/Ruby/Gems/1.8/gems/nokogiri-1.4.2/lib/nokogiri/xml/node.rb:141: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Abort trap

Here is some example code: https://gist.github.com/458519

gkellogg commented 13 years ago

This does not cause a problem with the 0.3.0 version gem, to be released shortly. Note that you can simplify the code, due to new support for content-negotiation in rdf.rb (presuming that proper mime-type is returned):

#!/usr/bin/env ruby
require 'rubygems'
require 'rdf/rdfa'

base_uri = "http://dbpedialite.org/things/934787"
graph = RDF::Graph.new(base_uri)
graph.load(base_uri)
njh commented 13 years ago

Fantastic! Got my tests working well using rdf-rdfa version 0.3.0.

Thanks!