title: JAXB Generated classes giving namespace cannot be resolved error
body: <p>Reference to my previous 2 posts (<a href="https://stackoverflow.com/questions/11620825/xsd-for-having-2-root-elements-1-at-a-time/11623044#11623044">post 1</a>, <a href="https://stackoverflow.com/questions/11658181/unable-to-understand-jaxb-unmarshalling-behaviour">post 2</a>). Now i am stuck at another weird problem (I am noob at JAXB). I have generated the Java classes using my book.xsd (which included bookList and book as root element). Everything is working fine. Now I am creating totally separate XSD for <strong>reviews</strong>. </p>
  
  <pre><code>&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
             elementFormDefault="qualified" attributeFormDefault="unqualified"&gt;
  &lt;xs:element name="reviews"&gt;
      &lt;xs:complexType&gt;
           &lt;xs:sequence&gt;
               &lt;xs:element name="review" type="reviewType" minOccurs="0" maxOccurs="unbounded"/&gt;
           &lt;/xs:sequence&gt;
           &lt;xs:attribute name="self" type="xs:anyURI" /&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:complexType name="reviewType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1" /&gt;
          &lt;xs:element name="comments" type="xs:string" minOccurs="1" maxOccurs="1" /&gt;
          &lt;xs:element name="rating" type="xs:integer" minOccurs="1" maxOccurs="1" /&gt;
      &lt;/xs:sequence&gt;
       &lt;xs:attribute name="self" type="xs:anyURI" /&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now when i generate java classes using JAXB, it starts giving me following error like <code>The element declaration with name 'reviews' and namespace '' cannot be resolved</code>.</p>
  
  <p>Any idea ? </p>
  
  <p><strong>UPDATED</strong>
  I figured out that i am using a common.xsd which has basic information being used across multiple xsd. Informations like <code>authorType</code> etc. Now common.xsd is being used by my books.xsd and reviews.xsd as well and probably thats the reason i am getting this namespace error. How can i avoid this error here? </p>
  
  <p>Schema is already here.</p>