title: Cannot resolve the name 'common:DateRange' to a(n) 'type definition' component
body: <p>I have two xml schema files schema1.xsd schema2.xsd.
  schema2.xsd is imported inside schema1.xsd
  Whan i try to parse schema1.xsd in JAXB as the following:</p>
  
  <pre><code>Schema schema = factory.newSchema(new StreamSource(schemaString));
  </code></pre>
  
  <p>I got the following exception:</p>
  
  <pre><code>org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 62; src-resolve: Cannot resolve the name 'common:DateRange' to a(n) 'type definition' component.
  </code></pre>
  
  <p><strong>Schema1.xsd</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      targetNamespace="http://www.example.com" xmlns="http://www.example.com"
      xmlns:common="http://www.example.com/common"&gt;
  
  &lt;xs:import namespace="http://www.example.com/common" schemaLocation="schema2.xsd" /&gt;
  
      &lt;xs:element name="exType" type="ExampleType" /&gt;
      &lt;xs:complexType name="ExampleType"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:sequence minOccurs="0"&gt;
                  &lt;xs:element name="activeDates" type="common:DateRange" /&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p><strong>Schema2.xsd:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns="http://www.example.com/common" 
  targetNamespace="http://www.example.com/common"&gt;
  
      &lt;xs:complexType name="DateRange"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="startDate" type="xs:dateTime"/&gt;
              &lt;xs:element name="endDate" type="xs:dateTime"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:schema&gt;
  </code></pre>