title: Enums don't match schema: problem with jaxb or xsd?
body: <p>I'm trying to use JAXB to unmarshal <a href="http://www.acf.hhs.gov/programs/cb/systems/nytd/nytd_data_file_format.xsd" rel="nofollow">this file</a> into Java objects.  I know that there's a problem with SAX in J6 that rejects the maxOccurs line, and I've changed it to <code>unbounded</code>.  However, when I <code>xjc</code> it, it's not creating all the classes &amp; enums I need.  For example, there should be a <code>educationLevelType</code> enum.  What's more, I'ved tried MS's xsd unmarshaller, it it creates everything correctly.</p>
  
  <p>Can someone with more experience than I look at this and tell me what I'm missing?  Is there something that needs to be corrected in the xsd, or is there a bug in JAXB? </p>
  
  <p><strong>Update</strong>
  Blaise completely answered this question as asked.  Unfortunately, IMHO, this makes JAXB worthless.  The whole idea is that I can <em>generate</em> classes from a schema - I shouldn't have to know stuff about the structure beforehand.  If I have to create a custom bindings file, I might as well just create a schema that produces the code I want.  But then, why stop there?  Why not just skip all those steps and generate the classes I want?</p>
  
  <p>In the end, a coworker pointed me to <a href="http://xmlbeans.apache.org/" rel="nofollow">Apache XMLBeans</a> - the project's a little older, but it creates the objects without trouble.  Codehaus also has a <a href="http://mojo.codehaus.org/xmlbeans-maven-plugin/" rel="nofollow">xmlbeans-maven-plugin</a> for it.</p>