title: What does elementFormDefault do in XSD?
body: <p>What does <code>elementFormDefault</code> do, and when should it be used?</p>
  
  <p>So I found some definitions for <code>elementFormDefault</code> values:</p>
  
  <blockquote>
    <p><strong>qualified</strong> - elements and attributes
    are in the targetNamespace of the
    schema </p>
    
    <p><strong>unqualified</strong> - elements and
    attributes do not have a namespace</p>
  </blockquote>
  
  <p>So from that definition I would think that if a schema is set to qualified then why must you prefix the type with the namespace?  And what are the scenarios that you would even have one set to unqualified for that matter?  I tried Googling, but all I got were a couple W3C pages that were extremely hard to understand.</p>
  
  <p>This is the file I am working with right now, why do I need to declare the type as <code>target:TypeAssignments</code> when I declare the <code>targetNamespace</code> as the same one as <code>xmlns:target</code>?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema xmlns="http://www.w3.org/2001/XMLSchema"
          xmlns:target="http://www.levijackson.net/web340/ns"
          targetNamespace="http://www.levijackson.net/web340/ns" 
          elementFormDefault="qualified"&gt;
    &lt;element name="assignments"&gt;
      &lt;complexType&gt;
        &lt;sequence&gt;
          &lt;element name="assignments" type="target:TypeAssignments"
                   minOccurs="1" maxOccurs="unbounded"/&gt;
        &lt;/sequence&gt;
      &lt;/complexType&gt;
    &lt;/element&gt;
    &lt;complexType name="TypeAssignments"&gt;
      &lt;sequence&gt;
        &lt;element name="assignment" type="target:assignmentInfo"
                 minOccurs="0" maxOccurs="unbounded"/&gt;
      &lt;/sequence&gt;
    &lt;/complexType&gt;
    &lt;complexType name="assignmentInfo"&gt;
      &lt;sequence&gt;
        &lt;element name="name" type="string"/&gt;
        &lt;element name="page" type="target:TypePage"/&gt;
        &lt;element name="file" type="target:TypeFile" 
                 minOccurs="0" maxOccurs="unbounded"/&gt;
      &lt;/sequence&gt;
      &lt;attribute name="id" type="string" use="required"/&gt;
    &lt;/complexType&gt;
    &lt;simpleType name="TypePage"&gt;
      &lt;restriction base="integer"&gt;
        &lt;minInclusive value="50" /&gt;
        &lt;maxInclusive value="498" /&gt;
      &lt;/restriction&gt;
    &lt;/simpleType&gt;
    &lt;simpleType name="TypeFile"&gt;
      &lt;restriction base="string"&gt;
        &lt;enumeration value=".xml" /&gt;
        &lt;enumeration value=".dtd" /&gt;
        &lt;enumeration value=".xsd" /&gt;
      &lt;/restriction&gt;
    &lt;/simpleType&gt;
  &lt;/schema&gt;
  </code></pre>