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

<!-- A ont3:Man can have at most one ont3:Woman spouse -->

<!-- OK - no spouse -->
<ont3:Man rdf:ID="man1"/>

<!-- OK - one female spouse -->
<ont3:Man rdf:ID="man2">
  <ont3:hasSpouse><ont3:Woman rdf:ID="woman1"/></ont3:hasSpouse>
</ont3:Man>

<!-- OK - any number of male spouses are allowed -->
<ont3:Man rdf:ID="man3">
  <ont3:hasSpouse rdf:resource="#man1"/>
  <ont3:hasSpouse rdf:resource="#man2"/>
</ont3:Man>

<!-- OK - And as things are defined there is not problem with one man and one woman spouse -->
<ont3:Man rdf:ID="man5">
  <ont3:hasSpouse><ont3:Woman rdf:ID="woman3"/></ont3:hasSpouse>
  <ont3:hasSpouse><ont3:Man rdf:ID="man6"/></ont3:hasSpouse>
</ont3:Man>

<!-- Error - Having two wives is not allowed -->
<ont3:Man rdf:ID="man4">
  <ont3:hasSpouse><ont3:Woman rdf:ID="woman2"/></ont3:hasSpouse>
  <ont3:hasSpouse><ont3:Woman rdf:ID="woman4"/></ont3:hasSpouse>
</ont3:Man>


</rdf:RDF>
