- From: Toby Inkster <tai@g5n.co.uk>
- Date: Sun, 10 Oct 2010 11:06:53 +0100
- To: nathan@webr3.org
- Cc: Tim Berners-Lee <timbl@w3.org>, Ivan Herman <ivan@w3.org>, RDFA Working Group <public-rdfa-wg@w3.org>
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>
Received on Sunday, 10 October 2010 10:07:23 UTC