﻿<?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 - Document</sch:title>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="ImportCollection" type="ImportCollectionType"/>
  <xs:complexType name="ImportCollectionType">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="5" name="AttachmentItem" type="AttachmentItemType">
        <xs:annotation>
          <xs:appinfo>
            <sch:pattern id="001" Name="ProcessObjectRequired">
              <sch:rule context="AttachmentItem">
                <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 and ObjectSubscriberID) must be provided
                </sch:report>
              </sch:rule>
            </sch:pattern>
            <sch:pattern id="002" Name="ProcessObjectMFR">
              <sch:rule context="AttachmentItem">
                <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="AttachmentItem">
                <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="AttachmentItem">
                <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="ObjectSubscriberIDValidation">
              <sch:rule context="AttachmentItem">
                <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="AttachmentItemType">
    <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="FileName" type="qboNvarchar50" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Contains file name with extension</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Template" type="qbo.AttachmentTemplate" minOccurs="1" maxOccurs="1"/>
      <xs:element name="Description" type="qboText" minOccurs="0" maxOccurs="1"/>
      <xs:element name="Content" type="qboText" minOccurs="1" maxOccurs="1">
        <xs:annotation>
          <xs:documentation>Base64 encoded content</xs:documentation>
        </xs:annotation>
      </xs:element>
    </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.AttachmentTemplate">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Act Letters">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavit of Indebtedness">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Affidavit of Service">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Application">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Appraisal">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ARM Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Assignment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Assignment (unrecorded)">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Assignment of Judgment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Auditor's Report">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Ratification of the Auditor's Report">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bankruptcy Plan">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Bid Form">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BPO">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Breach Letter">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Attachment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Purchase">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Sale (mh)">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Certificate of Title (mh)">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Charge Off Form">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Condo Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Consent Orders">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Contract for Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Copy of Assignment of Lease">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Copy of Proprietary Lease">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Copy of Stock Certificate">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Copy of Stock Power">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Copy of UCC-1">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Credit Bureau">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Credit Life Insurance">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Credit Report">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Current Title Commitment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Customer Correspondence">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Deed of Trust">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Default Payoffs">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Deficiency Judgment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Demand Letter">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Derogatory Credit Explanation">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="DIL Authorization">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Disclosure of Loan Terms">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Environmental Hazards">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="EPA Correspondence">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Extension Agreement">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FC Bidding Instructions">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FC Document">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FC Final Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FHA Eviction Package">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FHA Post Sale Package">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="FHA Title Package">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Flood Insurance Certification">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Forbearance Agreement">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure complaints">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure Judgments">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Foreclosure/Sheriff's Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Good Faith Estimate">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HAMP Letter">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Hardship Letter">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Home Equity Order">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HUD">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HUD-1">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Loan Application">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Loan Approval">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Lost Assignment Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Lost Note Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mechanic's Lien Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Misc Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mobile-Home Title">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Modification">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mortgage">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mortgage Insuring Certificate">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Mortgage Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Motion for Relief Order">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="MultipleTest">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Name Affidavit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Non Sufficient Fund">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Note">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Note Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of BK Filing">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Default Complaint">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Notice of Intent Seek Def">
        <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 Approving FC Sale">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Other">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Payment History">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Payoff Quote">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Payoff Statements">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Power of Attorney">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Property Inspection">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Property Insurance Policy">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PUD Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Purchase Sales Contract">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reaffirmation">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Recorded Security Instrument">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Rehabilitation Loan Rider">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Reinstatement Quote">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Release of Lien">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Release/Dismissal of Tax Suit">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Returned POCs">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Right to Cancel">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Security Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sheriff's Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Sheriff's Sale Notice">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Stipulated Plan">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substitute Trustee's Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Substitution of Trustee">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Summary Sheet">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Summon &amp; Complaint Docs">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Survey">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Commitment">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Indemnity">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Policy">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Title Search">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Transfer of Service Disclosure">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Truth in Lending">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Underwriter Approval Letter">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Unrecorded Mortgage">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Upload Test">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="Warranty Deed">
        <xs:annotation>
          <xs:documentation>Applies to Foreclosure</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BK Document">
        <xs:annotation>
          <xs:documentation>Applies to Bankruptcy</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </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="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>

