title: Mixed Type XSD Validation help
body: <p>I've been tasked with building an XSD to validate a given xml, my issue is that some of the XML elements are of the form </p>
  
  <pre><code>&lt;ElementName description="i am an element"&gt;1234567&lt;/ElementName&gt;
  </code></pre>
  
  <p>I need to build the XSD that validates the Element 'value' not the attribute so with my increadibly limited experience in building XSDs (I've read the W3C tutorial) i tried this</p>
  
  <pre><code>&lt;xs:element name ="ElementName" type="xs:int"&gt;
      &lt;xs:complexType mixed="true"&gt;
           &lt;xs:attribute name="description" type="xs:string"/&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>and lo and behold ... it doesn't work, it says:</p>
  
  <blockquote>
    <p>"The Type attribute cannot be present with either simpleType or complexType"</p>
  </blockquote>
  
  <p>i'm sure it's some thing stupid i've done but couldn't find an answer/misinterpreted answers elsewhere !</p>
  
  <p>Thanks in advance</p>