RDF Datatyping


This document summarizes the common understanding of the RDF Core Working Group (further referred to as WG) with regards to the theoretical foundation for datatyping of literal values and serves as a basis of definition, discussion, and comparison of all proposed schemes for achieving a complete datatyping solution which are to be considered by the WG.

Status of this Document

The document has no normative status and merely provides a reference for an ongoing discussion within the WG.


This document includes contributions of almost all members of the WG, in particular those provided by

Many other WG members not listed above have helped to shape this document.

Table of Contents

1 Introduction
1.1 Scope
2 Type system
3 Datatyping schemes

1 Introduction

1.1 Scope

The RDF Core Working Group is not chartered to develop a separate data typing language that duplicates facilities provided by XML Schema data types (see
RDF Core WG Charter).

1.2 Desiderata for RDF Datatyping

The desiderata (which may or may not constitute requirements) are detailed separately in [link to Graham's desiderada doc].

(@@@ Or should Graham's doc be merged back into here? ;-)

1.3 Deliverables of RDF Datatyping

2 Type System

The conceptual framework for datatyping presented in this document is based on the type system defined in the "XML Schema Part 2: Datatypes"
[XSD]. This section explains how the relevant terms and concepts defined in [XSD] are expressed using the model-theoretic semantics for RDF defined in the "RDF Model Theory Working Draft" [RDF MT].

2.1 Datatype mapping

[XSD] defines a datatype as a 3-tuple, consisting of a) a set of distinct values, called its value space, b) a set of lexical representations, called its lexical space, and c) a set of facets that characterize properties of the value space, individual values or lexical terms. [XSD] implicitly assumes a fourth component, which we call datatype mapping, to be part of the datatype.

[Definition:]  A datatype mapping is a set of pairs whose first element belongs to the value space of the datatype, and the second element belongs to the lexical space of the datatype. A datatype mapping satisfies the following properties:

  1. Each element of the lexical space maps to exactly one element of the value space.
  2. Each element of the value space has at least one lexical representation.

(@@@ is the second condition necessary? Should we distinguish between partial and complete datatype mappings?)

Datatype mapping for a datatype "boolean". Each element of the value space has two lexical representations.
Value space: {T, F}
Lexical space: {"0", "1", "true", "false"}
Datatype mapping: {<T, "true">, <T, "1">, <F, "0">, <F, "false">}

2.2 Canonical datatype mapping

As specified in
[XSD], a canonical lexical representation is a set of elements from the lexical space of a datatype such that there is a one-to-one mapping between elements in the canonical lexical representation and elements in the value space. This mapping is referred to as canonical datatype mapping.

[Definition:]   A canonical datatype mapping is a subset of a datatype mapping that establishes a one-to-one correspondence between elements in the canonical lexical representation and elements in the value space.

A canonical datatype mapping for the datatype "boolean" of previous example.
Canonical datatype mapping: {<T, "true">, <F, "false">}

3 Datatyping Schemes

[Definition:]  A datatyping scheme is a convention for representing and using datatypes in RDF.

A datatyping scheme describes how

are represented, either explicitly or implicitly, in RDF graphs (using one or several nodes, resources, literals, and statements), and interpreted using model-theoretic semantics.

[RDF MT] explains the fundamental model-theoretic concepts like interpretation, universe, extension etc. used for interpreting the semantics of RDF graphs. This document assumes familiarity with these basic concepts, as likely do all datatyping scheme proposals based on this document.


Specification and interpretation of datatype facets is out of scope of this document.


Object Management Group. Common Warehouse Metamodel 1.0. Feb 2001. Available at: ftp://ftp.omg.org/pub/docs/ad/01-02-01.pdf
Object Management Group. Unified Modeling Language 1.4. Sep 2001. Available at: ftp://ftp.omg.org/pub/docs/formal/01-09-67.pdf
Dan Connoly. PL: how a PERL programmer might do datatypes in RDF. Available at: http://lists.w3.org/Archives/Public/w3c-rdfcore-wg/2001Dec/0003.html
[RDF Core WG Charter]
W3C RDF Core Working Group Charter. Mar 2001. Available at: http://www.w3.org/2001/sw/RDFCoreWGCharter
W3C RDF Model Theory Working Draft. Sep 2001. Available at: http://www.w3.org/TR/2001/WD-rdf-mt-20010925/
[RDF Schema]
W3C RDF Schema Recommendation. ? 200?. Available at: http://www.w3.org/?
World Wide Web Consortium. XML Schema Part 2: Datatypes. Available at: http://www.w3.org/TR/xmlschema-2/

Last modified: Fri Dec 14 10:34:16 PST 2001