title: XML unique wrong syntax?
body: <p>This problem is taking me too long to fix </p>
  
  <p>I could use some guidance</p>
  
  <p>I'm trying to define a game board and i want to be
  sure each house can only exist once, meaning it has a 
  set of coordinates unique.</p>
  
  <p>I don't understand why my code accepts repeated values of Coordinates</p>
  
  <p>
  </p>
  
  <pre><code>&lt;xs:element name="Board"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence minOccurs="3" maxOccurs="unbounded"&gt;
              &lt;xs:element name="house" type="Tile"&gt;
                  &lt;xs:unique name="tileKey"&gt;
                      &lt;xs:selector xpath="./Point"/&gt;
                      &lt;xs:field xpath="x"/&gt;
                      &lt;xs:field xpath="y"/&gt;
                  &lt;/xs:unique&gt;                
              &lt;/xs:element&gt;           
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:complexType name="Tile"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="Point" type="Coords"/&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  
  &lt;xs:complexType name="Coords"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="x" type="xs:int"/&gt;
          &lt;xs:element name="y" type="xs:int"/&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p></p>
  
  <p>If i have 3 houses with x and y 0 the xml is valid.
  What am I doing wrong?</p>
  
  <p>output is something like</p>
  
  <pre><code>&lt;Board&gt;
  &lt;house&gt;
      &lt;Point&gt;
          &lt;x&gt;0&lt;/x&gt;
          &lt;y&gt;0&lt;/y&gt;
      &lt;/Point&gt;
  &lt;/house&gt;
  &lt;/Board&gt;
  </code></pre>
  
  <p>Thank you for your help</p>