- From: Graham Klyne <Graham.Klyne@MIMEsweeper.com>
- Date: Wed, 27 Mar 2002 10:36:31 +0000
- To: RDF core WG <w3c-rdfcore-wg@w3.org>
- Cc: Pat Hayes <phayes@ai.uwf.edu>
Recently, I came up with more use-case experience that has some bearing on
datatypes.
See: http://www.w3.org/TR/photo-rdf/
In particular, I notice some rather "loose" use of datatyping with respect
to some of the DC vocabulary:
relation
identifies a series: the event or topic for a series of photographs.
Can be a URL or a string.
Example: Marian in Le Sidobre.
rights
copyright statement, or the URL for one.
Example: http://www.w3.org/People/Lafon/
Copyright?1998
And I thought this one from a different schema was particularly, er, creative:
camera
the brand and type of the camera, or a URL for the camera.
If the latter, the URL identifies one actual camera, not all cameras of
that type.
Example: http://www.w3.org/People/Lafon/
FooCamera8000i
I think the requirement for tidy literals in the graph makes this kind of
usage a bit untidy. I do think that the current datatype draft can cover
this usage if we're clear that a property can have both literals and other
values in its range; To be sure, I'd like to see a little more explanation
of how this works. What follows is based on my interpretation of Pat's
response to my earlier suggestion of possible problems:
[[[
The rdfs:range and rdfs:drange schema terms applied to a property operate
independently. rdfs:range tells us that in any satisfying interpretation
of the graph, property object values that appear in the property's
relational extension must also appear in the indicated class
extension. rdfs:drange applies a syntactic constraint on the form of
literal that may appear in the graph as an object of the property. When
the range of a property permits lexical values, these may appear as
literals in the graph subject to the constraints of any applicable
rdfs:drange datatype. The rdfs:drange term does not, however, constrain
the form of lexical values that may be denoted by other means, such as a
URIref.
It is possible for a property to allow both lexical and non-lexical values
in its range.
Because literals always denote themselves, a literal used in the object
position of a triple always denotes a lexical value in the range of the
corresponding property. Thus, for rdfs:drange to be meaningful, any
property to which it is applied must not exclude lexical values from its
range.
]]]
And some illustrative test cases:
(1) If the class extension of datatype:integer contains just integer
values, not numerals, then:
ex:age rdfs:range datatype:integer .
ex:Jenny ex:age "10" .
Can never be satisfied.
(2) If the class extension of datatype:age contains just integer values,
not numerals, then:
given:
ex:age rdfs:drange datatype:integer .
ex:age rdfs:range ex:AgeInYears .
then:
ex:Jenny ex:age "10" .
ex:Jenny ex:age IntegerValue:_10 .
ex:Jenny ex:age StringValue:_10Years .
can all be satisfied for:
- the expected interpretation of datatype:integer,
- IntegerValue:10 denotes the integer value 10, and
- StringValue:_10Years denotes the string value "10 years".
- ex:age relational extension includes
{ <I(ex:Jenny),"10">, <I(ex:Jenny),10>, <I(ex:Jenny),"10 years"> }
- ex:AgeInyears class extension includes:
{ "10", 10, "10 years" }
(Note that "10 years" does not satisfy the literal constraint of
datatype:integer.)
#g
-------------------
Graham Klyne
<GK@NineByNine.org>
Received on Wednesday, 27 March 2002 05:31:26 UTC