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

GUIDE: 5.9 malformed restrictions: "don't do that"

From: Dan Connolly <connolly@w3.org>
Date: 11 Dec 2002 15:56:07 -0600
To: www-webont-wg@w3.org
Message-Id: <1039643767.32719.499.camel@dirk>

"Issue 5.9 - malformed D+O restrictions

ACTION:  Write-up a few sentences for the guide (Dan Connolly)"
-- 7Nov
http://lists.w3.org/Archives/Public/www-webont-wg/2002Nov/0119.html

Basically I want to make sure the relevant
section of the guide...
http://www.w3.org/TR/2002/WD-owl-guide-20021104/#PropertyRestrictions

says to don't do this:

[[[
Recall that malformed OWL restrictions are things like

_:x owl:onProperty ex:pa .
_:x owl:onProperty ex:pb .
_:x owl:minCardinality xsd:integer"5" .
_:x owl:allValuesFrom ex:ca .
]]]
http://lists.w3.org/Archives/Public/www-webont-wg/2002Oct/0329.html
<- 
http://www.w3.org/2001/sw/WebOnt/webont-issues.html#I5.9-Malformed-DAML-OIL-Restrictions


Starting from the example there...

--------
<owl:Class rdf:ID="Vintage"> 
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#hasVintageYear"/>  
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>
--------

To make my point, we need to be talking
about more than one property... so...

  We can give cardinalities to multiple properties:

<owl:Class rdf:ID="Vintage"> 
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#hasVintageYear"/>  
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
  </rdfs:subClassOf>
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#hasExpiryYear"/>  
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>

  This says that Vintage is a subclass of each of
  two restrictions: one that limits the cardinality
  of hasVintageYear to 1, and another that limits
  the cardinality of hasExpiryYear to 1.

then here's the point:

  Note that this cannot be abbreviated as:

<owl:Class rdf:ID="Vintage"> 
  <rdfs:subClassOf>
    <owl:Restriction>
      <owl:onProperty rdf:resource="#hasVintageYear"/>  
      <owl:cardinality>1</owl:cardinality>

      <owl:onProperty rdf:resource="#hasExpiryYear"/>  
      <owl:cardinality>1</owl:cardinality>
    </owl:Restriction>
  </rdfs:subClassOf>
</owl:Class>

  i.e. do not try to combine multiple restrictions.
  The semantics are almost certainly not what
  you meant.

Does that make sense, Mike and GUIDE folks?

p.s. nit: "Here we define Burgundy wine to be dry wines."
the word 'define' suggests that all dry wines
are Burgundy; not so, since you used subClassOf.
suggest: "Here we declare that all Burgundy wines
are dry."

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 11 December 2002 16:55:52 GMT

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