- From: Mark Birbeck <mark.birbeck@webbackplane.com>
- Date: Sat, 12 Jun 2010 16:49:10 +0100
- To: RDFa WG <public-rdfa-wg@w3.org>
Since mappings can be used in functions that are defined to be used by
'entry-level' programmers, such as getItemsByType():
var people = document.getItemsByType("foaf:Person");
then it makes sense that programmers should be able to set those
mappings from an 'entry-level' interface.
So, instead of this:
document.data.context.setMapping("foaf", "http://xmlns.com/foaf/0.1/");
programmers should be able to do this:
document.setMapping("foaf", "http://xmlns.com/foaf/0.1/");
A full example would therefore be:
document.setMapping("foaf", "http://xmlns.com/foaf/0.1/");
var people = document.getItemsByType("foaf:Person");
(This is probably best achieved by moving the default DataContext
object to the document object, but the 'how' is a separate
discussion.)
Regards,
Mark
--
Mark Birbeck, webBackplane
mark.birbeck@webBackplane.com
http://webBackplane.com/mark-birbeck
webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)
Received on Saturday, 12 June 2010 15:49:44 UTC