<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="customer" >
        <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
                <xs:element name="person" type="Person"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    
    <xs:attributeGroup name="personattr">
        <xs:attribute name="attr1" type="xs:string"/>
        <xs:attribute name="attr2" type="xs:integer"/>
    </xs:attributeGroup>
    
    <xs:complexType name="Person">
        <xs:attributeGroup ref="personattr"/>
    </xs:complexType> 
    
</xs:schema> 