- From: Geoff Chappell <geoff@sover.net>
- Date: Tue, 21 Jun 2005 09:31:51 -0400
- To: "'Kenichi Taniuchi'" <ktaniuchi@tari.toshiba.com>
- Cc: <www-rdf-logic@w3.org>
More like this, I think: <owl:DatatypeProperty rdf:ID="myproperty"> <rdfs:domain rdf:resource="#MyClass"/> <rdfs:range rdf:parseType="Resource"> <xsd:maxInclusive rdf:datatype="&xsd;integer">10</xsd:maxInclusive> <xsd:minInclusive rdf:datatype="&xsd;integer">1</xsd:minInclusive> <rdfs:subClassOf rdf:resource="&xsd;integer" /> </rdfs:range> </owl:DatatypeProperty> Keep in mind this is by no means a wide-spread idiom. Most systems will not pay any attention to the facets. Best, -Geoff > -----Original Message----- > From: www-rdf-logic-request@w3.org [mailto:www-rdf-logic-request@w3.org] > On Behalf Of Kenichi Taniuchi > Sent: Monday, June 20, 2005 5:19 PM > To: Geoff Chappell > Cc: www-rdf-logic@w3.org > Subject: Re: How to add the constraining facets of XML schema. > > > Thanks a lot! > I thought the XML format is: > > <owl:DatatypeProperty rdf:ID="myproperty"> > <rdfs:domain rdf:resource="#MyClass"/> > <rdfs:range> > <rdfs:subClassOf rdf:resource="&xsd;integer"> > <xsd:maxInclusive rdf:datatype="&xsd;integer">10</xsd:maxInclusive> > <xsd:minInclusive rdf:datatype="&xsd;integer">1</xsd:minInclusive> > </rdfs:subClassOf> > </rdfs:range> > </owl:DatatypeProperty> > > Is this correct? > > Thanks, > Kenichi > > Geoff Chappell wrote: > > > > > > >>-----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 Tuesday, 21 June 2005 13:32:03 UTC