<?xml version='1.0'?>

<!-- CardinalityQIndication - maxCardinalityQ -->

<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/in13.daml#"
>

<!-- A ont3:PersonWithTwoSons must have exactly two sons -->


<!-- Error - has no sons -->
<ont3:PersonWithTwoSons rdf:ID="person1"/>


<!-- Error - has only one son -->
<ont3:ManWithTwoSons rdf:ID="man1">
  <ont3:hasChild><ont3:Man rdf:ID="man2"/></ont3:hasChild>
</ont3:ManWithTwoSons>

<!-- OK - has two sons -->
<ont3:PersonWithTwoSons rdf:ID="person2">
  <ont3:hasChild rdf:resource="#man1"/>
  <ont3:hasChild rdf:resource="#man2"/>
  <ont3:hasChild rdf:resource="#woman1"/>
</ont3:PersonWithTwoSons>

<!-- OK - Note that person is not defined as male or female -->
<ont3:WomanWithTwoSons rdf:ID="woman1">
  <ont3:hasChild rdf:resource="#man1"/>
  <ont3:hasChild rdf:resource="#man2"/>
  <ont3:hasChild rdf:resource="#person1"/>
</ont3:WomanWithTwoSons>

<!-- ERROR - More than two sons -->
<ont3:WomanWithTwoSons rdf:ID="woman2">
  <ont3:hasChild rdf:resource="#man1"/>
  <ont3:hasChild rdf:resource="#man2"/>
  <ont3:hasChild><ont3:Man rdf:ID="man3"/></ont3:hasChild>
</ont3:WomanWithTwoSons>

</rdf:RDF>
