Re: RDFa parser for RDF.rb

Point taken, but any serious HTML or XML gem depends on libxml. I've considered a REXML implementation, which is pure ruby, but much slower than libxml/Nokogiri.

The point for most people is that having a gem based on libxml is a much easier to satisfy dependencies than Redland/Rascal. If there's enough demand, I'll certainly look at adding support for REXML.

RDF::TriX has an elegant solution for checking library availability at runtime and using the best available and we could re-factor along the lines of their implementation.

Please let me know if you find the Nokogiri bindings problematic for jruby.

Gregg

On Jun 3, 2010, at 10:45 AM, John Fieber wrote:

> On Jun 3, 2010, at 10:07 AM, Gregg Kellogg wrote:
> 
>> RDF::RDFa is a native ruby implementation of RDFa. It's currenly on track with work on RDFa 1.1 based on the latest editors draft. rdf-raptor relies on the Redland/Raptor native implementation, which has more complex installation dependencies. RDF::RDFa only relies on Nokogiri, which is based on LibXML, a standard include in Ruby distributions.
> 
> Nokogiri is a C extension wrapper for libxml2 which is not, to my knowledge, a standard Ruby component or dependency.  It is true, though, that libxml2 is much closer to libc end of the you-probably-already-have-it spectrum than libraptor is.  Digging through Nokogiri, I see[1] it has ffi bindings to libxml2, but it uses the C extension by default.  Does anyone know if the ffi route has feature parity with the C extension?  If not, this is a non-starter for jruby folks.
> 
> In any case, with a prominent third party C extension dependency, I don't think you can claim a native ruby implementation any more than rdf-raptor can.  Personally, I don't really care whether it is or isn't, but the claim and the reality ought to be in sync.
> 
> -john
> 
> [1] Or saw, when I switched some time ago from libxml-ruby to nokogiri because the former will happily sefgault if, say, the GC happens to run.  Just set GC.stress = true and watch it explode with even the simplest operations!
> 

Received on Thursday, 3 June 2010 17:57:33 UTC