title: When should a complex type be declared by directly naming the element, as opposed to using the type attribute?
body: <p><a href="http://www.w3schools.com/schema/schema_complex.asp" rel="nofollow">http://www.w3schools.com/schema/schema_complex.asp</a></p>
  
  <p><strong>In this following snippit, why should the first way ever be used over the second?</strong></p>
  
  <blockquote>
    <p>We can define a complex element in an XML Schema two different ways:</p>
    
    <p>A. The "employee" element can be declared directly by naming the element, like this: </p>
  </blockquote>
  
  <pre><code>&lt;xs:element name="employee"&gt;   
   &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
     &lt;xs:element name="firstname" type="xs:string"/&gt;
     &lt;xs:element name="lastname" type="xs:string"/&gt;
    &lt;/xs:sequence&gt;   
   &lt;/xs:complexType&gt; 
  &lt;/xs:element&gt;
  </code></pre>
  
  <blockquote>
    <p>If you use the method described above, only the "employee" element can
    use the specified complex type. Note that the child elements,
    "firstname" and "lastname", are surrounded by the 
    indicator. This means that the child elements must appear in the same
    order as they are declared. You will learn more about indicators in
    the XSD Indicators chapter.</p>
    
    <p>B. The "employee" element can have a type attribute that refers to the name of the complex type to use: </p>
  </blockquote>
  
  <pre><code>&lt;xs:complexType name="personinfo"&gt;   
   &lt;xs:sequence&gt;
    &lt;xs:element name="firstname" type="xs:string"/&gt;
    &lt;xs:element name="lastname" type="xs:string"/&gt;  
   &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <blockquote>
    <p>If you use the method described above, several elements can refer to
    the same complex type, like this: </p>
  </blockquote>
  
  <pre><code>&lt;xs:element name="employee" type="personinfo"/&gt; 
  &lt;xs:element name="student" type="personinfo"/&gt;
  &lt;xs:element name="member" type="personinfo"/&gt;
  
  &lt;xs:complexType name="personinfo"&gt;  
   &lt;xs:sequence&gt;
    &lt;xs:element name="firstname" type="xs:string"/&gt;
    &lt;xs:element name="lastname" type="xs:string"/&gt;   
   &lt;/xs:sequence&gt; 
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p><strong>Why should the first way ever be used over the second?</strong></p>