<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="A43C_B2G_XML">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element name="A43C_TITLE_STATUS_DETAIL">
          <xs:complexType mixed="true">
            <xs:sequence>
             <xs:element name="FHA_CASE_NUMBER" >
              <xs:simpleType>
               <xs:restriction base="xs:token">
                <xs:pattern value="[0-9]{3}[-][0-9]{7}"/>
               </xs:restriction>
              </xs:simpleType>
             </xs:element>
             <xs:element name="DATE_RECEIVED"  >
              <xs:simpleType>
               <xs:restriction base="xs:string">
                <xs:pattern value="\s*|\d{2}[/]\d{2}[/]\d{4}"></xs:pattern>
               </xs:restriction>
              </xs:simpleType>
             </xs:element>
             <xs:element name="PROCESSSTATUS">
              <xs:complexType mixed="true">
               <xs:sequence>
             <xs:element name="PROCESSSTATUSCODE" type="xs:string" />
             <xs:element name="PROCESSSTATUSMESSAGE">
              <xs:complexType mixed="true">
               <xs:sequence>
             <xs:element name="TOTAL_RECORDS_RETURNED" type="xs:unsignedByte" />
             <xs:element name="TITLE_APPROVAL_DETAIL">
              <xs:complexType mixed="true">
               <xs:sequence>
                <xs:choice maxOccurs="unbounded">
                <xs:element name="FHA_CASE_NUMBER" >
                 <xs:simpleType>
                  <xs:restriction base="xs:token">
                   <xs:pattern value="[0-9]{3}[-][0-9]{7}"/>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="STATUS" type="xs:string" />
                <xs:element name="MORTGAGOR_INFORMATION">
                 <xs:complexType>
                  <xs:sequence>
                   <xs:element name="MORTGAGOR" type="xs:string" />                                        
                   <xs:element name="STREET" type="xs:string" />
                   <xs:element name="CITY" type="xs:string" />
                   <xs:element name="STATE" type="xs:string" />
                   <xs:element name="ZIP" type="xs:string" />
                  </xs:sequence>
                   </xs:complexType>
                </xs:element>
                <xs:element name="PROCESS_DATE"  >
                 <xs:simpleType>
                  <xs:restriction base="xs:string">
                   <xs:pattern value="\d{4}[-]\d{2}[-]\d{2}"></xs:pattern>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="LAST_TRANSACTION_DATE"  >
                 <xs:simpleType>
                  <xs:restriction base="xs:string">
                   <xs:pattern value="\d{4}[-]\d{2}[-]\d{2}"></xs:pattern>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="LAST_TRANSACTION_COMMENT" type="xs:string" />
                <xs:element name="LAST_TRANSACTION_DESCRIPTION" type="xs:string" />
                <xs:element name="MORTGAGEE_NUMBER" type="xs:string" />
                <xs:element name="MORTGAGEE_REFERENCE_NUMBER" type="xs:string" />
                <xs:element name="TITLE_APPROVAL_LETTER_ADDRESSEE">
                 <xs:complexType>
                  <xs:sequence>
                   <xs:element name="MORTGAGEE_NAME" type="xs:string" />    
                   <xs:element name="MORTGAGEE_ATTN" type="xs:string" />                                      
                   <xs:element name="STREET" type="xs:string" />
                   <xs:element name="CITY" type="xs:string" />
                   <xs:element name="STATE" type="xs:string" />
                   <xs:element name="ZIP" type="xs:string" />
                  </xs:sequence>
                 </xs:complexType>
                </xs:element>
                <xs:element name="TITLE_RECEIVED_DATE"  >
                 <xs:simpleType>
                  <xs:restriction base="xs:string">
                   <xs:pattern value="\d{4}[-]\d{2}[-]\d{2}"></xs:pattern>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="TITLE_APPROVAL_DATE"  >
                 <xs:simpleType>
                  <xs:restriction base="xs:string">
                   <xs:pattern value="\d{4}[-]\d{2}[-]\d{2}"></xs:pattern>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="TITLE_APPROVAL_LETTER_DATE"  >
                 <xs:simpleType>
                  <xs:restriction base="xs:string">
                   <xs:pattern value="\d{4}[-]\d{2}[-]\d{2}"></xs:pattern>
                  </xs:restriction>
                 </xs:simpleType>
                </xs:element>
                <xs:element name="FIELD_OFFICE" type="xs:string" />
                 </xs:choice>
                  </xs:sequence>
                   </xs:complexType>
                    </xs:element>
                     </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>