W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > October 2010

Re: RDFa API - adding Namespace

From: Nathan <nathan@webr3.org>
Date: Tue, 12 Oct 2010 01:47:48 +0100
Message-ID: <4CB3B034.5010907@webr3.org>
To: Manu Sporny <msporny@digitalbazaar.com>
CC: RDFA Working Group <public-rdfa-wg@w3.org>, Tim Berners-Lee <timbl@w3.org>
Manu Sporny wrote:
> Why not this?
> 
> var c = document.data.context.resolveCurie;
> c("foaf:name");

I'm equally happy with that :) might be nice to have as an example 
somewhere in the api documentation.

> Does this mean we need a getMapping() call as well?

actually regardless of this discussion we do need a getMapping or getMap 
or some method that exposes the CURIE map added to the DataContext 
interface, specifically for DataSerializer's (not spec'd yet but should 
be considered even if we don't spec)

> We can already do this with the current API, can't we? Why is this not
> sufficient?
> 
> var c = document.data.context.resolveCurie;
> var t1 = data.createTriple(me, c('rdf:type'), c('foaf:Person') );
> var t2 = data.createTriple(me, c('foaf:givenname') , myName );
> var t3 = data.createTriple(me, c('foaf:homepage') , myHomepage );
> var t4 = data.createTriple(me, c('foaf:knows') , c('mydoc:bob') );
> var t5 = data.createTriple(me, c('foaf:knows') , c('mydoc:sue') )

yup I like it, that'll do me fine - nice suggestion.

> We're mis-communicating. What I meant was that when someone is scanning
> a document for mentions of a CURIE, there are two patterns that they
> need to look for with the approach you outlined:
> 
> foaf('name') /and/ "foaf:name"
> 
> vs. what we have now, which is one pattern:
> 
> "foaf:name"

given the c = approach then yes this is better imo.

>> Well because it isn't supported by the current RDFa API, it's strictly
>> typed..
>>   createTriple (in RDFResource subject, in IRI property, in RDFNode
>> object);
> 
> Right, good point.
> 
> I think the points above still stand, what do you think?

yup agreed, and the above strict typing is catered for generally by the 
c = approach so something we can forget I think.

Nice one Manu,

Best,

Nathan
Received on Tuesday, 12 October 2010 00:48:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:05:21 UTC