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

Re: New Editor's Draft for RDFa API

From: Nathan <nathan@webr3.org>
Date: Mon, 04 Apr 2011 03:35:15 +0100
Message-ID: <4D992E63.9090706@webr3.org>
To: Manu Sporny <msporny@digitalbazaar.com>
CC: RDFa WG <public-rdfa-wg@w3.org>
Hi Manu,

Looking good on an initial read, only one question.. what would one ever 
use createDocumentData() for? and one comment, you may need to watch for 
the optionals, as it's overloading and means the arguments can be 
omitted, so for instance::

   getProjections (in optional DOMString? property, in optional 
DOMString? value, in optional object template);

would allow only value, or only template, to be passed. In the case of 
the above method, I'd suggest that it's specified as:

getProjections(in optional object template);
getProjections(in DOMString? property, in DOMString? value, in optional 
object template);

note the trailing ? which allows the arguments to be nullable, this 
would allow usage as such:

   data.getProjections()
   data.getProjections(template)
   data.getProjections("rdf:type", "foaf:Person")
   data.getProjections("rdf:type", "foaf:Person", template)
   data.getProjections(null, ":me");

and /not/ the following, which would currently be allowed:

   data.getProjections("foaf:Person")

reference:
   http://dev.w3.org/2006/webapi/WebIDL/#idl-operations
   http://dev.w3.org/2006/webapi/WebIDL/#idl-nullable-type

Best,

Nathan

Manu Sporny wrote:
> There's a new RDFa API ED containing changes that Ivan and Nathan
> requested. Lots of cleanup and ensuring consistency throughout the
> document. We could do a new Working Draft publishing cycle with this one:
> 
> http://www.w3.org/2010/02/rdfa/sources/rdfa-api/
> 
> Updates:
> 
> * Revised all of the .getItem*() calls, renamed/reworked to
>   getProjection().
> * Added Ivan's getSubjects()/getProperties() calls, added
>   Nathan's getValues() call.
> * Shuffled the location of the calls around - moved the
>   data-specific calls to document.data
> * Lots of language cleanup and consistency cleanup.
> 
> -- manu
> 
Received on Monday, 4 April 2011 02:36:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:51 UTC