- From: Dave Beckett <dave.beckett@bristol.ac.uk>
- Date: Mon, 13 Jan 2003 14:07:16 +0000
- To: "Peter F. Patel-Schneider" <pfps@research.bell-labs.com>
- cc: www-rdf-comments@w3.org
>>>"Peter F. Patel-Schneider" said:
>
> OWL is heavily using the new RDF collection syntax. Thanks for adding it.
>
> However, there are a few places where it would be useful to have
> collections, but where the collection syntax is not allowed.
>
> The first case has to do with literals in collections. I believe that it
> is not possible to have literals in the collection syntax, so that
>
> <owl:Class>
> <owl:oneOf rdf:parseType="Collection">
> 1
> 2
> 3
> </owl:oneOf>
> </owl:Class>
>
> is not legal RDF/XML. (Typed literals are also not possible.)
True, that is not legal, but you can always write out it in long-form
(tiresome but possible):
----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class>
<owl:oneOf rdf:nodeID="genid1"/>
</owl:Class>
<rdf:List rdf:nodeID="genid1">
<rdf:first>1</rdf:first>
<rdf:rest rdf:nodeID="genid2"/>
</rdf:List>
<rdf:List rdf:nodeID="genid2">
<rdf:first>2</rdf:first>
<rdf:rest rdf:nodeID="genid3"/>
</rdf:List>
<rdf:List rdf:nodeID="genid3">
<rdf:first>3</rdf:first>
<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
</rdf:List>
</rdf:RDF>
----------------------------------------------------------------------
or using more abbreviations to remove the rdf:nodeIDs:
----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#">
<owl:Class>
<owl:oneOf>
<rdf:List>
<rdf:first>1</rdf:first>
<rdf:rest>
<rdf:List>
<rdf:first>2</rdf:first>
<rdf:rest>
<rdf:List>
<rdf:first>3</rdf:first>
<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
</rdf:List>
</rdf:rest>
</rdf:List>
</rdf:rest>
</rdf:List>
</owl:Class>
</rdf:RDF>
----------------------------------------------------------------------
This is slightly related to the issue of having a way to write
literals as the subject of RDF triples (not allowed in the abstract
syntax at present, not possible in rdf/xml) which the WG is not
addressing at present.
> The second case has to do with making a collection directly an instance of
> a class. For example, it would be useful to do something like
>
> <owl:AllDistinct rdf:parseType="Collection">
> <owl:Thing rdf:about="#John" />
> <owl:Thing rdf:about="#Mary" />
> <owl:Thing rdf:about="#Susan" />
> <owl:Thing rdf:about="#Joe" />
> </owl:AllDistinct>
This is associating a class (owl:AllDistinct) with four classes (the
owl:Things), but there doesn't seem to be any property (in the rdf
sense) doing the association. Looking up
http://www-db.research.bell-labs.com/user/pfps/owl/semantics/mapping.html#owl_AllDifferent_mapping
I think this can already be written in legal rdf/xml as:
<owl:AllDifferent>
<owl:distinctMembers rdf:parseType="Collection">
<owl:Thing rdf:about="#John" />
<owl:Thing rdf:about="#Mary" />
<owl:Thing rdf:about="#Susan" />
<owl:Thing rdf:about="#Joe" />
</owl:distinctMembers>
</owl:AllDifferent>
> This is not an official request to do anything, but these issues should not
> be forgotten if there is any future work on RDF.
Sure, no problem and no promises :)
Dave
Received on Monday, 13 January 2003 09:09:10 UTC