<?xml version='1.0'?>

<!-- HasClassIndication - a property restriction requiring at least one instance of a datatype -->

<rdf:RDF
  xmlns:rdf ="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:xsd ="http://www.w3.org/2000/10/XMLSchema#"
  xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
  xmlns:ont3="http://www.daml.org/validator/examples/ont3.daml#"
  xmlns:dt1 ="http://www.daml.org/validator/examples/dt1.xsd#"
  xmlns     ="http://www.daml.org/validator/examples/in10.daml#"
>

<!-- ont3:ContactPerson has a restriction on ont3:hasContactInfo with daml:hasClass of dt1:phoneNumber -->

<!-- OK - The contact info includes a phone number-->
<ont3:ContactPerson rdf:ID="assistancePerson">
  <ont3:hasContactInfo>410-555-1212</ont3:hasContactInfo>
  <ont3:hasContactInfo>assistance@somecompany.com</ont3:hasContactInfo>
</ont3:ContactPerson>

<!-- OK - Here the phone number is a typed literal -->
<ont3:ContactPerson rdf:ID="weatherPerson">
  <ont3:hasContactInfo>weather@somecompany.com</ont3:hasContactInfo>
  <ont3:hasContactInfo><dt1:phoneNumber rdf:value="410-936-1212"/></ont3:hasContactInfo>
</ont3:ContactPerson>

<!-- OK - Another typed literal that is compatable -->
<ont3:ContactPerson rdf:ID="timePerson">
  <ont3:hasContactInfo rdf:resource="#weatherPerson"/>
  <ont3:hasContactInfo><xsd:string rdf:value="410-844-1212"/></ont3:hasContactInfo>
</ont3:ContactPerson>

<!-- ERROR - no phone number in contact info -->
<ont3:ContactPerson rdf:ID="emailPerson">
  <ont3:hasContactInfo>email@somecompany.com</ont3:hasContactInfo>
</ont3:ContactPerson>

<!-- ERROR - no contact info at all -->
<ont3:ContactPerson rdf:ID="uselessPerson">
</ont3:ContactPerson>

<!-- Error - contact info are all classes -->
<ont3:ContactPerson rdf:ID="friendOfAFriend">
  <ont3:hasContactInfo rdf:resource="#weatherPerson"/>
  <ont3:hasContactInfo rdf:resource="#timePerson"/>
</ont3:ContactPerson>

</rdf:RDF>
