W3C home > Mailing lists > Public > public-html-data-tf@w3.org > October 2011

Re: Mapping Microdata to RDF

From: Gregg Kellogg <gregg@kellogg-assoc.com>
Date: Mon, 10 Oct 2011 18:22:04 -0400
To: Lin Clark <lin.w.clark@gmail.com>
CC: Jeni Tennison <jeni@jenitennison.com>, "public-html-data-tf@w3.org" <public-html-data-tf@w3.org>
Message-ID: <93B50719-C0C6-4715-89AA-CECFF2BE6296@greggkellogg.net>
On Oct 10, 2011, at 2:39 PM, Lin Clark wrote:


 <span itemscope><span itemprop="name">Gregg Kellogg</span></span>

(not nested within some other element with an itemtype on it) then it will produce the microdata:

   {
     "properties": {
       "name": [
         "Gregg Kellogg"
       ]
     }
   }

So rather than not producing any RDF at all (which is what I think step 6.2.1 is saying), I think it should produce:

 [] <#name> "Gregg Kellogg" .

where the base URI (which the #name will be concatenated to) is based on the document base URI.

I agree. My (untested) opinion is that this is closer to user expectations than having no RDF produced for annotated content.

Actually, I think it would produce

[] <name> "Gregg Kellogg" .

without the "#". The trend is to move away from automatically adding "#" to URIs, note that the Turtle spec no longer implicitly defines '@prefix : <#> .' as N3 does. I'm not sure we should be sticking one on arbitrarily here. Note that URI resolution uses join semantics (merge paths) [1], so any trailing path-component would be removed even if the relative URI begins with a "#".

In JSON-LD and RDFa, if there is an @vocab defined, we would just append it to @vocab. We discussed removing @vocab from JSON-LD, because it is similar to @base, but in that case we (many of us anyway) felt it was important to to have a different base for resolving vocabulary uses. Also, vocabulary URI resolution tends to use string concatenation rather than URI join semantics, so <#name> wouldn't end up doing a simple append, unless the path ends with a "/".

We could define an internal "default vocabulary" initialized from document base, where we could append a "/" or "#" if it did not already exist and define that string concatenation is used to create predicate URIs in the case there is no in-scope @itemtype URI.

Gregg

[1] http://tools.ietf.org/html/rfc3986#section-5.2
Received on Monday, 10 October 2011 22:22:47 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 10 October 2011 22:22:48 GMT