RE: xml datatype facets

On 13.01.2005 09:22:47, Geoff Chappell wrote:
>> -----Original Message-----
>> From: Benjamin Nowack [mailto:bnowack@appmosphere.com]
>> On 12.01.2005 14:14:10, Geoff Chappell wrote:
>> >
>> >Hi,
>> >
>> >Any one know of any standards or best practices for specifying facets on
>> xml
>> >datatypes in rdf?
>> >
>> >I imagine something like this (in turtle/n3):
>> >
>> >ex:LengthConstrainedString a rdfs:Datatype;
>> >  rdfs:subClassOf xsd:string;
>> >  xsd:maxLength
>> "32"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger>;
>> >  xsd:minLength
>> > "1"^^<http://www.w3.org/2001/XMLSchema#nonNegativeInteger>.
>
>> hm, ex:LengthConstrainedString would need to be a subDatatype, not a
>> subClass of xsd:string. 
>
>Are you sure? I think it is an instance of datatype, just as xmlliteral and
>xsd:string are - i.e. it's one of those things that maps strings to values.
hm, good question. I was just following the way the other rdf constructs
work, e.g.:
- foaf:Agent is an instance of rdfs:Class, foaf:Person is
  a *subClassOf* foaf:Agent.
- rdfs:label is an instance of rdf:Property, foaf:name is
  a *subPropertyOf* rdfs:label
- xsd:string is an instance of rdfs:Datatype, ex:myString
  would be a *subDatatypeOf* xsd:string.
But I guess that's anyway more the syntax side of it.

>And I'd think it is a subclass of xsd:string because, well, it is...;-) i.e.
>by definition it's just a specialization/winnowing of the instances of the
>class xsd:string to those that are between 1 and 32 chars in length. 
I partly agree, but the domain and range of rdfs:subClassOf is
rdfs|owl:Class, so xsd:string would be be both a Class and
an instance of rdfs:Datatype which would prohibit it's use in
OWL DLy systems. I personally wouldn't bother but I guess some
people would not want a solution to describe custom datatypes
to be limited to OWL Full (not sure if that's relevant for
you)
(Hm, I think that pre-semweb systems actually used classes for
literals. A "foo" string is then an instance of the class
String. I saw that somewhere, protege perhaps..)

>
>Geoff
>

regards,
benjamin

--
Benjamin Nowack

Kruppstr. 100
45145 Essen, Germany
http://www.bnode.org/

Received on Thursday, 13 January 2005 15:08:42 UTC