<xsd:schema
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns="http://xbean/scomp/attribute/AttributeGroup"
  targetNamespace="http://xbean/scomp/attribute/AttributeGroup"
  >
 <xsd:attribute name="globalAttr" type="xsd:decimal"/>
 <xsd:attributeGroup name="simpleGroup">
     <xsd:attribute name="date" type="xsd:date"/>
 </xsd:attributeGroup>

 <xsd:attributeGroup name="AttGroup">
     <xsd:attribute name="ID" type="xsd:ID" use="required"/>
     <xsd:attribute name="version" type="xsd:decimal"/>
     <xsd:attribute ref="globalAttr"/>
     <xsd:anyAttribute namespace="##other" processContents="lax"/>
 </xsd:attributeGroup>

  <xsd:complexType name="GlobalT">
      <xsd:sequence>
          <xsd:element name="child1" minOccurs="0"/>
          <xsd:element name="child2"/>
      </xsd:sequence>
      <xsd:attributeGroup ref="AttGroup"/>
  </xsd:complexType>

  <xsd:element name="AttGroupElt" type="GlobalT"/>
</xsd:schema>