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

> -----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? ;-)

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

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.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 usually use the base type on
actual values - e.g.:

	:x :myproperty "5"^^xsd:integer

rather than naming the derived type and using that.
 
I haven't seen this method used in the wild, so I gather it's not a
wide-spread practice. Anyone else do anything like this? Or see reasons not
to?

> Kenichi

Geoff Chappell
 

Received on Saturday, 18 June 2005 12:17:10 UTC