Datatyping: moving away from "literal as 3-part thing" to "literal as dt+opaque bit"

OK, I've already said this in the DT review, but at the last telecon I
was asked to expand on this a bit.

The current DT proposal document (at my last review of it) takes the
view that a literal (that is, a typed literal) is of the form:

	(datatype, unicode string, language, xml? bit)

[Patrick said, at the telecon, "xml:lang infects everything" as an
example of this view]

I would much rather take the following view: literals carry their type;
RDF "inherits" some literal types from its early incarnations (some of
which may or may not be half-baked), and RDF/XML provides syntactic
sugar to express literals of these types. There should be no "infection"
of new types by stuff like language properties, xml:base, etc.

That is,

	<eg:property xml:lang="en">fiddle</eg:property>

is simply syntactic sugar for what is *effectively*

	<eg:property rdf:BLAHtype="xxx:langstring">("fiddle","en")</eg:property>

and typed literals should simply be considered to be the pair

	(datatype, opaque)

where in this case, the opaque bit would be the pair ("fiddle", "en) and
the datatype would be URI of "language-tagged unicode strings".


That is, move away from a DT document that enshrines the cruft of
previous specs, while having a legal and consistent way of thinking
about it; and reject the notion that "xml:lang" values infect every
datatype (which is not impossible - it's the realm of the parser writer
to sort that out); similarly, reject the notion that non-xml typed
literals *must* carry an xml:base.

In fact, I'd say that xml:base might well be inherited by xml literals,
but by nothing else. We've support for those kinds of literals in the
RDF/XML syntax already.


In summary: I'd just like to see a cleaning up of the *conceptual*
notion of a literal, so the older baggage (lang tagging, etc) doesn't
become centrally written into the MT and so on. The notion of typed
literals gives us an "out" in this regard: RDF/XML introduces some
"built-in" types to RDF, together with an XML shorthand for representing
them.


jan



-- 
jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/
Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/
Unfortunately, I have a very good idea how fast my keys are moving.

Received on Monday, 2 September 2002 10:15:29 UTC