<?xml version="1.0" ?> 
<xsd:schema 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	>
	
	<!-- define what a list looks like -->
	<xsd:element name="array">
	    <xsd:complexType>
    		<!-- elements must be in the order specified -->
	        <xsd:sequence>
    			<!-- at least one and up to 256 instances of element 'e' -->
	            <xsd:element name="e" minOccurs="1" maxOccurs="256">
	                <xsd:complexType>
	                    <xsd:attribute name="val" type="xsd:integer"/>
	                </xsd:complexType>
	            </xsd:element>
	        </xsd:sequence>
	    </xsd:complexType>
	</xsd:element>                    
	
	<!-- define what a 'sub' looks like -->
	<xsd:element name="sub">
	    <xsd:complexType>
	        <xsd:attribute name="x" type="xsd:integer"/>
	        <xsd:attribute name="y" type="xsd:integer"/>
	        <xsd:attribute name="z" type="xsd:string"/>
	    </xsd:complexType>                    
	</xsd:element>
	            
	<!-- define what a 'doc3' looks like -->
	<xsd:element name="doc3">
	    <xsd:complexType >
    		<!-- elements must be in the order specified -->
	        <xsd:sequence>
        		<!-- one instance only of element 'array'-->
	            <xsd:element ref="array" minOccurs="1" maxOccurs="1"/>
        		<!-- one instance only of element 'sub'-->
	            <xsd:element ref="sub"   minOccurs="1" maxOccurs="1"/>
	        </xsd:sequence>
	        <xsd:attribute name="a" type="xsd:string"/>
	        <xsd:attribute name="b" type="xsd:double"/>
	        <xsd:attribute name="c" type="xsd:integer"/>
	    </xsd:complexType>
	</xsd:element>
</xsd:schema>
