title: XSD: Unable to use type defined in the same XSD
body: <p>I'm writting the following XSD, however I'm having problems with it. For whatever reason, I'm not being allowed to  use my simple types that I define in my XSD. I'm getting this error: <code>Cannot resolve the name 'mySimpleType1' to a(n) 'simpleType definition' component.</code></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
      xmlns="http://myNamespace" 
      targetNamespace="http://myDifferentNamespace" 
      elementFormDefault="qualified" 
      attributeFormDefault="unqualified"&gt;
  
      &lt;xsd:simpleType name="mySimpleType1"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
              &lt;xsd:enumeration value="Added"/&gt;
              &lt;xsd:enumeration value="Modified"/&gt;
              &lt;xsd:enumeration value="Deleted"/&gt;
          &lt;/xsd:restriction&gt;
      &lt;/xsd:simpleType&gt;
      &lt;xsd:simpleType name="mySimpleType2"&gt;
          &lt;xsd:restriction base="xsd:string"&gt;
              &lt;xsd:enumeration value="foo"/&gt;
              &lt;xsd:enumeration value="bar"/&gt;
          &lt;/xsd:restriction&gt;
      &lt;/xsd:simpleType&gt;
      &lt;xsd:attributeGroup name="myAttributeGroup"&gt;
          &lt;xsd:attribute name="attribute1" type="mySimpleType1" use="optional"/&gt;
          &lt;xsd:attribute name="attribute2" type="mySimpleType2" use="optional"/&gt;
      &lt;/xsd:attributeGroup&gt;
  &lt;/xsd:schema&gt;
  </code></pre>