title: Working with Multiple XSD's
body: <p>I have an xsd which has 3 imports to another xsd, 8 complex types and 3 simple types. </p>
  
  <p>Now of this I have to work on only 1 compex type, which in turn inherits many other XSD - mainly the 3 imports which current xsd's has.</p>
  
  <p>I will be getting XML file containing data only according to 1 complex type only, which I have mentioned. </p>
  
  <p>Now am trying to generate sample XML file which contains data according to single complex type and am trying to validate it, but when I try to do so using XMLSpy or OxygenXML it says that root node is not defined. </p>
  
  <p>Now, when I try to define root nodes it does not allow me to do so and if I try to create another xsd just for this complex type than also it gives me some errors as inherited xsd which this complex type points to in initial xsd is not working in new one, I tried to inherit 3 xsd's to which complex type point to in initial xsd in new xsd but still it is not working. </p>
  
  <p>Also my another question is - Can we validate XML file against some part of XSD as compared to complete XSD because XML what am getting is according to 1 complex element type in XSD ?</p>
  
  <p>Format of Initial XSD:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schema location targetNamespace=targetnamespace elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.652"&gt;
      &lt;xs:import namespace=first xsd which is imported&gt;
      &lt;xs:import namespace=second xsd which is imported&gt;
      &lt;xs:import namespace=third xsd which is imported&gt;
      &lt;xs:complexType name="firstcomplextype" abstract="false"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="some value" type="xs:string" minOccurs="0"/&gt;
              &lt;xs:element name="some value" type="some value"/&gt;
              &lt;xs:element name="some value" type="xs:string" minOccurs="0"/&gt;
          &lt;/xs:sequence&gt;
          &lt;xs:attribute name="some value" type="xs:int" use="required"/&gt;
          &lt;xs:attribute name="some value" type="xs:value" use="required"/&gt;
          &lt;xs:attribute name="some value" type="xs:int" use="required"/&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="second complex type" abstract="false"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="some value" type="xs:some value" minOccurs="0"/&gt;
              &lt;xs:element name="some value" type="xs:some value" minOccurs="0"/&gt;
              &lt;xs:element name="some value" type="some value"/&gt;
              &lt;xs:element name="some value" type="some value"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="third complex type**I need to work with only this complex type and xml file will contain data according to this complex type only and I need to validate incoming XML against only this complex type**" abstract="false"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="some value" minOccurs="0"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element name="some value" type="some value" minOccurs="0" maxOccurs="unbounded"/&gt;
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element name="some value" type="some value"/&gt;
              &lt;xs:element name="some value" minOccurs="0"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element name="some value" type="some value" minOccurs="0" maxOccurs="unbounded"/&gt;---**Here this particular element points to another XSD, one of the imported XSD's**
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:sequence minOccurs="0"&gt;
                  &lt;xs:element name="some value" type="xs:some value" minOccurs="0" maxOccurs="unbounded"/&gt;
                  &lt;xs:element name="some value" minOccurs="0"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:sequence&gt;
                              &lt;xs:element name="some value" type="some value" minOccurs="0" maxOccurs="unbounded"/&gt;---**Here this particular element points to another XSD, one of the imported XSD's**
                          &lt;/xs:sequence&gt;
                      &lt;/xs:complexType&gt;
                  &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
              &lt;xs:sequence minOccurs="0"&gt;
                  &lt;xs:element name="some value" type="xs:some value" minOccurs="0" maxOccurs="unbounded"/&gt;
                  &lt;xs:element name="some value" minOccurs="0"&gt;
                      &lt;xs:complexType&gt;
                          &lt;xs:sequence&gt;
                              &lt;xs:element name="some value" type="some value" minOccurs="0" maxOccurs="unbounded"/&gt;
                          &lt;/xs:sequence&gt;
                      &lt;/xs:complexType&gt;
                  &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
      &lt;xs:complexType name="4th complex type" abstract="false"&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="elements"&gt;
                  &lt;xs:complexType&gt;
                      &lt;xs:sequence&gt;
                          &lt;xs:element name="some value" type="some value" maxOccurs="unbounded"/&gt;
                      &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>and the xsd continues as it has many more complex types and simple types. Any guidance would be highly appreciated. </p>