W3C home > Mailing lists > Public > public-owl-wg@w3.org > January 2008

ISSUE-95 (Datatype-facet compatibility in DatatypeRestriction): No compatibility restrictions between the datatype being restricted and the facets in the DatatypeRestriction construct

From: OWL Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Sun, 20 Jan 2008 12:55:23 +0000 (GMT)
To: public-owl-wg@w3.org
Message-Id: <20080120125523.50A906B5EA@tibor.w3.org>


ISSUE-95 (Datatype-facet compatibility in DatatypeRestriction): No compatibility restrictions between the datatype being restricted and the facets in the DatatypeRestriction construct

http://www.w3.org/2007/OWL/tracker/issues/

Raised by: Boris Motik
On product: 

Hello,

I believe that we have a slight problem with the DatatypeRestriction.

1. Problem
----------

Currently, the DatatypeRestriction construct takes one dataRange and several facet-value pairs. Note two important points here:

- The data range can be complex.
- There are no compatibility restrictions between the data range and the facets.

The first point makes it possible to write DatatypeRestriction( DataComplementOf(xsd:nonnegativeInteger) fractionDigits "2"^^xsd:integer). It is unclear how to interpret this datatype. The complement of xsd:nonnegativeInteger contains all data values that are not nonnegative integers, which includes, say, real numbers, but also includes all strings. It is unclear what restricting such a datatype to 2 precision digits means. Originally, a dataRange was used because this allowed one to specify, say, minInclusice and maxIncludive via nesting; with mutliple facets per DatatypeRestriction this is not necessary any more.


The second point makes it possible to write DatatypeRestriction(xsd:string fractionDigits "2"^^xsd:integer). Again, it is unclear whether this is a syntax error or, if not, how to interpret this datatype.

2. Possible solution
--------------------

A possible solution would be to change the definition of DatatypeRestriction in the following way:

- Rather than taking a dataRange as an argument, we should make DatatypeRestriction take a Datatype as an argument.
- We should specify compatibility between different datatypes and factes. For example, we would say that fractionDigits could be applied only to the xsd:float datatype.

This solution seems to be in line with the XML Schema way of handling things: if I am not mistaken, in XML Schema one cannot apply an arbitrary facet to an arbitrary datatype.

Regards,

	Boris
Received on Sunday, 20 January 2008 12:55:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 20 January 2008 12:55:32 GMT