XML schema and RDF datatypes [was: comments...]

From: Dan Connolly (connolly@w3.org)
Date: 10/01/01

"Peter F. Patel-Schneider" wrote:
> b/ In my view, the RDF Core WG is only hurting itself and RDF by moving
>    further from XML Schema standards with respect to literals.  Again in
>    my view, they should be exploring mechanisms for bringing RDF literals
>    in line with XML Schema datatypes, and not inventing a new, complex
>    syntax.

The RDF Core WG isn't "moving further from XML Schema"; we're
just clarifying the language. RDF 1.0 has string literals
(and XML-element-content literals) and that's it.

It's straightforward to make an RDF 1.1 that moves closer
to XML Schema by using its way of writing integer literals:

	<rdf:RDF xmlns:rdf="http://www.w3.org/2001/10/@@/rdf-bis"
	  <ex:name>John Doe</ex:name>
	  <ex:shoeSize xsi:type="dt:integer">10</ex:shoeSize>

but that language is not RDF 1.0. RDF 1.0 tools won't understand it.

But it does have an equivalent expression in RDF 1.0 (provided
the RDF WG decides that rdf:value works this way, which I
think we will):

	<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	  <ex:name>John Doe</ex:name>
	  <ex:shoeSize><dt:integer" rdf:value="10"/></ex:shoeSize>

and we can convert from one to the other in automated fashion
for transitional purposes. (though, taking a look at this example,
it doesn't seem worth the bother... the rdf-bis syntax isn't
*that* much nicer. I think there's a good chance that rdf:parseType
will be obsoleted in favor of xsi:type, though.).

It's also possible to design a language where the type of
a literal may *depend* on a declaration from an XML schema:

	<kr:KRLang xmlns:rdf="http://...new-kr-lang..."
	  <ex:name>John Doe</ex:name>

so that the "10" above is not a logical constant at all;
not until you find a/the schema for http://example/vocab
do you know how to parse/interpret "10"... i.e. the
meaning of that chunk of XML is dependent on all the
trust issues around following links from one document
to another (not to mention a complete implementation
of XML Schema, an effort several orders of magnitude
larger than an RDF 1.0 parser).

This sort of language is not a candidate for a future
version of RDF: it fails to meet
one of the basic requirements of RDF: that an RDF document
stands on its own as a logical formula.

Dan Connolly, W3C http://www.w3.org/People/Connolly/

This archive was generated by hypermail 2.1.4 : 04/02/02 EST