<xs:schema
  attributeFormDefault="unqualified"
  elementFormDefault="qualified"
  xmlns="http://www.foo.com/sample"
  targetNamespace="http://www.foo.com/sample"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="heading">
    <xs:complexType>
      <xs:attribute name="code" type="xs:string" use="required"/>
      <xs:attribute name="name" type="xs:string" use="required"/>
    </xs:complexType>
  </xs:element>

</xs:schema>
