--- |
<?xml version="1.0" encoding="UTF-8"?>
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
 <xs:complexType name="myComplexType">
   <xs:sequence>
     <xs:element name="bar" minOccurs="0" />
     <xs:element name="baz" minOccurs="0" />
   </xs:sequence>
 </xs:complexType>
 <xs:element name="myElement">
   <xs:complexType>
     <xs:simpleContent>
       <xs:extension base="myComplexType">
         <xs:attribute name="myAttribute" type="xs:integer"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
 </xs:element>
 </xs:schema>

--- |
 <myElement myAttribute="10">
   <bar />
   <baz />
 </myElement>
--- >
PASS

--- |
 <myElement myAttribute="foo" />
--- >
FAIL