<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:main" xmlns="urn:main" xmlns:auto1="urn:imported">
    <xsd:import schemaLocation="keyref-imported.xsd" namespace="urn:imported"/>
    <xsd:element name="root">
        <xsd:complexType>
            <xsd:sequence maxOccurs="unbounded">
                <xsd:element ref="auto1:items"/>
            </xsd:sequence>
            <xsd:attribute name="main" type="xsd:integer"/>
        </xsd:complexType>
        <xsd:unique name="noDuplicate">
            <xsd:selector xpath="auto1:items"/>
            <xsd:field xpath="@id"/>
        </xsd:unique>
        <xsd:keyref name="parent" refer="auto1:index">
            <xsd:selector xpath="."/>
            <xsd:field xpath="@main"/>
        </xsd:keyref>
    </xsd:element>
</xsd:schema>