w3c / microdata

Moved to https://html.spec.whatwg.org/multipage/microdata.html
15 stars 19 forks source link

RDFa should generate to RDFa Lite #79

Closed iherman closed 6 years ago

iherman commented 7 years ago

At present, the RDFa generation does not generate RDFa Lite. I also believe that by changing, in step 5, the reference to the about attribute to resource would make the trick. The way microdata uses itemid will lead, I believe, identical results.

(I admit my RDFa becomes a bit rusty, so I rely on @gkellogg to watch over my shoulders…)

iherman commented 7 years ago

Back in the days the definition of RDFa Lite was greatly influenced by microdata, and I believe there are processors out there that process RDFa Lite only. Hence this issue…

gkellogg commented 7 years ago

You can view the result of my to-RDFa and to-JSON-LD algorithms on my distiller.

There are cases where I use @about instead of @resource, for example, if there is no@property on the element. When we know literal types, we could be using @datatype, or we could be sure to use the same element on output as we do on input, so that the semantics of @datetime, and meter, remain consistent between the encodings, but this might not stay strictly within RDFa Lite, but use some of the congruent features from HTML5+RDFa.

iherman commented 7 years ago

@gkellogg do you have a specific example that we can look at for this? I would find it a real pity if we were forced to move away from RDFa Lite...

gkellogg commented 7 years ago

There is a small window where an element has @itemprop, @itemid, and @itemscope and @data (<object itemid="#foo" itemscope itemprop="bar" data="#baz">...</object>), but it's a pretty narrow window 😄 . I think we can pretty safely just rely on @resource.