Re: 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>
Subject: ISSUE-95 (Datatype-facet compatibility in DatatypeRestriction): No compatibility restrictions between the datatype being restricted and the facets in the DatatypeRestriction construct
Date: Sun, 20 Jan 2008 12:55:23 +0000 (GMT)

[...]

> 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.
    * a complex construction, not the proposed complex datatype
> - 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. 

Yes, but one might still want to say something like 
   DatatypeRestriction(
     DatatypeRestriction(xsd:nonnegativeInteger minInclusive 5...)
       maxInclusive 10))

Why?  Well, perhaps to repeat the 
     DatatypeRestriction(xsd:nonnegativeInteger minInclusive 5...)
from elsewhere (for emphasis, for example), or because the 
     DatatypeRestriction(xsd:nonnegativeInteger minInclusive 5...)
came from an external source (although there are currently no facilities
for this).

> 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. 

Agreed.

> 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. 

How about allow it to also take a DatatypeRestriction?

> - 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. 

By reference to XML Schema, or by ourselves?

> 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. 

I believe that this is so.

> Regards,
> 
> 	Boris

I concur that something should be done.

peter

Received on Wednesday, 23 January 2008 11:36:37 UTC