Re: Datatyping literals: question and test cases

[Patrick Stickler, Nokia/Finland, (+358 40) 801 9690, patrick.stickler@nokia.com]

> >But, what about this:
> >
> >   _:x ex:prop "http://example.org/" .
> >   ex:prop rdfs:range xsd:anyURI .
> 
> That depends on how xsd:anyURI defines its value space. If its the 
> set of strings conforming to the URI syntax, then OK. 

ARGH! Pat, no!

The WG has decided (with Nokia's dissent) that inlined literals
denote their string components (i.e. string-semantics) and therefore
the above range assertion is a datatype clash! It is *never* OK.
Never ever ever. It is not possible for it to ever be OK.

If it were to be valid, the literal must be explicitly typed, *always*

   _:x ex:prop "http://example.org/"^^xsd:anyURI .

Furthermore, not that xsd:anyURI is *not* a subtype even of xsd:string!
I.e., even XML Schema says that a member of the value space of xsd:anyURI
is *not* a member of the value space of xsd:string -- a URI is not a string!

Now... if we had made the more rational decision to adopt value-based
semantics for inlined literals, then Jeremy's example would have
been fine and dandy, with the range assertion providing the interpretation
of the inlined literal, and all would be well.

But as it is, were stuck with this insane (IMO) string-based
semantics that makes inlined literals and typed literals forever
disjunct (even if we call inlined literals 'typed' as members of
rdfs:StringLiteral or some such datatype).

Inlined literals and rdfs:range will *never* work together, except
in the single case of rdfs:StringLiteral. I wonder if folks appreciate
that oddity.

Patrick

Received on Thursday, 31 October 2002 02:29:05 UTC