W3C home > Mailing lists > Public > public-rdf-ruby@w3.org > July 2008

Progress on Ruby RDF/XML parser

From: Tom Morris <tom@tommorris.org>
Date: Sat, 5 Jul 2008 01:00:13 +0100
Message-ID: <d375f00f0807041700h403c06b9k5fd08da60a10f779@mail.gmail.com>
To: public-rdf-ruby@w3.org

Just a quick note: a week or so ago, I actually got my thumb out of my
behind and wrote an RDF/XML parser as part of my slow and meandering
attempt at writing an RDF library in Ruby.

The code is up at Github:

If you are interested in helping out, just install Git on your
machine, join Github, fork my repository and start fiddling away. If
you do something cool, send me an e-mail or a pull request. Patches
are welcome by e-mail too for those who don't believe in distributed
version control systems. :)

The parser is not 100% complete - there are still more parts of the
spec that need implementation, like support for
rdf:parseType="Collection" (the seemingly never-ending list of these
parseType attribute values makes cute kittens cry, btw). Currently,
the parser is using the built-in REXML parser in Ruby. I did look at
the libxml gem which has a class for doing SAX parsing, but couldn't
make head nor tail of it (I am fairly unfamiliar with SAX parsing, but
the Ruby interface seemed to lack methods to get back the namespaces
of elements and attributes).

On the agenda, I am planning to hopefully finish all the fiddlier bits
of the RDF/XML spec, then rewrite whatever unit/regression tests I can
find from other RDF/XML parsers into the current RSpec tests.
Switching away from REXML would be nice too. I'm also planning on
going to a local Ruby/Rails event soon, so hopefully I can get some
smart Ruby types to peer through my code and make it better.
Not-so-soon goals: SPARQL would be very cool, as would some
convenience methods (perhaps done using method_missing) for OWL.

If I can get the current features stable, I'm also going to hopefully
package it into a gem. I've been experimenting with building it into a
gem on my local machine.


Tom Morris
Received on Saturday, 5 July 2008 00:00:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:53:40 UTC