W3C home > Mailing lists > Public > www-webont-wg@w3.org > August 2002

RE: GUIDE: Syntax query re parseType=

From: Smith, Michael K <michael.smith@eds.com>
Date: Thu, 29 Aug 2002 13:18:49 -0500
Message-ID: <B8E84F4D9F65D411803500508BE322141026B160@USPLM207>
To: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>
Cc: www-webont-wg@w3.org

Ok.  I find the choice of keyword bizarre.  Mixing syntax
and semantics in an odd way. 

So the difference between

	<daml:oneOf rdf:parseType="daml:collection">
	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
	</daml:oneOf>
and
	<daml:oneOf>
	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
	</daml:oneOf>

is that I can prove that the first one has exactly 2 elements?
While I can't extend the second one (since I can't reference it), the
semantics don't require that it be closed.  


-----Original Message-----
From: Peter F. Patel-Schneider [mailto:pfps@research.bell-labs.com]
Sent: Thursday, August 29, 2002 9:37 AM
To: Smith, Michael K
Cc: www-webont-wg@w3.org
Subject: Re: GUIDE: Syntax query re parseType=


From: "Smith, Michael K" <michael.smith@eds.com>
Subject: GUIDE: Syntax query re parseType=
Date: Thu, 29 Aug 2002 09:25:04 -0500

> 
> Help.  I'm trying to explain some syntax in the Guide document.
> 
> Why do we have rdfs:parseType tacked onto the various set operators?
> Obviously, we inherited it from DAML+OIL, but I don't understand the need
> for it there, either.
> 
> As far as I can tell, it is completely redundant in the XML syntax.  That
> is, there is no other possible interpretion of the children of oneOf,
> unionOf, and intersectionOf.
> 
> What am I missing?
> 
> - Mike

The reason for rdf:parseType="daml:collection" is to allow for a convenient
way of supplying lists.  The problem is that a construct like

	<daml:oneOf rdf:id="MySet">
	  <rdf:li> <Person rdf:id="John" /> </rdf:li>
	  <rdf:li> <Person rdf:id="Bill" /> </rdf:li>
	</daml:oneOf>

is not closed.  Anyone can do something like

	<daml:oneOf rdf:id="peter:MySet">
	  <rdf:li> <Person rdf:id="Susan" /> </rdf:li>
	</daml:oneOf>

to add another element of the set.

There are very bad consequences of a construct like this.

To get around this inadequacy of RDF, DAML+OIL has a list construct and

	<daml:oneOf rdf:parseType="daml:collection">
		<Person rdf:id="John" />
		<Person rdf:id="Bill" />
	</daml:oneOf>
which expands to

	<daml:oneOf>
		<daml:List>
			<daml:first>
				<Person rdf:id="John" />
			</daml:first>
			<daml:rest>
				<daml:List>
					<daml:first>
						<Person rdf:id="Bill" />
					</daml:first>
					<daml:rest>
						<daml:list
rdf:id="daml:nil">
					</daml:rest>
				</daml:List>
			</daml:rest>
		</daml:List>
	</daml:oneOf>

and cannot be non-monotonically messed with.

(I may have some of the details wrong, but you should be able to get the
idea.)

peter
Received on Thursday, 29 August 2002 14:33:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:57:51 GMT