<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" targetNamespace="myNS.tempuri.org" xmlns:myNS="myNS.tempuri.org" xmlns="myNS.tempuri.org">
	<xsd:element name="root">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="uid" type="uidtype" maxOccurs="unbounded"/>
				<xsd:element ref="kid" maxOccurs="unbounded"/>
			</xsd:sequence>
		</xsd:complexType>
		<xsd:key id="foo1233" name="kkid">
			<xsd:selector xpath=".//myNS:kid"/>
			<xsd:field xpath="@myNS:val"/>
		</xsd:key>
		<xsd:keyref id="foo123" name="kruuid" refer="kkid">
			<xsd:selector xpath=".//myNS:uid"/>
			<xsd:field xpath="myNS:iid/@myNS:val"/>
		</xsd:keyref>
	</xsd:element>
	<xsd:complexType name="uidtype">
		<xsd:sequence>
			<xsd:element name="iid">
				<xsd:complexType>
					<xsd:attribute name="val" type="xsd:string"/>
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:element name="kid">
		<xsd:complexType>
			<xsd:attribute name="val" type="xsd:string" form="qualified"/>
		</xsd:complexType>
	</xsd:element>
</xsd:schema>
