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

ISSUE-28: Re: 3 Minor issues spotted

From: Manu Sporny <msporny@digitalbazaar.com>
Date: Sun, 01 Aug 2010 14:53:03 -0400
Message-ID: <4C55C28F.20101@digitalbazaar.com>
To: RDFa WG <public-rdfa-wg@w3.org>
On 06/19/2010 10:31 AM, Nathan wrote:
> During my previous exercise I spotted a few little things, as follows:
> 
> DataContext::setMapping (in DOMString prefix, in DOMString iri);
> Perhaps could be
> DataContext::setMapping (in DOMString prefix, in IRI iri);

When creating the RDFa API, we wanted to ensure that most of the API
could be utilized by using strings. In other words, we didn't want to
make people create IRI objects just to pass them into the RDFa API
methods when a simple string would convey the information needed by the
RDFa API. In other words, this:

DataContext.setMapping("foaf", "http://xmlns.com/foaf/0.1/");

is better than this:

DataContext.setMapping("foaf", IRI("http://xmlns.com/foaf/0.1/"));

Does that rationale resonate with you?

> Perhaps these two methods could have their signatures aligned (predicate
> - probably tying in with the above, all DOMString or all IRI):
> 
> DataStore::filter(in Object? subject, in optional IRI? predicate
> DataParser::iterate(in Object? subject, in optional DOMString? predicate

'IRI? predicate' was a bug, thanks for catching that - it's been changed
it to 'DOMString? predicate'.

There is another request floating out there to change all of these from
'DOMString' to just 'string', which I think would be a good move. I
haven't made the change yet because I don't know if WebIDL 'string'
supports i18n (I assume it does, but wanted to double-check before
making the change). This change would be a step towards a unified RDF
API in non-browser environments.

> DocumentData has the createParser( type , store ) method, but DataParser
> has no constructor which accepts a type, or any way of setting the type.

I have added a property called "type" to the Data Parser interface.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: WebApp Security - A jQuery Javascript-native SSL/TLS library
http://blog.digitalbazaar.com/2010/07/20/javascript-tls-1/
http://blog.digitalbazaar.com/2010/07/20/javascript-tls-2/
Received on Sunday, 1 August 2010 18:53:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:07 GMT