title: xml schema validation problems
body: <p>i'm trying to use an xml schema validator, but i get an error message saying "premature end of file" i can not seem to find where this error is. 
  here is my xsd file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;xs:element name="orders"&gt;
   &lt;xs:element name ="order" maxOccurs="unbounded"&gt;
    &lt;xs:complexType&gt;
     &lt;xs:sequence&gt;  
      &lt;xs:element name="case" type="xs:caseColor" &gt;
        &lt;xs:simpleType name="caseColor"&gt;
          &lt;xs:restriction base="string"&gt;
              &lt;xs:enumeration value="Lemonde" /&gt;
              &lt;xs:enumeration value="Strawberry" /&gt;
              &lt;xs:enumeration value="Lime" /&gt;
              &lt;xs:enumeration value="Blueberry" /&gt;
          &lt;/xs:restriction&gt; 
        &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name="batteries" type="xs:numOfBat" default = 
  "1"&gt; 
        &lt;xs:simpleType name="numOfBat"&gt;
          &lt;xs:restriction base="integer"&gt;
              &lt;xs:enumeration value="1" /&gt;
              &lt;xs:enumeration value="2" /&gt;
              &lt;xs:enumeration value="3" /&gt;
              &lt;xs:enumeration value="4" /&gt;
          &lt;/xs:restriction&gt; 
        &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name="recharger" type="xs:volt"&gt; 
      &lt;xs:simpleType name="volt"&gt;
          &lt;xs:restriction base="string"&gt;
              &lt;xs:enumeration value="110-120" /&gt;
              &lt;xs:enumeration value="220-240" /&gt;
          &lt;/xs:restriction&gt; 
      &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name="arm"&gt; 
         &lt;xs:element name ="reaches" minOccurs="2" maxOccurs="3" 
  type="xs:reach"&gt;
           &lt;xs:simpleType name="reach"&gt;
              &lt;xs:restriction base = "integer"&gt;
                &lt;xs:enumeration value = "50" /&gt;
                &lt;xs:enumeration value = "75" /&gt; 
                &lt;xs:enumeration value = "100" /&gt;
               &lt;/xs:restriction&gt;
       &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
     &lt;/xs:element&gt;
      &lt;xs:element name ="camera" type="numOfCam"&gt; 
        &lt;xs:simpleType name="numOfCam"&gt;
          &lt;xs:restriction base="string"&gt;
              &lt;xs:enumeration value="1" /&gt;
              &lt;xs:enumeration value="2" /&gt;
          &lt;/xs:restriction&gt; 
        &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name = "speech" type="xs:language"&gt;
        &lt;xs:simpleType name = "language"&gt;
          &lt;xs:restriction base = "string"&gt;
              &lt;xs:enumeration value = "Spanish" /&gt;
              &lt;xs:enumeration value = "Chinese" /&gt;
              &lt;xs:enumeration value = "English" /&gt;
              &lt;xs:enumeration value = "German" /&gt;
              &lt;xs:enumeration value = "French" /&gt;
           &lt;/xs:restriction&gt;
         &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
     &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
   &lt;/xs:element&gt;
  &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>and the location of the error is saying it's on line -1,-1. </p>
  
  <p>here is my dtd file just in case as well</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE orders [
  &lt;!ELEMENT orders (order+)&gt;
  &lt;!ELEMENT order (case, batteries, recharger, arm, camera, 
  speech)&gt;
  &lt;!ELEMENT case (#PCDATA)&gt;
  &lt;!ELEMENT batteries (#PCDATA)&gt;
  &lt;!ELEMENT recharger (#PCDATA)&gt;
  &lt;!ELEMENT arm (reach)&gt;
  &lt;!ELEMENT reach (#PCDATA)&gt;
  &lt;!ELEMENT camera (#PCDATA)&gt;
  &lt;!ELEMENT speech (#PCDATA)&gt;
  ]&gt;
  </code></pre>
  
  <p>and the error does not say which file the error is coming from. this is the validator in which i am using. <a href="http://corefiling.com/opensource/schemaValidate.html" rel="nofollow">http://corefiling.com/opensource/schemaValidate.html</a></p>
  
  <p>i guess since i can't use my dtd, here is my xml file.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;orders&gt;
    &lt;order&gt;
      &lt;case&gt; Strawberry &lt;/case&gt;
      &lt;batteries&gt; 2 &lt;/batteries&gt;
      &lt;recharger&gt; 110-120 V &lt;/recharger&gt;
      &lt;arm&gt; 2 
         &lt;length&gt; 50 &lt;/length&gt;
         &lt;length&gt; 100 &lt;/length&gt;
      &lt;/arm&gt;
      &lt;camera&gt; 2 &lt;/camera&gt;
      &lt;speech&gt; Spanish &lt;/speech&gt;
    &lt;/order&gt;
    &lt;order&gt;
      &lt;case&gt; Lime &lt;/case&gt;
      &lt;batteries&gt; 4 &lt;/batteries&gt;
      &lt;recharger&gt; 220-240 V &lt;/recharger&gt;
      &lt;arm&gt; 3 
         &lt;length&gt; 75 &lt;/length&gt;
         &lt;length&gt; 75 &lt;/length&gt;
         &lt;length&gt; 100 &lt;/length&gt;
      &lt;/arm&gt;
      &lt;camera&gt; 1 &lt;/camera&gt;
      &lt;speech&gt; Chinese &lt;/speech&gt;
    &lt;/order&gt;
    &lt;order&gt;
      &lt;case&gt; Blueberry &lt;/case&gt;
      &lt;batteries&gt; 1 &lt;/batteries&gt;
      &lt;recharger&gt; 110-120 V &lt;/recharger&gt;
      &lt;arm&gt; 2 
         &lt;length&gt; 75 &lt;/length&gt;
         &lt;length&gt; 100 &lt;/length&gt;
      &lt;/arm&gt;
      &lt;camera&gt; 2 &lt;/camera&gt;
      &lt;speech&gt; French &lt;/speech&gt;
    &lt;/order&gt;
  &lt;/orders&gt;
  </code></pre>