RDF datatyping desiderata

Graham Klyne

11-Jan-2002

This note is excerpted and updated from section 1.2 of Sergey Melnik's document [1] on RDF datatyping proposals. It's purpose is to list a number of criteria that may be used to evaluate alternative proposals for datatyping in RDF, with particular concern for the the value types represented by literals in RDF.

Desiderata for RDF Datatyping

  1. Backward compatibility

  2. Ability to use built-in primitive XML Schema datatypes

  3. Ability to use non-XML-Schema datatypes

  4. Ability to define datatypes using schema languages rather than relying on "built-in" data types.

  5. Ability to represent type information without an associated RDF schema

  6. Ability to reference type information in an associated RDF schema

  7. Co-existence of "global" and "local" typing mechanisms

  8. Provide account of datatyping scheme semantics

  9. Support for existing data typing idioms

Notes

1. Backward compatibility

The goal here is that existing use of RDF, RDF-handling software and RDF-based specifications will continue to be valid, and (as far as possible) produce results as intended by their authors.

2. Use of XML-schema datatypes

The datatyping proposal should provide an account of how the XML schema Built-in Primitive Datatypes [3] can be used with RDF. No goal is currently expressed with respect to use of derived or composite XML Schema datatypes.

(XML Schema is not intended to be used for defining/constraining RDF/XML syntax or RDF graph structures for the purposes of datatyping.)

3. Use of non-XML-Schema datatypes

The datatyping proposal should not preclude the use of non-XML-schema datatypes, such as custom or user-defined datatypes, or those from major components external to RDF, like SQL or UML datatypes.

4. Use of schema-defined datatypes

The datatyping proposal should not preclude using schema languages to define data types, rather than relying on "built-in" predefined data types. The proposal is not expected to give an account of any such schema language.

(This goal probably follows from 3.)

5. Represent type without associated RDF schema

It should be possible to include typing information to an RDF graph without depending on a (separately defined) RDF schema.

6. Reference type information in associated RDF schema

It should be possible to include typing information in an RDF graph by referencing an associated RDF schema.

7. Co-existence of global and local typing mechanisms

One of the dimensions by which one can categorize datatyping proposals is by whether individual values are explicitly or implicitly typed, e.g. whether each occurrence needs to specify xsd:integer (explicit) or whether xsd:integer is specified as the rdfs:range of the property (implicit). RDF should allow users to choose either approach, and this approach is adopted in DAML+OIL. The use of implicit typing allows for compatibility with existing RDF data and much XML data. The use of both implicit and explicit typing allows for an extra check on the appropriateness of input. The use of explicit typing allows for direct control of the typing of data.

It should be possible for both forms of datatyping to coexist in the same RDF graph.

Adapted from:

(This looks rather like a restatement of goals 4, 5 above.)

8. Provide account of datatyping scheme semantics

The datatyping proposal should include a full account of data typing semantics, and how data typing interacts semantically with the other elements of RDF. This would preferably be expressed in terms of how the data typing proposal uses and/or extends the defined RDF model theory [2].

9. Support for existing data typing idioms

A number of idioms have been suggested for representing datatype information in an RDF graph. It is claimed or suggested that these are currently used in RDF.

These idioms are enumerated below using Notation-3 [4]. The descriptions below are intended to convey the graph form used, while being agnostic about issues of semantic denotation. The data typing proposals would need to provide an account of denotations used for any supported idiom.

In each case, the intent is to express that Jenny has a birth date of 15 July 2001.

Idiom A:
person:Jenny exA:birthDate
  [ exA:date "2001-07-15" ] .

(Adapted from [1])

Idiom B:
person:Jenny exB:birthDate "2001-07-15" .

(Adapted from [1])

Idiom P:
person:Jenny exP:birthDate "2001-07-15" .
exP:birthDate rdfs:range exP:date .

(Adapted from http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Jan/0045.html)

Idiom D:
Jenny exD:birthDate
  [ rdf:value "2001-07-15" ;
    rdf:type exD:date ] .

(Adapted from http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2002Jan/0045.html)

(Also, a similar usage can be seen in RDFM&S [5], section 7.3.)

References

[1] Sergey Melnik, RDF Datatyping

[2] Pat Hayes, RDF model theory

[3] XML Schema Datatypes, Built-in Primitive Datatypes

[4] Notation-3

[5] RDF Model and Syntax Specification, 22-Feb-1999

 


Last modified: Fri 11-Jan-2002 , GK