rdfs:Datatype                                          

Definition

rdfs:Datatype is the class of datatypes. All instances of rdfs:Datatype correspond to the RDF model of a datatype described in the RDF Concepts specification [RDF-CONCEPTS] (copied below)

rdfs:Datatype is both an instance of and a subclass of rdfs:Class. Each instance of rdfs:Datatype is a subclass of rdfs:Literal.

Schema

    <rdfs:Class rdf:about="http://www.w3.org/2000/01/rdf-schema#Datatype">

        <rdfs:isDefinedBy rdf:resource="http://www.w3.org/2000/01/rdf-schema#"/>

        <rdfs:label>Datatype</rdfs:label>

        <rdfs:comment>The class of RDF datatypes.</rdfs:comment>

        <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/>

    </rdfs:Class>

Example listing

Triple

    xsd:integer   rdf:type   rdfs:Datatype .

RDF/XML

    <rdfs:Datatype rdf:about="&xsd;integer"/>

    <rdfs:Datatype rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">

        <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>

        <rdfs:isDefinedBy rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>

        <rdfs:label>XMLLiteral</rdfs:label>

        <rdfs:comment>The class of XML literal values.</rdfs:comment>

    </rdfs:Datatype>

Other information

The datatype abstraction used in RDF is compatible with the abstraction used in XML Schema Part 2: Datatypes [XML-SCHEMA2].

A datatype consists of a lexical space, a value space and a lexical-to-value mapping.

The lexical space of a datatype is a set of Unicode [UNICODE] strings.

The lexical-to-value mapping of a datatype is a set of pairs whose first element belongs to the lexical space of the datatype, and the second element belongs to the value space of the datatype:

A datatype is identified by one or more URI references.

RDF may be used with any datatype definition that conforms to this abstraction, even if not defined in terms of XML Schema.

Certain XML Schema built-in datatypes are not suitable for use within RDF. For example, the QName datatype requires a namespace declaration to be in scope during the mapping, and is not recommended for use in RDF. See a more detailed discussion of specific XML Schema built-in datatypes.

Note: When the datatype is defined using XML Schema:

From RDF Concepts

Datatypes are used by RDF in the representation of values such as integers, floating point numbers and dates.

A datatype consists of a lexical space, a value space and a lexical-to-value mapping.

For example, the lexical-to-value mapping for the XML Schema datatype xsd:boolean, where each member of the value space (represented here as 'T' and 'F') has two lexical representations, is as follows:

Value Space {T, F}
Lexical Space {"0", "1", "true", "false"}
Lexical-to-Value Mapping {<"true", T>, <"1", T>, <"0", F>, <"false", F>}

RDF predefines just one datatype rdf:XMLLiteral, used for embedding XML in RDF.

There is no built-in concept of numbers or dates or other common values. Rather, RDF defers to datatypes that are defined separately, and identified with URI references. The predefined XML Schema datatypes [XML-SCHEMA2] are expected to be widely used for this purpose.

RDF provides no mechanism for defining new datatypes. XML Schema Datatypes [XML-SCHEMA2] provides an extensibility framework suitable for defining new datatypes for use in RDF.

Use in ISO 15926