W3C home > Mailing lists > Public > public-esw-thes@w3.org > April 2009

Re: Small, standalone, RDF parsers

From: Norman Gray <norman@astro.gla.ac.uk>
Date: Thu, 9 Apr 2009 12:03:44 +0100
Cc: SKOS <public-esw-thes@w3.org>
Message-Id: <F9103345-A514-449B-9D52-FFD18BB8BD19@astro.gla.ac.uk>
To: Christophe Dupriez <christophe.dupriez@destin.be>

Christophe, hello.

On 2009 Apr 8, at 17:50, Christophe Dupriez wrote:

> You can check OpenRDF RIO (part of Sesame): let me know the result,  
> I plan to use it for my SKOS project which now imports from XML files.

Thanks for this suggestion -- I would have casually excluded Sesame  
from consideration on the grounds that it was 'too big'.  However,  
because Sesame is distributed as a couple of dozen jar files, it's  
possible to assemble quite a small parser from them.

As an example, I've attached a 20kB tarball (compressed to 3.7kB)  
which contains an example program which parses both RDF/XML or Turtle  
and then spits out the result in (trivial) n-triples format.  The  
Sesame parsers are clearly modelled on the SAX ones, with a parser  
which processes an input stream, and calls a handler which assembles  
the model/graph.

The Makefile in the attachment shows which subset of Sesame jars are  
required.  When the whole lot is assembled into a single jar file it  
comes to 250kB, which could probably be whittled down a _lot_ with jar- 
optimisation.

Best wishes,

Norman


-- 
Norman Gray  :  http://nxg.me.uk
Dept Physics and Astronomy, University of Leicester

Received on Thursday, 9 April 2009 11:04:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:45:55 UTC