<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
  targetNamespace="schema:Pos_0710_identity_constraint_definition_schema_components_003"
  xmlns:ns226="schema:Pos_0710_identity_constraint_definition_schema_components_003">
  <complexType name="unitInventory">
    <sequence>
      <element name="item" minOccurs="0" maxOccurs="unbounded">
        <complexType>
          <attribute name="itemId" type="integer"/>
        </complexType>
      </element>
    </sequence>
    <attribute name="unitRef" type="integer"/>
  </complexType>

  <complexType name="unitDescription">
    <sequence>
      <element name="desc" type="string" />
    </sequence>
    <attribute name="unitId" type="integer"/>
  </complexType>

  <element name="MyType">
    <complexType>
      <sequence>
        <element name="unitInventory" type="ns226:unitInventory" minOccurs="0" maxOccurs="unbounded" />
        <element name="unitDesc" type="ns226:unitDescription" minOccurs="0" maxOccurs="unbounded"/>
      </sequence>
    </complexType>
    <key name="unitKey">
      <selector xpath="ns226:unitDesc"/>
      <field xpath="@unitId"/>
    </key>
    <keyref name="myKeyRef" refer="ns226:unitKey">
      <selector xpath="ns226:unitInventory"/>
      <field xpath="@unitRef"/>
    </keyref>
  </element>  
</schema>
