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

Re: RDFa API - adding Namespace

From: Nathan <nathan@webr3.org>
Date: Mon, 11 Oct 2010 09:19:43 +0100
Message-ID: <4CB2C89F.2000105@webr3.org>
To: Ivan Herman <ivan@w3.org>
CC: Toby Inkster <tai@g5n.co.uk>, Tim Berners-Lee <timbl@w3.org>, RDFA Working Group <public-rdfa-wg@w3.org>
perhaps if we ask "why not add it?", is there a good reason not to?

Ivan Herman wrote:
> I believe you. But that by itself is not a reason not to have it as part of the core API. If it is there, everyone can count on it by default.
> 
> (One could argue the same about the Namespace facility I was referring to in Python/RDFLib. After all, it is nothing else than a dictionary, in Python terms, mapping terms to URI References. Anyone could do that, but it surely damn useful that it is just there...)
> 
> Ivan
> 
> On Oct 10, 2010, at 12:06 , Toby Inkster wrote:
> 
>> On Sat, 09 Oct 2010 18:44:16 +0100
>> Nathan <nathan@webr3.org> wrote:
>>
>>> foaf('name');
>> This is probably something that doesn't need to be done as part of the
>> API itself. Individual scripters or library/toolkit authors can very
>> easily implement something like that on top of the API.
>>
>> 	function prefixMapper (p)
>> 	{
>> 		return function (s) { return p+s; };
>> 	}
>>
>> 	var foaf = prefixMapper('http://xmlns.com/foaf/0.1/');
>> 	var dc   = prefixMapper('http://purl.org/dc/terms/');
>>
>> 	window.alert(foaf('name'));
>> 	window.alert(dc('title'));
>>
>> -- 
>> Toby A Inkster
>> <mailto:mail@tobyinkster.co.uk>
>> <http://tobyinkster.co.uk>
>>
>>
> 
> 
> ----
> Ivan Herman, W3C Semantic Web Activity Lead
> Home: http://www.w3.org/People/Ivan/
> mobile: +31-641044153
> PGP Key: http://www.ivan-herman.net/pgpkey.html
> FOAF: http://www.ivan-herman.net/foaf.rdf
> 
> 
> 
> 
> 
Received on Monday, 11 October 2010 08:20:28 UTC

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