W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > January 2011

Re: PROPOSAL to close ISSUE-61: Does the RDFa API need a vocabulary helper

From: Nathan <nathan@webr3.org>
Date: Thu, 13 Jan 2011 10:11:11 +0000
Message-ID: <4D2ECFBF.1020107@webr3.org>
To: Ivan Herman <ivan@w3.org>
CC: Manu Sporny <msporny@digitalbazaar.com>, RDFa WG <public-rdfa-wg@w3.org>, Tim Berners-Lee <timbl@w3.org>
Ivan Herman wrote:
>> That said, in a previous revision of the api, there was another (disputed iirc) approach, which was to change the return type of Profile::setPrefix from void to a "PrefixResolver", so you'd:
>>
>>  foaf = rdf.setPrefix('foaf', 'http://xmlns.com/foaf/0.1/');
>>
>> then you could do:
>>
>>  foaf('name')
>>  rdf.resolve('foaf:name')
>>  rdf.prefixes.foaf + name
>>  ...
> 
> This is actually very close to what I am used to, which is
> 
> foaf = Namespace('http://xmlns.com/foaf/0.1/')

indeed, it's a combination of both approaches :)

> although, for my instinct, the first argument ('foaf') is actually superfluous. But I can live with that...

The first argument enables the rdf.resolve('foaf:name') and 
rdf.prefixes.foaf functionality to still be used, giving users a choice 
in how they prefer to resolve URIs - if the dictionary prefixes.foaf and 
curie resolve() methods were removed from the API all together though, 
then yes it would be superfluous.

Best,

Nathan
Received on Thursday, 13 January 2011 10:13:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:08 GMT