<xsd:schema
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="urn:a"
  xmlns:a="urn:a"
  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
  jaxb:version="2.0"
  elementFormDefault="qualified">

  <xsd:element name="a" type="a:AType"/>
  <xsd:element name="enumA" type="a:A2EnumType"/>

  <xsd:complexType name="AType">
    <xsd:sequence>
      <xsd:element name="a1" type="a:A1Type"/>
    </xsd:sequence>
    <xsd:attribute name="a2" type="a:A2EnumType"/>
  </xsd:complexType>

  <xsd:complexType name="A1Type">
    <xsd:sequence>
      <xsd:element name="a1" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>


  <xsd:simpleType name="A2EnumType">
    <xsd:annotation><xsd:appinfo>
      <jaxb:typesafeEnumClass>
      </jaxb:typesafeEnumClass>
    </xsd:appinfo></xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="ABC" />
      <xsd:enumeration value="DEF" />
      <xsd:enumeration value="GHI" />
    </xsd:restriction>
  </xsd:simpleType>
  
</xsd:schema>