netlabs.org RDF/RDFa API implementation

The following is an e-mail from Christian Langanke, who is implementing
the RDF and RDFa API in PHP. They had submitted this over a month ago,
but the W3C mailing list ate the e-mail and then I failed to re-direct
it here in a timely manner. Christian wanted to get some feedback from
the group before finishing their implementation. There are a number of
things in here that we need to discuss.

---------------------------------------------------------------------

Hi all,

netlabs.org currently is implementing a PHP library supporting most
parts of RDFa API and RDF API specs according to the current working drafts.

This library is not intended to be used in a browser-based environment,
but for RDF data specific tasks in e.g. the server back-end, so that we
also here take advantage of leaner and better readable code, compared to
other approaches.

Before going further with the implementation some missing parts, we
would like to understand the intentions behind the API specs a bit
better, and for that purpose I would like to discuss it in the context
of the intended, browser-based environment. If the drafts or any other
reading could provide answers already, I wasn't able to find the answers
so far and would greatly appreciate any reference.

At first, with the RDFa API it seems to be clear that the data that can
be accessed is the data from the web document itself, and is available
as soon as the document is loaded (and JavaScript is being executed).
With the RDF API spec this is not clear to me: is it that the document
data is available fom initialization on as well or has a parse step to
be executed in any way before the Basic API or Projections could provide
access to RDF data ?

Second, if a parse step had taken place, does the Data interface from
that point of time provide access to a) only the newly parsed RDF data
or b) to the data of the document and the parsed data as they are merged?

Third, if (at all) the Data interface was to provide access to the newly
parsed data via the Basic API as well, and not only via Projections
(which have already been prepared by the parse step), is it intended
that implementers calculate the results of the Basic API methods by
accessing the Projections?

The reason for this question is that I started out with implementing the
Basic API first. The Data interface supports a very basic parsing method
and holds the parsed data (currently ARC triple array) in a private
member and calculates all required results of Basic API methods from
that. The projections get passed the Data object to the constructor so
that they can use the Basic API to fulfill the requests put by the
Projection interface.

Now I am at the step of implementing the parse method with the RDFParser
interface which is intended to do the parsing. If now RDFParser would do
the parsing and export only the projections, the Data interface had
nothing else available than only the projections to support the Basic API.

TIA, Christian

-------------------------------------------------

Christian Langanke
cla@clanganke.de

-------------------------------------------------

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarm Developer Tools and Demo Released
http://digitalbazaar.com/2011/05/05/payswarm-sandbox/

Received on Tuesday, 16 August 2011 20:08:36 UTC