Re: parseType=collection causing confusion

>>>David Martin said:
> 
> DAML+OIL folk -

Well, I'm answering with respect to the RDF(/XML) since I edit
the RDF/XML document for the RDF Core working group.

> In the section on reference section on parseType=collection:
> 
> http://www.daml.org/2001/03/reference#collection
> 
> it states that a use of parseType=collection, such as:
> 
> <oneOf rdf:parseType="daml:collection">
>   <Thing rdf:resource="#red"/>
>   <Thing rdf:resource="#white"/>
>   <Thing rdf:resource="#blue"/>
> </oneOf>
> 
> is equivalent to an RDF List construct (not reproduced here), which
> "imposes a specific order on the elements".  But then it also says
> (rather schizophrenically) that "structures of parseType daml:collection
> are intended to represent *unordered* collections".

The Web Ontology Working Group) asked RDF Core to add this construct
to the RDF/XML syntax, and I have started to add the appropriate
grammar changes to the editors draft of the RDF/XML syntax document
I edit.

The syntax grammar changes:
  http://ilrt.org/discovery/2001/07/rdf-syntax-grammar/#parseTypeContainerPropertyElt

but this does not tell you what the resulting triples *mean*.

(There will be an explanation of this construct and example of its
use in due course)

It is intended that this structure is an easy way to create this
lisp-like structure of triples at the end of a property (daml:oneOf
in your example).  RDF will not define any further meaning for them;
in particular nothing is being said about ordering.  The rdf:first
and rdf:rest properties will allow applications to walk the structure
and apply an ordering at that level.  In particular, it is expected
that WebOnt will do that so that their use of rdf:parseType="Collection"
will define ordered lists.


> Well, I'd like to use it to represent an *ordered* collection.  Since
> it's clearly defined as an RDF List construct that maintains order, it
> seems to me I should be able to use it that way with confidence.

I see it as perfectly ok to use the form above for any kind of
application-specific list, ordered, with duplicates or any other
structure that may not even be a collection.  That is, the resulting
triple structure can have your own interpretation.

> In other words, I would like to be able to define my own property,
> which, like oneOf, has daml:List as its range, and I'd like to be able
> to use parseType=collection in specifying instances of this property.
> AND, I'd like to have some confidence that any DAML+OIL-compliant parser
> or tool will maintain the order that's given inside the parseType=
> collection construct.  But the wording of the reference document leaves
> me in doubt.
> 
> QUESTION: Can I feel confident that a DAML+OIL-compliant parser or tool
> will maintain the order of elements given inside a parseType=collection
> construct, when it's used in specifying an instance of a user-defined
> property?

I'll leave that to DAML+OIL or OWL/WebONT experts.

> 
> RECOMMENDATION: In descendant languages of DAML+OIL, such as OWL, if
> "parseType" is still used, let there be *both* of the following:
> 
>   parseType=collection, where it's explicitly documented that a parser
> *isn't* required to maintain the given order,
> 
> AND
> 
>   parseType=list, where it's explicitly documented that a parser *is*
> required to maintain the given order

The parser requires the same structure of triples to be generated; it
is the interpretation of that structure which decides if their is an
order.  A parseType is a rather low-level and syntax-based way of
doing that, when it would better live inside the semantics.

I expect OWL will have other ways in their abstract syntax (and
concrete forms) to abbreviate and do such things more concisely.

Dave

Received on Monday, 16 September 2002 06:07:12 UTC