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

Re: GRDDL implementation in Raptor

From: Dominique HazaŽl-Massieux <dom@w3.org>
Date: Tue, 05 Apr 2005 15:00:27 +0200
To: Dave Beckett <dave.beckett@bristol.ac.uk>
Cc: public-rdf-in-xhtml-tf@w3.org
Message-Id: <1112706027.9636.190.camel@stratustier>
Le lundi 04 avril 2005 ŗ 11:38 +0100, Dave Beckett a ťcrit :
> 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.

Wow! Great!

> It's only in raptor's CVS right now

To test it on my machine, I've downloaded the nightly snapshot from:
http://download.librdf.org/snapshots/source/
and it built the GRDDL parser once I made sure I had libxml2-dev and
libxslt1-dev debian packages...

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

That's right

>   Should users be able to select them by parameter?  I
> went with No.  Are any XSLT parameters passed in?  I went with No.

Seems right as well.

>  but you can try it out in the demo
> on the two examples I found:
> http://librdf.org/parse?uri=http%3A%2F%2Fwww.w3.org%2F2003%2F12%2Frdf-
> in-xhtml-xslts%2Fcomplete-example.html&language=grddl
> 
> http://librdf.org/parse?uri=http%3A%2F%2Fwww.w3.org%2F2004%2Flambda%
> 2FSites%2Findex.html&language=grddl
> 
> or enter your own URIs at http://librdf.org/parse  and select parser
> GRDDL.

I tried both the on-line version and the version compiled on my
computer, and none of them was able to run any of the test cases of the
test suite; I tried quickly to locate the bug, but didn't manage to find
what was wrong; namely, it fails as follows:
./rapper -i grddl -o rdfxml ~/dev.w3.org/2005/grddl-ts/xhtmlWithGrddlProfile.html
lt-rapper: Parsing file /home/dom/dev.w3.org/2005/grddl-ts/xhtmlWithGrddlProfile.html
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
XPath error : Invalid or inclomplete context
lt-rapper: Error - URI file:///home/dom/dev.w3.org/2005/grddl-ts/xhtmlWithGrddlProfile.html:1 column 0 - Unable to evaluate XPath expression "//html:html/html:head[@profile='http://www.w3.org/2003/g/data-view']/html:link[@rel='transformation']/@href"
lt-rapper: Failed to parse file /home/dom/dev.w3.org/2005/grddl-ts/xhtmlWithGrddlProfile.html grddl content
</rdf:RDF>
lt-rapper: Parsing returned 0 statements


(The online version gives:
http://librdf.org/parse?language=grddl&uri=http%3A%2F%2Fdev.w3.org%
2Fcvsweb%2F%7Echeckout%7E%2F2005%2Fgrddl-ts%2FxhtmlWithGrddlProfile.html
%3Frev%3D1.1&content=&Run+Parser=Run+Parser&.cgifields=language
-> 
GRDDL parser failed with errors:
1:Unable to evaluate XPath expression "//html:html/html:head[@profile="http://www.w3.org/2003/g/data-view"]/html:link[@rel="transformation"]/@href"
which is similar)

Looking at the code and the details you gave in your original message, I
can tell that - were it to run - it would likely only pass the 1st test
of the GRDDL test suite at:
http://dev.w3.org/cvsweb/2005/grddl-ts/
namely
http://dev.w3.org/cvsweb/~checkout~/2005/grddl-ts/test-lists.rdf#xhtmlWithGrddlProfile

Time permitting, I'll try to prepare a patch to get it run more tests...
but that assumes I manage to fix the bug that prevents it from running
in the first place.

Thanks for starting this! I can't wait to have GRDDL implemented in
raptor!

Dom
-- 
Dominique HazaŽl-Massieux - http://www.w3.org/People/Dom/
W3C/ERCIM
mailto:dom@w3.org


Received on Tuesday, 5 April 2005 13:00:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:14:59 GMT