Very early alpha state pure JavaScript implementation of the RDFa API draft spec released

Hi RDFa API Working Group,

I have released a very early alpha state pure JavaScript
implementation of the RDFa API draft spec. It has still many flaws,
and I'd like to sit down with you guys in order to get some open
questions sorted, but at this stage it's ("it" being my
implementation) already usable enough to be the foundation for a
Chrome extension [0]. Rather than calling document.* you call
LinkedData.API.* (I've put the API in my own namespace to avoid
confusion with potential native implementations, and yepp, I do vote
for renaming the API). I have coded an extension around example 1.3
from the current draft spec [1]. The whole magic happens in just two
calls:

LinkedData.API.data.context.setMapping(
    'cc',
    'http://creativecommons.org/ns#');
LinkedData.API.getElementsByProperty('cc:license');

The extension is more or less just a toy, but the provided JavaScript
code should already be good enough to test the examples in the latest
spec draft. The library is implemented using XPath and not at all
intended to be fast, or elegant, and currently just supports RDFa and
has many of the advanced API calls mocked out. I'm happy to keep
improving the code if anyone is interested. Just let me know. Thanks!

Cheers,
Tom

[0] http://bit.ly/rdfalaser
[1] http://www.w3.org/TR/rdfa-api/#data-based-web-page-modification

-- 
Thomas Steiner, Research Scientist, Google Inc.
http://blog.tomayac.com, http://twitter.com/tomayac

Received on Monday, 4 October 2010 21:01:04 UTC