W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > November 2001

Example of descriptive vs. prescriptive and lexical space vs. val ue space

From: <Patrick.Stickler@nokia.com>
Date: Mon, 12 Nov 2001 23:06:29 +0200
Message-ID: <2BF0AD29BC31FE46B788773211440431621750@trebe003.NOE.Nokia.com>
To: phayes@ai.uwf.edu, w3c-rdfcore-wg@w3.org
> ... God help us if we allow a union of decimal and octal.

No help needed. All is well...

Unions of decimal and octal forms is no big deal. It depends 
on the lexical grammar defined for the data type, and the 
mapping from lexical forms to values.

E.g. the Scheme programming language has a integer lexical space
that is the union of decimal, octal, hexidecimal, and binary
forms, all which map to the integer value space.

If I defined an RDF class for the Scheme integer data type, 
I should be able to define literal values using any valid
lexical form.

Thus, given the knowledge

   ex:shoeSize rdfs:range xsd:integer .
   scm:integer rdfs:subClassOf xsd:integer .
   aaa ex:shoeSize "10" .
   bbb ex:shoeSize [ rdf:value "#xA";    rdf:type scm:integer ] .
   ccc ex:shoeSize [ rdf:value "#b1010"; rdf:type scm:integer ] .
   ddd ex:shoeSize [ rdf:value "ten";    rdf:type xsd:string ] .

(Note that rdfs:subClassOf only should be considered to
 requires compatability of value space, not lexical space)

The first three resources aaa, bbb, and ccc all have a 
ex:shoeSize of ten. Even though they have different lexical

In the case of aaa, the data type (and hence lexical form) is
determined to be xsd:integer by *descriptive* application of 
the rdf:range constraint for ex:shoeSize.

In the case of ddd, the value type violates the defined
range constraint for the ex:shoeSize property as determined 
by *prescriptive* application of rdf:range (which is only
possible if both range and local value are defined), as
xsd:string is not an rdfs:subClassOf xsd:integer, and as 
such, "ten" is not a valid value for the ex:shoeSize property.
The value is still defined, of course, and the knowledge
exists, but it does not satisfy the defined range constraint.

Now, this also demonstrates why it is imperative that literal
values either be inseperable from locally defined types, or
from the original properties for which they were defined,
presuming those properties define type via rdfs:range. Otherwise,
one cannot know what lexical space they are members of and
how to properly interpret them, even if one may know that
they denote values in a particular value space.

Hopefully the above example helps to clarify the concepts
of descriptive vs. prescriptive application of rdfs:range
and the problems with lexical space not necessarily being
shared by types which have compatible value spaces.



Patrick Stickler              Phone: +358 50 483 9453
Senior Research Scientist     Fax:   +358 7180 35409
Nokia Research Center         Email: patrick.stickler@nokia.com
Received on Monday, 12 November 2001 16:07:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:24:06 UTC