W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > December 2001

RE: Datatypes: J

From: <Patrick.Stickler@nokia.com>
Date: Sat, 8 Dec 2001 00:51:24 +0200
Message-ID: <A03E60B17132A84F9B4BB5EEDE57957B160B19@trebe006.NOE.Nokia.com>
To: jjc@hplb.hpl.hp.com, w3c-rdfcore-wg@w3.org
Cc: pfps@research.bell-labs.com

> 
> Graph
> .....
> 
>   _:a -------->--------  (10)
> 
> 
> Note: the node on the right is labelled with the integer 10, not the
> string "10".

But how do you get a "real" integer value in the graph if RDF
does not have native data types? What is the canonical representation
of an integer 'ten' in an RDF graph?

The RDF graph is tied to literals (lexical forms) because the
mapping from lexical to value space will be executed by each
individual application utilizing RDF encoded knowledge. 

> Hence using a different but compatible XML Schema type that maps the
> string "10" to the same value, e.g. xsd:positiveInteger, results in
> an identical graph.
> 
> N-Triples**
> ...........
> 
>  _:a <http://example.org/shoeSize> {xsd:decimal,"10.0"} .
> 
> In the modified N-Triples we need to give a type that 
> converts the lexical
> form in the file into the value in the graph. 

It is enough that we simply are able to define the pairing.
We don't have to execute the mapping into an actual value
in the graph.

> Since N-Triple 
> is canonical
> we use the primitive type from which the derived type inherits, and we
> use the canonical form of the lexicalization.
> 
> 
> 2: Implicit/Explicit use of XML Schema for whole document
> .........................................................
> 
> Haven't got this to work.
> 
> 
> 3: Explicit use of xsi:type for complex value
> .............................................
> e.g. complex numbers
> 
> ...
> 
> 
> This has corresponding graph
> 
> 
>       showSize     real
>   _:a --->---- [] --->----- (10)
>                 |
>                 | imaginary
>                 ----->----- (3)
> 
> where the labels on the right are real numbers not strings.

If we use rdf:type rather than xsi:type, and leave the
lexical forms in the graph, then your treatment of complex
types with simple type components works for me -- and the 
interpretation (mapping) of the lexical forms is clear from 
either the XML Schema or the same typing information provided 
in an RDF Schema via rdfs:range.

I.e.


       showSize     real
   _:a --->---- [] --->----- "10"
                 |
                 | imaginary
                 ----->----- "3"

where

   showSize rdfs:range cplx:complexNumber .
   real rdfs:range xsd:integer .
   imaginary rdfs:range xsd:integer .

which is basically the P idiom, and defines the
simple data type pairings

   ("10",xsd:integer)
   ("3",xsd:integer)

which unambigously denote the values 'ten' and 'three'
without requiring that RDF have native, internal, canonical
representations for all data types.


Cheers,

Patrick
Received on Friday, 7 December 2001 17:51:29 EST

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:43:01 EDT