<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.castor.org/Test"
            xmlns:cst="http://www.castor.org/Test"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

   <!-- Test for element declaration with keyref -->


   <xsd:element name="person">
      <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="forename" type="xsd:string"/>
            <xsd:element name="surname" type="xsd:string"/>
            <xsd:element name="ssn" type="xsd:string"/>
         </xsd:sequence>
      </xsd:complexType>
      <xsd:key name="ssn">
         <xsd:selector xpath="./person"/>
         <xsd:field xpath="ssn"/>
      </xsd:key>
      <xsd:keyref name="personRef" refer="ssn">
         <xsd:selector xpath="./person"/>
         <xsd:field xpath="ssn"/>
      </xsd:keyref>
   </xsd:element>

</xsd:schema>
