Re: [rdfaapi] setMapping() should be avaiable at the top level

+1

Ivan

On Jun 12, 2010, at 17:49 , Mark Birbeck wrote:

> 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)
> 


----
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, 14 June 2010 10:58:24 UTC