Re: Can properties have no value?

At 02:14 PM 9/30/1999 -0700, Perry A. Caro wrote:
http://lists.w3.org/Archives/Public/www-rdf-comments/1999JulSep/0056

>Thanks for the comments.  I believe I understand the interpretation.  My
>only lingering concern is that there appears to be no way to express a
>distinguished *literal* which contains no characters, which is sometimes
>useful in the real world.  Here, I mean literal in the sense of the data
>model (a member of the set of Literals).

You're very welcome.  (I'm only sorry that it took me so long to make
time to reply to the excellent questions on these lists.)

I understand what you want -- something that is often used to
distinguish 'not specified' from 'not known'.  There is also a need
for some applications to distinguish both of these from 'empty'.

>I hesitate to call this "anonymous resource about which I know nothing else"
>equivalent to a literal with no characters, since it may not always be a
>literal.

you are right to hesitate; an RDF Literal is not an RDF Resource
(http://www.w3.org/TR/REC-rdf-syntax/#model) as you noted.

>To obtain a distinguished no characters literal, I may have to stoop to
>something like this:
>
><s:myProperty rdf:parseType='Literal'><null/></s:myProperty>

hmm.  yes, this comes pretty close.  You get a literal whose value is
a single XML node.  I don't know how your application would encode this.

Another option is:

<s:myProperty><s:null/></s:myProperty>

This says the value of s:myProperty is an anonymous resource whose
type is 's:null'.  Your application semantics then have to say that
the interpretation of this to be whatever you mean by your null value.

This introduces some complication in writing an RDF Schema range
property for s:myProperty, since you now need a union type of
Literal+s:null.

We might consider writing a 'convenience schema' of common union
types like these.  The XML Schema Working Group is also considering
whether and how XML itself should represent various kinds of null
values.  My own preference is to wait to define such things for RDF
in the hopes that we will be able to reuse base datatype definitions
from XML Schema.

-Ralph

Received on Friday, 1 October 1999 13:37:25 UTC