W3C home > Mailing lists > Public > www-rdf-logic@w3.org > January 2001

Bugs in 2000/12 daml+oil reference on DAML collections

From: Dickinson, Ian J <Ian_J_Dickinson@hplb.hpl.hp.com>
Date: Fri, 12 Jan 2001 10:54:20 -0000
Message-ID: <5E13A1874524D411A876006008CD059F15C44B@0-mail-1.hpl.hp.com>
To: www-rdf-logic@w3.org
Folks -
There are a couple of problems with the DAML+OIL reference
(http://www.daml.org/2000/12/reference.html) on the treatment of parse type

The first problem is fairly trivial. In the section explaining the
interpretation of the collection node
(http://www.daml.org/2000/12/reference.html#collection), the empty list
element is shown as:
	<rest rdf:resource="nil">
when it should be
	<List rdf:resource="nil">
otherwise the document has an illegal property of a property construction
(rest of rest).  Another typo is that the final tag should be </List> not
<List>.  Also, I suspect that the URI 'nil' should have an explicit
namespace, otherwise every DAML document will have a different list

The second problem is that it would be nice if we could apply a simple
syntactic transformation to remove the parseType daml:collection's before
parsing with a standard RDF parser (as suggested in the reference document).
This is made more difficult because parseType daml:collection is applied to
both properties and instances in slightly different ways.

For example, the e.g. in the reference document uses the oneOf property. The
example translates:

<oneOf rdf:parseType="daml:collection">
  <Thing rdf:resource="#red"/>
  <Thing rdf:resource="#white"/>
  <Thing rdf:resource="#blue"/>


  <Thing rdf:resource="#red">
  ... elided for brevity ...

Presumably, then, the final document contains (or should be interpreted as):

    <Thing rdf:resource="#red">
    ... elided for brevity ...

So the interpretation of the daml:collection attribute on a property is that
the _value_ of the property is a List.

However, a disjoint axiom also has parseType daml:collection:

<daml:Disjoint rdf:parseType="daml:collection">
  <rdfs:Class rdf:about="#Car"/>
  <rdfs:Class rdf:about="#Person"/>
  <rdfs:Class rdf:about="#Plant"/>

Since daml:Disjoint is a sub-class of List (which seems like an engineering
convenience rather than a deep statement about the domain of axioms and
lists), presumably the correct interpretation is:

    <rdfs:Class rdf:about="#Car"/>
    ... nested list of person and plant ...

I.e. the Disjoint instance itself takes the place of the outer List in the
content of the oneOf property, so the interpretation of daml:collection here
is that the axiom instance _is_ a list.

The other alternative is that there should be an intervening property
between the Disjoint axiom instance and the translated List (and by
corollary, Disjoints contain lists but are not sub-classes of List), but it
is not clear what this property would be.  

Either way, a transformation to translate daml:collection's to the List form
can't be a context-free grammar at the XML level, since it's an RDF
convention that distinguishes instances from classes from properties. At the
XML level they're all just elements.  And if we want to do document
translation pre the RDF parse phase, the only interpretation level available
is XML.

Comments welcome, especially if I've missed something in my understanding of
the specs.


Ian J. Dickinson    HP Labs, Bristol, UK    mailto:Ian_Dickinson@hp.com
Received on Friday, 12 January 2001 05:54:30 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:45:36 UTC