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

cleanroom implementation - success!

From: Ben Adida <ben@adida.net>
Date: Tue, 10 Jun 2008 21:16:39 -0700
Message-ID: <484F51A7.4080808@adida.net>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>


Hi all,

I finally found the time to finish my Ruby cleanroom implementation, and 
I can now say with great certainty that the spec is fully correct.

Well okay, I didn't quite finish in the sense that I have *not* tried to 
get the XMLLiterals right, in terms of namespaces and such.

All tests other than the XMLLiterals pass, and I've inspected the failed 
tests by hand, and the only deviation is related to proper namespaces 
within XMLLiterals. (Specifically, test 11,92,94,100,101,102,103.)

I wrote this cleanroom implementation straight from the spec, without 
trying to optimize anything. I made a few stupid Ruby mistakes, and I 
missed two points in the spec that I then had to fix:

(A) I forgot to *not* set skip=true when @property was present, Step 4.

(B) I forgot to clone the evaluation context when skip=true, Step 11.

Interestingly, issue (A) was very quickly visible with multiple test 
failures. Issue (B), on the other hand, I didn't notice until the very 
end. As it turns out, only test 84 failed as a result.

In any case, I can say now with great certainty that the spec is fully 
correct.

If you're interested, the code in all of its ugliness is at:

http://www.w3.org/2006/07/SWD/RDFa/impl/ruby/

(ignore the html5lib, which I'm deleting. You need it, but just get the 
gem.)

and I have it running at:

http://ben.adida.net/rdfa/ruby/rdfa.cgi?uri=

Note that, to run the tests, I used triplr.org for conversion:
http://triplr.org/ben.adida.net/rdfa/ruby/rdfa.cgi?uri=

-Ben

PS: and as it turns out, the HTML5 parser *does* pick up @rev, the bug 
was in *my* code.
Received on Wednesday, 11 June 2008 04:17:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 11 June 2008 04:17:19 GMT