<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:this="www.example.org/attribgroup/ingroup"
    targetNamespace="www.example.org/attribgroup/ingroup">

<xsd:complexType name="AttrGroupinGroup">
	<xsd:attributeGroup ref="this:AttributeGroup"/>
</xsd:complexType>

<xsd:attribute name="remoteSchema" type="xsd:anyURI">
</xsd:attribute>

<xsd:attributeGroup name="AttributeGroup">
	<xsd:attributeGroup ref="this:simpleLink"/>
	<xsd:attribute ref="this:remoteSchema" use="optional"/>
</xsd:attributeGroup>

<xsd:attributeGroup name="simpleLink">
	<xsd:attribute name="type" type="xsd:string" fixed="simple" form="qualified"/>
</xsd:attributeGroup>

</xsd:schema>

