GRDDL implementation in Raptor

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 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  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

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