<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>

<!-- 
attributeGroup with just another attributeGroup, the xml has the attributes
-->

<xsd:attribute name="foo" type="xsd:string"/>
<xsd:attribute name="bar" type="xsd:string" />

<xsd:attributeGroup name="attG2">
   <xsd:attribute name="att1" type="xsd:int" />
</xsd:attributeGroup>

<xsd:attributeGroup name="attG" id="abc">
   <xsd:attributeGroup ref="attG2"/>
</xsd:attributeGroup>

<xsd:complexType name="attgRef">
   <xsd:attributeGroup ref="attG"/>
</xsd:complexType>

<xsd:element name="doc">
    <xsd:complexType>
            <xsd:choice>
                <xsd:element name="elem" type="attgRef"/>
            </xsd:choice>
    </xsd:complexType>
</xsd:element>


</xsd:schema>
