W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > April 2005

GRDDL implementation in Raptor

From: Dave Beckett <dave.beckett@bristol.ac.uk>
Date: Mon, 04 Apr 2005 11:38:53 +0100
To: public-rdf-in-xhtml-tf@w3.org
Message-Id: <1112611133.22606.55.camel@hoth.ilrt.bris.ac.uk>

In a fit of coding enthusiasm just before going on vacation, I added
GRDDL support to my Raptor RDF parser & serialiser library based on
reading http://www.w3.org/2004/01/rdxh/spec quickly and using libxml2
and libxslt.

It's only in raptor's CVS right now but you can try it out in the demo
on the two examples I found:



or enter your own URIs at http://librdf.org/parse  and select parser

I think it's doing the right thing but I didn't spend a lot of time
checking.  When multiple transforms are present, do they make one graph?
I went with Yes.  Should users be able to select them by parameter?  I
went with No.  Are any XSLT parameters passed in?  I went with No.

It works by reading the source document (assumes it is XHTML) into a
libxml2 document, then applying an XPath query:

where the prefix html: is defined to URI http://www.w3.org/1999/xhtml

It then uses the resulting entries in the nodeset as relative URIs to
the document of XSLT sheets, which are then fetched and applied with
libxslt to the source libxml2 document, giving a new RDF/XML document
which is parsed with raptor's RDF/XML parser to give RDF triples.

Received on Monday, 4 April 2005 10:38:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:18 UTC