RDF中的数据类型由两部分组成:XML Schema built-in Datatypes 及 RDF built-in Datatype -- rdf:XMLLiteral。 {{ RDF uses the datatype abstraction defined by XML Schema Part 2: Datatypes [XML-SCHEMA2], and may be used with any datatype definition that conforms to this abstraction, even if not actually defined in terms of XML Schema. RDF predefines just one datatype rdf:XMLLiteral, used for embedding XML in RDF (see section 5). }} {{ // http://www.w3.org/TR/2004/REC-owl-ref-20040210/#rdf-datatype Data values are instances of the RDF Schema class rdfs:Literal. Literals can be either plain (no datatype) or typed. Datatypes are instances of the class rdfs:Datatype. In RDF/XML, the type of a literal is specified by an rdf:datatype attribute of which the value is recommended to be one of the following: A canonical URI reference to an XML Schema datatype of the form: http://www.w3.org/2001/XMLSchema#NAME where "NAME" should be the name of a simple XML Schema built-in datatype, as defined in Section 3 of [XML Schema Datatypes], with the provisos specified below. The URI reference of the datatype rdf:XMLLiteral. This datatype is used to include XML content into an RDF/OWL document. The URI reference of this datatype is: http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral ...... When using datatypes, please note that even if a property is defined to have a range of a certain datatype, RDF/XML still requires that the datatype be specified each time the property is used. }} 注意区别:rdf:datatype 与 rdfs:Datatype rdf:datatype是一个RDF/XML中的语法成分(一个attribute),用于在书写typed literal时,指定数据类型。 rdfs:Datatype是一个概念成分(rdfs:Class的子类),是RDF中所有数据类型的超类,rdf:XMLLiteral(已在RDF模型中定义)和XML Schema Datatype(用户在使用时定义)都是它的子类。