- From: Dan Connolly <connolly@w3.org>
- Date: Fri, 24 Aug 2007 14:32:35 -0500
- To: John McClure <jmcclure@hypergrove.com>
- Cc: Owl Dev <public-owl-dev@w3.org>
On Fri, 2007-08-24 at 12:04 -0700, John McClure wrote:
> A Person in US legal contexts is either a Human or a Corporation;
Straightforward rendition in OWL, written in turtle syntax:
uslegal:Person owl:unionOf (uslegal:Human uslegal:Corporation).
> every Human is
> a Person, and every Corporation is a Person.
Likewise:
uslegal:Human rdfs:subClassOf uslegal:Person.
uslegal:Corporation rdfs:subClassOf uslegal:Person.
Those are theorems that follow from the above, of course.
This assumes owl: is bound like this:
@prefix owl: <http://www.w3.org/2002/07/owl#>.
and uslegal: is a fictitious example:
@prefix uslegal: <http://example/uslegal/vocab#>.
> Is the following construct valid? Will or should reasoners be troubled by
> <rdf:Alt> within a <rdfs:range>, and can or should <rdf:Alt> be used within an
> <owl:Restriction>?
My advice on rdf:Alt is: don't.
In this case, use owl:unionOf .
My advice on RDF/XML is: use tools.
So take the above turtle syntax and stick it in a file, e.g.
http://pastebin.com/pastebin.php?dl=m4d3b5ace
then use a toolkit like redland (or Jena or swap/cwm or ... )
to convert to RDF/XML.
The triplr online service is particularly convenient:
http://triplr.org/rdf/http://pastebin.com/pastebin.php?dl=m4d3b5ace
and out comes...
<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:uslegal="http://example/uslegal/vocab#" xml:base="http://triplr.org/rdf/http://pastebin.com/pastebin.php?dl=m4d3b5ace">
<rdf:Description rdf:about="http://example/uslegal/vocab#Person">
<owl:unionOf>
<rdf:Description>
<rdf:first rdf:resource="http://example/uslegal/vocab#Human"/>
<rdf:rest>
<rdf:Description>
<rdf:first rdf:resource="http://example/uslegal/vocab#Corporation"/>
<rdf:rest rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
</rdf:Description>
</rdf:rest>
</rdf:Description>
</owl:unionOf>
</rdf:Description>
</rdf:RDF>
Now that rendition doesn't use parseType="Collection" short-hand, but...
well... trying to make RDF/XML look pretty is one of those battles
I choose not to engage in any more.
About the example you sent, some details...
> <owl:Class rdf:about="#LegalPerson">
> <owl:ObjectProperty rdf:about='#Parent'>
property names conventionally start with lowercase, so #parent
> <rdfs:range>
> <rdf:Alt>
> <li><owl:Class rdf:about="#Human"/></li>
> <li><owl:Class rdf:about="#Corporation"/></li>
> </rdf:Alt>
> </rdfs:range>
rather:
<rdfs:range rdf:parseType="Resource">
<owl:unionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Human"/>
<owl:Class rdf:about="#Corporation"/>
</owl:unionOf>
</rdfs:range>
The rest of it looks mostly OK at a glance, but I don't trust myself
to read RDF/XML. I use tools.
> I haven't found examples of this sort in the docs.
http://www.w3.org/TR/owl-ref/#unionOf-def
--
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Friday, 24 August 2007 19:32:52 UTC