- From: Robin Berjon <robin@berjon.com>
- Date: Wed, 5 May 2010 15:05:57 +0200
- To: Manu Sporny <msporny@digitalbazaar.com>
- Cc: WebApps WG <public-webapps@w3.org>
Hi Manu,
On May 1, 2010, at 08:03 , Manu Sporny wrote:
> This is a call to see if anyone from this WG can do a quick high-level
> review of the RDFa DOM API. We are planning a FPWD in a week or two and
> would like to see if what we have so far is a good start, makes sense to
> those unfamiliar with RDF/RDFa, and what improvements we should make in
> the coming months to make the API useful for developers. The latest
> (FPWD-ready) document is here:
>
> http://www.w3.org/2010/02/rdfa/drafts/2010/WD-rdfa-dom-api-20100429/
Just a very quick review.
- Why would anyone want to capture PlainLiteral values in a specific encoding? Since the value is provided as a DOMString, it should just be that — a string, with any original encoding information forgotten. Otherwise, you should use a binary type to capture the value (maybe a Blob) but I really don't see why.
- element points to the "first node in the DOM tree that is associated with this PlainLiteral". I'm not sure what that means.
- language is said to be a "two character language string as defined in [BCP47]". BCP47 has language codes that have more than two letters. Also, if the source language is not BCP47 conformant, is it exposed?
- I'm not sure that I fully grasp the full value of the IRI interface. When TypedLiteral's type field returns an IRI, what is the IRI's element?
- "xsd:DataTime" typo?
- "Any valueOf ();" isn't it "any"? (It's not clear in WebIDL)
- JS doesn't have a DateTime object, just a Date.
- Constructing a triple seems painful:
var trip = new RDFTriple(new IRI("http://foo..."), new IRI("http://bar..."), new IRI("http://dahut..."));
I can see why from the draft, but shortcuts would help. Or maybe it's a library thing.
- forEach: you can either define it as receiving just "Function" so that it gets a function. That's fine, but it doesn't tell you what that function is called with. The other option is to have it receive a FooCallback object, which is in turn defined as an interface with a single method that has the signature you expect, and has [FunctionOnly, NoInterfaceObject].
- any reason why RDFTripleList wouldn't stringify to a list of RDFTriples?
- VERSION. Don't. API versioning doesn't work, in fact it doesn't exist.
- I'm not sure that I understand the value of the "Convenient IRI Mapping". The intent that I understand is to have:
rdfa.foo.bar # http://foo.com/ns#bar
rdfa.dahut.hunting # http://dahutsgalore.org/vocabularies/hunting
rdfa.dahut.unicorns # http://w3.org/2009/dap
It seems that the proposed solution is that you must first:
rdfa.setMapping("foo", "bar", "http://foo.com/ns#bar");
rdfa.setMapping("dahut", "hunting", "http://dahutsgalore.org/vocabularies/hunting");
rdfa.setMapping("dahut", "unicorns", "http://w3.org/2009/dap");
What's the added value over:
var myMap = { foo: { bar: "http://foo.com/ns#bar" },
dahut: { hunting: "http://dahutsgalore.org/vocabularies/hunting",
unicorns: "http://w3.org/2009/dap" }};
?
--
Robin Berjon - http://berjon.com/
Received on Wednesday, 5 May 2010 13:06:31 UTC