Re: Mapping Microdata to RDF

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 UTC