title: How to validate xsd schema if it includes ohter schemas?
body: <p>I want to use <code>xjc</code> tool for genrating classes from <code>xsd</code> file.</p>
  
  <p>But I cought foloowing <strong><em>exception</em></strong>:</p>
  
  <pre><code>$ xjc -d generated POCD_MT000040.xsd
  parsing a schema...
  compiling a schema...
  Exception in thread "main" java.lang.IllegalArgumentException: trying to create the same field twice: id
          at com.sun.codemodel.internal.JDefinedClass.field(JDefinedClass.java:410)
          at com.sun.codemodel.internal.JDefinedClass.field(JDefinedClass.java:381)
          at com.sun.tools.internal.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:62)
          at com.sun.tools.internal.xjc.generator.bean.field.SingleField.&lt;init&gt;(SingleField.java:79)
          at com.sun.tools.internal.xjc.generator.bean.field.SingleField.&lt;init&gt;(SingleField.java:66)
          at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown Source)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
          at com.sun.tools.internal.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:54)
          at com.sun.tools.internal.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:67)
          at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:759)
          at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:540)
          at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.&lt;init&gt;(BeanGenerator.java:243)
          at com.sun.tools.internal.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:151)
          at com.sun.tools.internal.xjc.model.Model.generateCode(Model.java:275)
          at com.sun.tools.internal.xjc.Driver.run(Driver.java:342)
          at com.sun.tools.internal.xjc.Driver.run(Driver.java:184)
          at com.sun.tools.internal.xjc.Driver._main(Driver.java:107)
          at com.sun.tools.internal.xjc.Driver.access$000(Driver.java:64)
          at com.sun.tools.internal.xjc.Driver$1.run(Driver.java:87)
  </code></pre>
  
  <p>I tried to calidate this schema at online validator but it includes three others schemas:</p>
  
  <pre><code>&lt;xs:include schemaLocation="coreschemas/datatypes.xsd"/&gt;
  &lt;xs:include schemaLocation="coreschemas/voc.xsd"/&gt;
  &lt;xs:include schemaLocation="coreschemas/NarrativeBlock.xsd"/&gt;
  </code></pre>
  
  <p>And fails with bunch of errors.  </p>
  
  <p>And now I don't know <strong><em>how to generate classes from this schema</em></strong>?  </p>
  
  <p>And how does validate it now?<br>
  Any suggestions?</p>