﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified"
  attributeFormDefault="qualified"
  xmlns:sch ="http://www.ascc.net/xml/schematron">
  <xs:annotation>
    <xs:appinfo>
      <sch:title>ADR Validation - ImportForm</sch:title>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="ImportCollection" type="ImportCollectionType"/>
  <xs:complexType name="ImportCollectionType">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="25" name="ImportFormItem" type="ImportFormItemType">
        <xs:annotation>
          <xs:appinfo>
            <sch:pattern id="001" Name="ProcessObjectRequired">
              <sch:rule context="ImportFormItem">
                <sch:report test="count(MFR) = 0 and count(POC) = 0 and count(Foreclosure) = 0 and count(Object) = 0 and count(ObjectSubscriberID) = 0">
                  Process object (MFR, POC, Foreclosure or Object ObjectSubscriberID) must be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="002" Name="ProcessObjectMFR">
              <sch:rule context="ImportFormItem">
                <sch:report test="count(MFR) = 1 and (count(POC) = 1 or count(Foreclosure) = 1 or (count(Object) = 1 and count(ObjectSubscriberID) = 1))">
                  Only one process object can be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="003" Name="ProcessObjectPOC">
              <sch:rule context="ImportFormItem">
                <sch:report test="count(POC) = 1 and (count(MFR) = 1 or count(Foreclosure) = 1 or (count(Object) = 1 and count(ObjectSubscriberID) = 1))">
                  Only one process object can be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="004" Name="ProcessObjectForeclosure">
              <sch:rule context="ImportFormItem">
                <sch:report test="count(Foreclosure) = 1 and (count(MFR) = 1 or count(POC) = 1 or (count(Object) = 1 and count(ObjectSubscriberID) = 1))">
                  Only one process object can be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="005" Name="MessageValidation">
              <sch:rule context="ImportFormItem">
                <sch:report test="(count(Messages_0_Message) = 1 and count(Messages_0_BodyText) = 0) or (count(Messages_0_Message) = 0 and count(Messages_0_BodyText) = 1)">
                  Both Message and BodyText must be provided when including Message
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="006" Name="DateValidation">
              <sch:rule context="ImportFormItem">
                <sch:report test="count(ProjectedCompletion) = 0 and count(ActualCompletion) = 0">
                  ProjectedCompletion or ActualCompletion must be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="007" Name="ObjectSubscriberIDValidation">
              <sch:rule context="ImportFormItem">
                <sch:report test="(count(Object) = 1 and count(ObjectSubscriberID) = 0) or (count(Object) = 0 and count(ObjectSubscriberID) = 1)">
                  Both Object and ObjectSubscriberID must be provided when attempting parent lookup
                </sch:report>
              </sch:rule>
            </sch:pattern>
          </xs:appinfo>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="Reference" type="qbo.Reference"/>
  </xs:complexType>
  <xs:complexType name="ImportFormItemType">
    <xs:all>
      <xs:element name="MFR" type="qboNvarchar50" minOccurs="0" maxOccurs="1"/>
      <xs:element name="POC" type="qboNvarchar50" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure" type="qboNvarchar50" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Object" type="qbo.ProcessObject" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ObjectSubscriberID" type="qbo.SubscriberID" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Template" type="qbo.ImportFormTemplate" minOccurs="1" maxOccurs="1"/>
      <xs:element name="ProjectedCompletion" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="ActualCompletion" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Messages_0_Message" type="qbo.ImportFormMessageType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Messages_0_BodyText" type="qboText" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Foreclosure_Loan_UPBAmount" type="qboDecimal" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_SaleAmount" type="qboDecimal" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_SoldToName" type="qbo.Foreclosure.SoldToName" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_BidAtSale_BidMax" type="qboDecimal" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_BidAtSale_BidOpening" type="qboDecimal" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_BidAtSale_BidDue" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_TotalDebtLedger_AmountMoney" type="qboDecimal" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_TotalDebtLedger_PostedDate" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_TotalDebtLedger_Ledger" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_Contact" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_Address" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_City" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_State" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_PostalCode" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ThirdPartyContact_Phone" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_FCCaseNumber" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_Status" type="qbo.Foreclosure.ClosedStatus" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_DateClosed" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_ClosedReason" type="qbo.Foreclosure.ClosedReason" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Foreclosure_DeficiencyStatus" type="qbo.Foreclosure.DeficiencyStatus" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Bankruptcy_Status" type="qbo.Bankruptcy.ClosedStatus" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Bankruptcy_DateClosed" type="qboDateOptionalTime" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Bankruptcy_ClosedReason" type="qbo.Bankruptcy.ClosedReason" minOccurs="0" maxOccurs="1"/>
    </xs:all>
    <xs:attribute name="Reference" type="qbo.Reference"/>
  </xs:complexType>

  <!--Custom Types-->
  <xs:simpleType name="qbo.ProcessObject">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Bankruptcy" />
      <xs:enumeration value="Foreclosure" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.ImportFormMessageType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Task Changed" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.ImportFormTemplate">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Foreclosure Case Closure">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bankruptcy Case Closure">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Advertising Commenced">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Aff of Service, RJI, Attorney Affirmation Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Application for Expedited Order to Allow FCL Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Advertising Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FFD/Acceleration Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Sheriff's Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Complaint Served">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Entry of Default">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Motion for Summary Judgment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Complaint (Order to Docket) Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Judgment Enters">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Acceleration Notice Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Notice of Default">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Borrower Provided Notice of Entry of Final Judgmnt">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Docket Order Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="First Publication and Notice of Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Hearing Held">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Final Title Clear">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Expiration of 30 Day Statutory Notice Period">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notify FHLMC/FNMA of Sale Results">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgment of Foreclosure and Sale Entered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Confirmation of Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgment Entered / Writ of Execution">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Judgment of Foreclosure Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order of Reference Entered and Referee Appointed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order of Confirmation">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Lis Pendens Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Motion for Judgment of Foreclosure">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mail Requires Notices">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure by Sale Decree Entered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Foreclosure Notice with County Clerk">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Default Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication Complete">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substitution of Trustee Executed and Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgment and Order of Sale Entered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sale Mailed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Summons and Complaint Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Election and Demand Sent to Public Trste">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Sent to Public Trustee">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Hearing (NOH) Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order of Reference Entered and Hearing Scheduled">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Received and Reviewed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Prepare and Send SOT to Servicer">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Trustee Sale Scheduled">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Default/Summary Judgment Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication Period">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Final Judgment Expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Receive Proof of Service">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Record Notice of Trustee's Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Relief from Stay/Discharge">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Hearing Service Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice mailed and Pub sent to Legal Newspaper">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Scheduled Date">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service of Complaint Commenced">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Signed Order Received">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Oath and Report Submitted to Referee">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication Starts">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Scheduled/NED Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Report Received">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Posting to Sale Held">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication and Posting of Sale Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Send 10-Day Notices">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Scheduled and Notice of Intent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Pub Started and Notice of Sale Posted">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service Began">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale scheduled date (tied to Judgment entered)">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication of the Notice of Foreclosure">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Trustee Sale Scheduled Date (Tied to NOTS)">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Confirmed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Send Notice to Publisher for Publishing">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sheriff Seized Property">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Set Trustee's Sale_Record Notice of Trustee's Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Summary Judgment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Answer Period Expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Complaint Ordered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Draft Motion to Enlarge/Publish">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Expiration of 3 Month Reinstatement Period">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure Mediation Program">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Initial Scheduling Conference">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Foreclosure sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Post-sale Bankruptcy Search">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service Default">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavit of Mortgage Sent Servicer">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Auction">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Sale Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bankruptcy File Received">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Court Order Obtained Authorizing Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Deed Sent for Recording">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MCL 600 3208 Foreclosure Notice posted">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice letter Sent to Mortgagor">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Judgment Hearing">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="File Received and Title Report Ordered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Default Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sale sent to Newspaper">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgment Entered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service Complete">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Legal Notice Published in Newspaper">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Default Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavit in Support of Order for Foreclosure">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="First and Second Notice Prepared">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mandatory Settlement Conference Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Summary Judgment and Decree of FC Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice to IRS 7425 IRC">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication and First Publication">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication/Service of Process Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Redemption Period Expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Scheduled">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Hearing Set">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Scheduled Sale Date">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Pendency Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Writ of Execution">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sale Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication/Posting on Property Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Record Notice of Default">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Complete">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Scheduled and Notice of Default Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Answer Period Runs">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Title Issued">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Date">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Submit Default Applications">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgement Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Final Ratification of Sale Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order of Notice Received from Land Court">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Order Reference Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Period of Redemption Expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Post Notice of Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Preliminary Title Clear">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Rule 120 hearing Date">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Date Set">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service of Complaint Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substitution of Trustee Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Summons Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Writ of Fieri Facias issues">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="10 Day Mailing Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Acceleration Letter Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavits of Notice of Sale Compliance Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Application for Order of Reference Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Judgment Enters/Redemption Period expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Defendants Served and Service of Process Started">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Document Review of Security Instruments">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="First Publication">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Legal Notice Sent to Newspaper">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Judgment Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Trustee's Sale served by Certified Mail">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Closing/Deed Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Petition for Seizure and Sale of Property Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Plan Confirmed">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication/Sale Date Set">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sale Deed Executed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Status Conference">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Work Completed and Complaint Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Trustee's Deed Prepared and Sent for Recording">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Complaint Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Deed Issued">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Deed Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Entered if No Answer Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Executed SOT Received">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure Order and Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="IRS Bring down/Notification">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Litigation Detail">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Entry of Default Judgement">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Summary Judgment Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion to Appoint Referee to Compute Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Publication/Posting of Sale completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service of Process">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service of Writ">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Submitted for Service">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Court Decree/Judgement">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure Sale Held">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mail Notice of Sale to Borrower">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MCL 600 3208 is mailed to the borrower">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sale Publication started">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice Sent">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="POC Filed">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Process of Service Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Redemption Period Expires/Deed Recorded">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Request for Bid">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Service of Process Completed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Supplemental Mailing List Filed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Writ of Seizure and Sale Issued">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure File Received">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgement">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Judgment Confirming Default">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Sheriff's Sale and Posting of Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Posting and Publishing of Sale/NOS Mailings">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Process of Service Started">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Ordered">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Upset Bid Period Expires">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>

    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.Foreclosure.SoldToName">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Back to Beneficiary">
        <xs:annotation>
          <xs:documentation>Back to Beneficiary</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Third Party">
        <xs:annotation>
          <xs:documentation>Third Party</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>

  <!-- Closed Status -->
  <xs:simpleType name="qbo.Foreclosure.ClosedStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Closed">
        <xs:annotation>
          <xs:documentation>Closed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.Bankruptcy.ClosedStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Closed">
        <xs:annotation>
          <xs:documentation>Closed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <!-- ClosedReason -->
  <xs:simpleType name="qbo.Foreclosure.ClosedReason">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Case Completed">
        <xs:annotation>
          <xs:documentation>Case Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Paid Off / Reinstated">
        <xs:annotation>
          <xs:documentation>Paid Off / Reinstated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Repurchased">
        <xs:annotation>
          <xs:documentation>Repurchased</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Servicer Request">
        <xs:annotation>
          <xs:documentation>Servicer Request</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Investor Request">
        <xs:annotation>
          <xs:documentation>Investor Request</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Opened In Error">
        <xs:annotation>
          <xs:documentation>Opened In Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Third Party Sale Completed">
        <xs:annotation>
          <xs:documentation>Third Party Sale Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent Judgment">
        <xs:annotation>
          <xs:documentation>Consent Judgment</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Loss Mitigation Completed">
        <xs:annotation>
          <xs:documentation>Loss Mitigation Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bankruptcy Filed">
        <xs:annotation>
          <xs:documentation>Bankruptcy Filed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Charge Off Completed">
        <xs:annotation>
          <xs:documentation>Charge Off Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Low Balance Loan">
        <xs:annotation>
          <xs:documentation>Low Balance Loan</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Investor Loan Sold">
        <xs:annotation>
          <xs:documentation>Investor Loan Sold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.Bankruptcy.ClosedReason">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Discharged">
        <xs:annotation>
          <xs:documentation>Discharged</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Dismissed">
        <xs:annotation>
          <xs:documentation>Dismissed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Case Converted">
        <xs:annotation>
          <xs:documentation>Case Converted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Investor Request">
        <xs:annotation>
          <xs:documentation>Investor Request</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Opened In Error">
        <xs:annotation>
          <xs:documentation>Opened In Error</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Paid Off / Reinstated">
        <xs:annotation>
          <xs:documentation>Paid Off / Reinstated</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Repurchased">
        <xs:annotation>
          <xs:documentation>Repurchased</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Servicer Request">
        <xs:annotation>
          <xs:documentation>Servicer Request</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MFR Granted">
        <xs:annotation>
          <xs:documentation>MFR Granted</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Investor Loan Sold">
        <xs:annotation>
          <xs:documentation>Investor Loan Sold</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Loss Mitigation Completed">
        <xs:annotation>
          <xs:documentation>Loss Mitigation Completed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="STIP / APO Entered">
        <xs:annotation>
          <xs:documentation>STIP / APO Entered</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="POC Filed">
        <xs:annotation>
          <xs:documentation>POC Filed</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <!-- Deficiency Status -->
  <xs:simpleType name="qbo.Foreclosure.DeficiencyStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Waived" />
      <xs:enumeration value="Preserved" />
    </xs:restriction>
  </xs:simpleType>
  
  <!--Simple Types-->
  <xs:simpleType name="qboNvarchar50">
    <xs:annotation>
      <xs:documentation>string with a maximum length of 50</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="50" />
      <xs:whiteSpace value="collapse" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qboDateOptionalTime">
    <xs:annotation>
      <xs:documentation>
        Accepts date or dateTime value. Acceptable formats are:
        YYYY-MM-DD
        YYYY-MM-DDTHH:MM:SS
        YYYY-MM-DDTHH:MM:SS+HH:MM
        YYYY-MM-DDTHH:MM:SS-HH:MM
        YYYY-MM-DDTHH:MM:SSZ
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:whiteSpace value="collapse" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}T{1}[\d]{2}:[\d]{2}" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}:[\d]{2}:[\d]{2}Z" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}:[\d]{2}:[\d]{2}" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}:[\d]{2}:[\d]{2}\+[\d]{2}:[\d]{2}" />
      <xs:pattern value="[\d]{4}-[\d]{2}-[\d]{2}T[\d]{2}:[\d]{2}:[\d]{2}\-[\d]{2}:[\d]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qboDecimal">
    <xs:annotation>
      <xs:documentation>qbo Decimal based on xs:decimal</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal" />
  </xs:simpleType>
  <xs:simpleType name="qbo.SubscriberID">
    <xs:restriction base="xs:string">
      <xs:maxLength value="255" />
      <xs:whiteSpace value="collapse" />
      <xs:pattern value=".+-{1}.+-{1}.+" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qboText">
    <xs:annotation>
      <xs:documentation>qbo Text Field</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="qbo.Reference">
    <xs:annotation>
      <xs:documentation>Used as refernce to foreign entity. Length 1 - 50</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1" />
      <xs:maxLength value="50" />
      <xs:whiteSpace value="collapse" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
