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

htmldata-ISSUE-4 (Property as subject): Should the registry allow a property name or URI to be used as an alias for @itemid [Microdata to RDF]

From: HTML Data Task Force Issue Tracker <sysbot+tracker@w3.org>
Date: Sat, 05 Nov 2011 18:21:08 +0000
To: public-html-data-tf@w3.org
Message-Id: <E1RMkrc-00029C-Gn@lowblow.w3.org>

htmldata-ISSUE-4 (Property as subject): Should the registry allow a property name or URI to be used as an alias for @itemid [Microdata to RDF]


Raised by: Gregg Kellogg
On product: Microdata to RDF

Schema.org provides a 'url' property which, in practice, is used to set the subject for an item. Moreover, in many examples, the property is used with a literal content model, rather than a URI content model.

For example, the following use case is common in schema.org examples:

 <div itemprop="tracks" itemscope itemtype="http://schema.org/MusicRecording">
   <span itemprop="name">Rope</span>
   <meta itemprop="url" content="foo-fighters-rope.html">

In this case the @content attribute is used where the value is expected to be a URI. And, it is clear that this URI is intended as the subject of the item.

A registry entry could be created which would affect processing of a microdata processor by specifying a content model for the property (URI reference) and that it is to be used as the subject of an item. Note, that there is a special case where the item already has an @itemid attribute, or there are more than one 'url' property values. This could be resolved by using the first property value only if the item has no @itemid.

The suggested behavior would be to use the first 'url' property value both as the item subject and as a property and subsequent values as a property only.

For example, the previous microdata would produce the following Turtle:

<foo-fighers-rope.html> a schema:MusicRecording;
  schema:name "Rope";
  schema:url <foo-fighters-rope.html> .

A possible JSON representation of a registry that identifies this could be the following:

  "http://schema.org/": {
    "propertyURI": "vocabulary",
    "multipleValues": "unordered",
    "@context": {
      "url": { "@datatype": ["@subject", "@uri"]},
      "dateCreated": {"@datatype": "http://www.w3.org/2001/XMLSchema#date"},

This notation borrows some concepts from the JSON-LD context, but it is intended for discussion and is not proposed as a repository syntax. As the range is described, any use of this property would treat the value as a URI reference. As a by-product, this can be used for URIs (or IRIs) which are not URLs.

The 'url' refers to http://schema.org/url, and is defined both as having a URI reference data range, and to be used as an alias for the item subject. In contrast, http://schema.org/dateCreated is defined as having an xsd:date range, which would cause the resulting literal to have the associated datatype.
Received on Saturday, 5 November 2011 18:21:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:08:25 UTC