W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > August 2002

Re: Syntax-level typing (was Re: A data typing proposal)

From: Sergey Melnik <melnik@db.stanford.edu>
Date: Tue, 06 Aug 2002 09:53:25 +0200
Message-ID: <3D4F8075.6050101@db.stanford.edu>
To: Patrick Stickler <patrick.stickler@nokia.com>
CC: "R.V.Guha" <guha@guha.com>, RDF Core <w3c-rdfcore-wg@w3.org>

Patrick Stickler wrote:

> On 2002-08-02 14:28, "ext Sergey Melnik" <melnik@db.stanford.edu> wrote:
>>R.V.Guha wrote:
>>>The simplest thing I can think of is to say that the literal always
>>>denotes the string, unless there is an explicit xsd attribute which
>>>specifies some other data type. Life just becomes so much simpler ...
>>Let me elaborate a bit on the above. If what comes below is not what
>>Guha had in mind, I apologize; call it syntax-level typing, anyway.
>>The simplest things to do might be to make the primitive XSD datatypes
>>part of RDF abstract syntax and tackle an extensible generic typing
>>scheme later on (in WebOnt or RDF 2.0).
>>In essence, we could assume that typed values can be referred to
>>directly in the graph, without using their lexical forms. So, we simply have
>>Jenny --age--> (int)5
>>where (int)5 is a literal, just like "5" is another one. URIs like
>>xsd:integer denotes the class of integers (as defined in XSD), so that
>>age --rdfs:range--> xsd:integer
>>has the expected effect.
>>Typed literals as used above would be opaque to RDF; their
>>interpretation be fixed. An extended serialization syntax needs to be
>>used to distinguish (int)5 from "5". For RDF/XML we could simply use the
>>XSD syntax, e.g.:
>><age xsi:type="xsd:integer">5</age>
>>It would be the task of the parser to look at the xsi:type declaration
>>and generate the correct triples. Other RDF syntaxes (e.g., NTriples)
>>would have to design their own means of encoding typed values.
>>All idioms that we've been discussing go away. Later on, other ways of
>>referring to typed literals (e.g., using our idioms or URI-schemes) can
>>be developed along with an extensible type system for RDF, which would
>>allow defining derived types etc.
>>The syntax-level typing sketched above does not require (but of course,
>>can leave with) untidiness. In fact, typed literals like (int)5 can be
>>mapped directly to say Java built-in types.
> Well, ahem, this was basically the URV idiom that I tossed on the table
> nearly a year ago.
> And it requires no changes to RDF whatsoever. Just use a URI to denote
> the typed literal which denotes the value in question. Done.
> C.f. http://ietf.org/internet-drafts/draft-pstickler-val-01.txt

Right, it is very close the URV typing, except that typed values are not 
required to have URIs (pro: no URIs have to be standardized (yet), con: 
concrete syntaxes need to be adjusted).

Received on Tuesday, 6 August 2002 03:53:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:14 UTC