title: Understanding XML Schema Data types
body: <p>I'm working through an XML assignment and I'm not sure if I'm doing this part right. 
  Its asking to :</p>
  
  <p>• grantType, based on the ID data type and following the regular expression pattern
  “[A-Z]{6}-\d{4}-\d{2}”</p>
  
  <p>• fundingType based on the string data type and limited to the following values:
  federal, state, local, and private</p>
  
  <p>The part that is throwing me off is when it is asking to follow the regular expression pattern am I suppose to input the reg pattern or is it suppose to be like I have it below?</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;grant grantNum="NIHCCC-4481-05" funding="federal government"&gt;
  
     &lt;title&gt;NIH Clinical Cancer Basic Research Grant&lt;/title&gt;
     &lt;agency&gt;National Institute of Health&lt;/agency&gt;
     &lt;department&gt;University Hospital Clinical Cancer Center&lt;/department&gt;
     &lt;summary&gt;Basic NIH support funding for current and future Phase 1 through
              Phase 3 cancer clinical trials.&lt;/summary&gt;
     &lt;initiated&gt;2006-07-01&lt;/initiated&gt;
     &lt;expires&gt;2010-06-30&lt;/expires&gt;
     &lt;coordinator&gt;Alice Walters&lt;/coordinator&gt;
  
  &lt;/grant&gt;
  </code></pre>
  
  <p>My Schema: </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
      xmlns:"http://uhosp.edu/grant/ns"
      targetNamespace="http://uhosp.edu/grant/ns"
  
   &lt;xs:element name="grant"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element type="xs:string" name="title"/&gt;
          &lt;xs:element type="xs:string" name="agency"/&gt;
          &lt;xs:element type="xs:string" name="department"/&gt;
          &lt;xs:element type="xs:string" name="summary"/&gt;
          &lt;xs:element type="xs:date" name="initiated"/&gt;
          &lt;xs:element type="xs:date" name="expires"/&gt;
          &lt;xs:element type="xs:string" name="coordinator"/&gt;
        &lt;/xs:sequence&gt;
        &lt;xs:attribute type="xs:string" name="grantNum"/&gt;
        &lt;xs:attribute type="xs:string" name="funding"/&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>