title: XMl not being validated correctly against generated xsd
body: <p>I have the following xml</p>
  <pre><code>        &lt;Payment xsi:type=&quot;ns4:PayCardDetails&quot; xmlns:ns4=&quot;urn:main:types/common/payment_v1&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
              &lt;Card_number&gt;354234&lt;/Card_number&gt;
              &lt;Card_type&gt;xyz&lt;/Card_type&gt;
              &lt;Card_end end=&quot;2021-12-31&quot;/&gt;
              &lt;Card_name&gt;jacob K&lt;/Card_name&gt;
              &lt;Card_code&gt;111&lt;/Card_code&gt;
          &lt;/Payment&gt;
  </code></pre>
  <p>xsd i created via tool :</p>
  <pre><code>      &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Payment&quot;&gt;
          &lt;xs:complexType&gt;
            &lt;xs:sequence&gt;
              &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Card_number&quot; type=&quot;xs:unsignedLong&quot; /&gt;
              &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Card_type&quot; type=&quot;xs:unsignedByte&quot; /&gt;
              &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Card_end&quot;&gt;
                &lt;xs:complexType&gt;
                  &lt;xs:attribute name=&quot;end&quot; type=&quot;xs:date&quot; use=&quot;optional&quot; /&gt;
                &lt;/xs:complexType&gt;
              &lt;/xs:element&gt;
              &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Card_name&quot; type=&quot;xs:string&quot; /&gt;
              &lt;xs:element minOccurs=&quot;0&quot; name=&quot;Card_code&quot; type=&quot;xs:unsignedByte&quot; /&gt;
            &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
        &lt;/xs:element&gt;
  </code></pre>
  <p>I get an error when validating against the xsd of:</p>
  <pre><code>cannot resolve ns4:PayCardDetails toa  type definition Payment 
  </code></pre>
  <p>I believe my xsd is not right, i recoved this xmlf rom third party and was trying to generate my own xsd. can i do that?</p>