- From: Dave Reynolds <der@hplb.hpl.hp.com>
- Date: Fri, 05 May 2006 14:31:47 +0100
- To: Gerd Wagner <wagnerg@tu-cottbus.de>
- CC: public-rif-wg@w3.org
Gerd Wagner wrote: >>> With "RDF" I was, in fact, refering to RDF+RDFS where >>> you have typed predicate symbols in the form of domain >>> and range restricted properties. >> Yes and no. Yes you can declare rdfs:domain/range of >> properties but they just entail new rdf:type inferences. >> That doesn't really give you a type system in the >> programming language sense since RDF resources can have >> multiple types, such declarations don't restrict where >> properties can be applied. > > No matter if objects have unique types (like in Java) or > multiple types (like in UML and RDF), you still have > typed functions and predicates. You *can* still have typed predicates, agreed, but not all predicates are necessarily typed. > If an RDF property > has an xs:int range, the second argument of a statement > with that property predicate must evaluate to an integer, > right? Yes[*], that is true for rdfs:range and xsd datatypes, XSD does provide a type system. However, making the domain/range be a non-literal rdfs:Class doesn't really impose any restriction. Dave [*] Though it depends what you mean by "evaluate". If you have a statement whose object (second argument) is a literal whose value is known to be outside the value space for xsd:int then there is a datatype clash. For example, this would be the case if it is an xsd:string or an xsd:decimal with a non-zero number of fraction digits. However, clearly you can have the object be a bNode and there is no error. Less clearly, the object can be a URIreference without an error. At least I don't think there is part of the specification which requires the range of the IS interpretation function to be disjoint from LV the set of literals. Though I'm prepared to be corrected on that one. Further, if the value is a typed value but for an unknown type then there is no error because there is nothing to prevent the value for my datatype, that you haven't heard of, from overlaping with xsd:int. The open world assumption applies to datatypes as well.
Received on Friday, 5 May 2006 13:32:09 UTC