a 'null' value for rdf:Seq?

Currently, we are developing a query engine for RDF Schema.
However, we ran into a difficulty with respect to rdfs:range.

The RDF Schema spec says:

    "It is possible for [a property] to have no range, in which
     case the class of the property value is unconstrained."

Now, consider the following query (using a pseudo-QL-syntax):

    select domain(P), P, range(P)
    from   Property(P)

The output of this query will be an xml-serialized RDF bag,
containing RDF sequences:

<rdf:Bag rdf:ID="result">
  <rdf:li>
    <rdf:Seq>
      <rdf:li rdf:resource="http://ontology#someDomainClass"/>
      <rdf:li rdf:resource="http://ontology#someProperty"/>
      <rdf:li rdf:resource="http://ontology#someRangeClass"/>
    </rdf:Seq>
  </rdf:li>
  [... etc ...]
</rdf:Bag>

The difficulty is this: what should be put in the place of
"someRangeClass" when the property has no defined range? Simply
defaulting to rdfs:Resource (as the root of the class hierarchy)
does not give the desired result, because a range may also be
Literal (which is a class, but somehow _not_ a subclass of
Resource).

An option would be to simply remove the last rdf:li completely
and leave it up to the receiver of the query result to interpret
this correctly. But this approach runs into trouble when we
slightly change our query:

  select range(P), range(Q), P, Q
  from  Property(P), Property(Q)

In this case, when one of the ranges is defined and one is not,
it becomes impossible to discern which range is associated with
which property.

Of course, when all list items reference literals, one could use
the attribute-syntax for list items, which uses ordinals to
ensure the correct sequence (for the last query):

  <rdf:Seq rdf:_2="someRangeClass rdf:_3="someProperty"
          rdf:_4="someOtherProperty" />

Note that by omitting rdf:_1, we imply that the first argument
(being 'range(P)') has no assigned value.

However, since this syntax can not be combined with the
element-syntax for list items, and resources can not be specified
in the attribute-syntax, we are left with a problem.

A robust solution would be to have element-syntax list items
which can be ordered, e.g.:

  <rdf:Seq>
    <rdf:li rdf:ord="2" rdf:resource="http://someRangeClass"/>
    <rdf:li rdf:ord="3" rdf:resource="http://someProperty"/>
    <rdf:li rdf:ord="4" rdf:resource="http://someOtherProperty"/>
  </rdf:Seq>

Another option would be to have a 'null' primitive introduced in
the RDF model, e.g:

  <rdf:Seq>
    <rdf:li rdf:resource="http://www.w3.org/TR/REC-rdf-syntax#Null"/>
    <rdf:li rdf:resource="http://someRangeClass"/>
    <rdf:li rdf:resource="http://someProperty"/>
    <rdf:li rdf:resource="http://someOtherProperty"/>
  </rdf:Seq>

But of course, unless I've overlooked something in RDF M&S specs,
both of these are wishful thinking :)

I would appreciate your thoughts on this problem.

Best regards,

Jeen
-- 
                               Vrije Universiteit, Faculty of Sciences
Jeen Broekstra              Division of Mathematics & Computer Science
jbroeks@cs.vu.nl                                    de Boelelaan 1081a
http://www.cs.vu.nl/~jbroeks        1081 HV Amsterdam, the Netherlands

Received on Friday, 16 February 2001 09:15:26 UTC