- From: Jeff Z. Pan <pan@cs.man.ac.uk>
- Date: Sun, 12 Oct 2003 15:57:48 +0100
- To: <monika@dmu.ac.uk>, <office@e-senses.de>
- Cc: <www-rdf-interest@w3.org>
Monika Solanki wrote: ><Lens> > <focal-length>75-300mm zoom</focal-length> > <f-stop>4.5-5.6</f-stop> ></Lens> > >Would the above be incorrect representation in OWL ? > >Would it be correct to do it like this > ><Lens> > <focal-length rdf:datatype="&xsd;string">75-300mm zoom</focal-length> > <f-stop rdf:datatype="&xsd;string">4.5-5.6</f-stop> ></Lens> Both of them are correct, because a data literal can be either a typed literal or an untyped literal. See section 2.2 of the OWL abstract syntax http://www.w3.org/TR/2003/CR-owl-semantics-20030818/syntax.html#2.2 The reason for supporting both is that OWL makes use of the RDF datatyping scheme. >If this is correct, then what is the rationale behind specifying range >as "String" in defining the property ? Benjamin Nowack wrote: >I'm not sure but this could be the reason for the >redundancy, just to make sure that rdf parsers don't handle the >property values as plain literals. The parser will treat untyped literals as strings. In the above example, it is fine. If you use, however, untyped literal to represent data values of other datatypes, such as xsd:integer, you might lose the datatype information. As far as the redundancy, I think there are at least two kinds of cases where the type information might not be redundant: 1) Even though the range is xsd:string, you can still use a derived type of xsd:string with the typed literal. 2) Data literals can be used to define enumerated datatypes, when you can actually use literals of more than one datatypes. E.g. oneOf("0"^^xsd:integer "1"^^xsd:integer "unknown"^^xsd:string). If the range of a datatype property is the above enumerated datatype, then you might want to use typed literals. In fact, we can change the above datatype a bit to make it more extreme as follows oneOf("0"^^xsd:integer "1"^^xsd:integer "0"^^xsd:string). Jeff -- Jeff Z. Pan ( http://DL-Web.man.ac.uk/ ) Computer Science Dept., The University of Manchester
Received on Sunday, 12 October 2003 10:57:41 UTC