W3C home > Mailing lists > Public > semantic-web@w3.org > November 2010

RE: Datatype normalization

From: Michael Schneider <schneid@fzi.de>
Date: Fri, 12 Nov 2010 13:21:45 +0100
Message-ID: <0EF30CAA69519C4CB91D01481AEA06A00235AB3E@judith.fzi.de>
To: <nathan@webr3.org>
Cc: "Semantic Web" <semantic-web@w3.org>
>-----Original Message-----
>From: semantic-web-request@w3.org [mailto:semantic-web-request@w3.org]
>On Behalf Of Nathan
>Sent: Friday, November 12, 2010 12:33 PM
>To: Semantic Web
>Subject: Datatype normalization
>Hi All,
>I'd suggest that a high percentage of the worlds RDF data is being
>published untyped, where plain literals are used as rather than typed
>literals "12.2" vs "12.2"^^xsd:decimal, and also (to a lesser extent)
>"strings as"^^xsd:string's.
>Until today, I had assumed that it was pretty "safe" to, upon parsing,
>turn xsd:strings in to plain literals / pull the datatype from the range
>of a property and turn the object in to the correct type.
>However, it's been suggested to me today that this probably isn't a good
>thing / "the right thing" to do.
>And thus, should I be avoiding implementing this feature, and
>additionally what are the reasons *not* to do this.
>An example:
>  Ontology contains..
>    ex:prop rdfs:range xsd:decimal .
>  "data" contains..
>    :foo ex:prop "12.2" .
>What reason would there be not to just infer/pull the type and convert
>to a typed literal?

There is a good reason to change the plain literal into a typed literal:
your example is semantically inconsistent, at least under D-entailment with
xsd:decimal being part of the datatype map, so it's definitely inconsistent
in OWL 2 Full (D-entailment, as defined in §5 of [1], is RDFS extended by
datatype support via datatype maps, but by default contains no other
datatype than rdf:XMLLiteral). 

Rational: Un-tagged plain literals in RDF are defined to denote themselves
as strings (see the first semantic condition in §1.4 of [1]). By this, the
set of all un-tagged plain literals happens to be equivalent to the value
space of xsd:string (which is just the set of all strings). But the value
space of xsd:string is, according to the XSD Datatype specification [2],
disjoint from the value space of xsd:decimal. By stating :foo ex:prop "12.2"
and having xsd:decimal as the range of ex:prop you assert that the /string/
"12.2" is an instance of the value space of xsd:decimal, and this cannot be
satisfied. Some reasoners may complain...


[1] http://www.w3.org/TR/rdf-mt
[2] http://www.w3.org/TR/xmlschema-2

Dipl.-Inform. Michael Schneider
Research Scientist, Information Process Engineering (IPE)
Tel  : +49-721-9654-726
Fax  : +49-721-9654-727
Email: michael.schneider@fzi.de
WWW  : http://www.fzi.de/michael.schneider
FZI Forschungszentrum Informatik an der Universität Karlsruhe
Haid-und-Neu-Str. 10-14, D-76131 Karlsruhe
Tel.: +49-721-9654-0, Fax: +49-721-9654-959
Stiftung des bürgerlichen Rechts, Az 14-0563.1, RP Karlsruhe
Vorstand: Prof. Dr.-Ing. Rüdiger Dillmann, Dipl. Wi.-Ing. Michael Flor,
Prof. Dr. Dr. h.c. Wolffried Stucky, Prof. Dr. Rudi Studer
Vorsitzender des Kuratoriums: Ministerialdirigent Günther Leßnerkraus
Received on Friday, 12 November 2010 12:22:23 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:41:24 UTC