RDFa API Questions and Comments

Hi All,

Great effort with the RDFa API thus far, looks extremely useful!

First, to perhaps contribute something (if it hasn't already been 
suggested in the archives).

I noted under future discussion, the following point:
   'A mechanism to load and process triples from remote documents.'

The RDFa API currently provides the following method:
   parser.parse( document );

And XHR [1] has the following attribute:
   xhr.responseXML

which returns a 'Document'

So this may already be covered for any mediatype which is text/xml, 
application/xml or ends in +xml.

Outside of this there is the DOMImplementation.createDocument method, 
but I'm unsure how you could turn the XHR.responseText in to a Document 
(surely there must be a way??)


Questions:

1: how do you get all data (triples)?
( read this as, please consider adding a DataStore.getAll() method )

2: merging stores?
given the following example:

var rdfa = document.data.createParser("rdfa", document.data.createStore() );
rdfa.parse();
var hcard = document.data.createParser("hCard", 
document.data.createStore() );
hcard.parse();

then rdfa.store will hold all the rdfa data, and hcard.store will hold 
all the hcard data. (?) how would one merge all the data from the two 
stores in to a single new one?

( read as, is there scope for a DataStore.addStore( DataStore ) - which 
would work with return from DataStore.filter() and give a nice amount of 
functionality ).


Best,

Nathan

Received on Wednesday, 9 June 2010 02:25:26 UTC