w3c / microdata-rdf

Specification of the extraction/transformation of Microdata content to RDF
15 stars 9 forks source link

Should the registry allow property datatype specification #3

Closed gkellogg closed 9 years ago

gkellogg commented 9 years ago

This reproduces the original W3C Tracker Issue #3.

Currently, @itemprop values are either plain literals or URI refs, depending on the element and attributes used (@datetime will create a limited set of typed literals).

Should there be a mechanism, such as property-specific information in a vocabulary registry, for specifying the range of a property and coercing values to that datatype if there is a lexical match?

A JSON representation could be something like:

{
  "http://schema.org/" {
    "coerce": {
      "dateCreated": "http://www.w3.org/2001/XMLSchema#date",
      "price": [
        "http://www.w3.org/2001/XMLSchema#decimal",
        "http://www.w3.org/2001/XMLSchema#string"],
      }
    }
  }
gkellogg commented 9 years ago

The published Note does not do any data typing, except for interpreting the value of @datetime in the <time> element.

gkellogg commented 9 years ago

The consensus is that datatypes are only derived from HTML semantics, so that only <time> values have a datatype other than plain.