RE: How to add the constraining facets of XML schema.

---- Original message ----
>Date: Sat, 18 Jun 2005 08:16:59 -0400
>From: "Geoff Chappell" <geoff@sover.net>  
>Subject: RE: How to add the constraining facets of XML schema.  
>To: "'Kenichi Taniuchi'" <ktaniuchi@tari.toshiba.com>, <www-rdf-
logic@w3.org>

>> -----Original Message-----
>> From: www-rdf-logic-request@w3.org [mailto:www-rdf-logic-
request@w3.org]
>> On Behalf Of Kenichi Taniuchi
>> Sent: Thursday, June 16, 2005 7:59 PM
>> To: www-rdf-logic@w3.org
>> Subject: How to add the constraining facets of XML schema.
>> 
>> 
>> This question would be basic,,,
>
>You'd think so, wouldn't you? ;-)

Now he knows better!

>> I would like to make sure if I can add some additional restriction for
>> the RDF Datatypes.
>> For example:
>> 
>> <owl:DatatypeProperty rdf:ID="myproperty">
>> <rdfs:domain rdf:resource="#MyClass"/>
>> <rdfs:range rdf:resource="&xsd;integer"/>
>> </owl:DatatypeProperty>
>> 
>> How can I add "maxInclusive" and "minInclusive" for the property ?
>
>There's a good doc about xml datatypes and rdf at:
>
>	http://www.w3.org/TR/swbp-xsch-datatypes/
>
>Unfortunately, it doesn't offer an rdf-only solution. 

I didn't quite understand that. Do you mean it doesn't offer a solution that 
doesn't require you to create an XML schema document? That's certainly the 
design choice for rdf datatyping in general.

>In my own work I've done things like this:
>
>:myproperty a owl:DatatypeProperty;
>	rdfs:domain :MyClass;
>	rdfs:range [rdfs:subClassOf xsd:integer; 
>		xsd:maxInclusive "10"^^xsd:integer;
>		xsd:minInclusive "1"^^xsd:integer]

I'd feel happier if you named the type, I guess.

>i.e. I create a derived datatype with appropriate facet restrictions as
>needed. Most systems will likely not interpret the facets as meaningful, but
>they should at least respect the base type. 

I'd be surprised if they did!

>I usually use the base type on
>actual values - e.g.:
>
>	:x :myproperty "5"^^xsd:integer
>
>rather than naming the derived type and using that.

This sort of violates the "local" typing of properties. Hmm. Maybe not! As long 
as the actual value is in the intersection of the types, you probably won't get a 
clash.

>I haven't seen this method used in the wild, so I gather it's not a
>wide-spread practice.

Nope.

> Anyone else do anything like this? 

There is something similar in Jeff Pan's extensions to OWL to allow for multiple 
arity datatype predicates and user defined types.

> Or see reasons not
>to?

I'd be surprised if this became a sanctioned solution.

I've thought of embedding fragments of XML schema in rdf documents (via 
XMLLiterals) which at least sortof respects the "use Schema for datatype 
specification" while giving us "one document/local" datatype definitions.

Cheers,
Bijan.

Received on Saturday, 18 June 2005 16:30:48 UTC