﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="InstallmentBill"
    targetNamespace="http://tempuri.org/InstallmentBill.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/InstallmentBill.xsd"
    xmlns:mstns="http://tempuri.org/InstallmentBill.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:complexType name="GlobalData">
    <xs:sequence>
      <xs:element name="CompanyName" type="xs:string"></xs:element>
      <xs:element name="CompanyAddr1" type="xs:string"></xs:element>
      <xs:element name="CompanyAddr2" type="xs:string"></xs:element>
      <xs:element name="CompanyCity" type="xs:string"></xs:element>
      <xs:element name="CompanyState" type="xs:string"></xs:element>
      <xs:element name="CompanyPostal" type="xs:string"></xs:element>
      <xs:element name="StatementDate" type="xs:date"></xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LoanDueData">
    <xs:sequence>
      <xs:element name="DueDate" type="xs:date"></xs:element>
      <xs:element name="LateDate" type="xs:date"></xs:element>
      <xs:element name="PI" type="xs:decimal" ></xs:element>
      <xs:element name="Escrow" type="xs:decimal" ></xs:element>
      <xs:element name="LateFee" type="xs:decimal" ></xs:element>
      <xs:element name="LateFeeDue" type="xs:decimal"></xs:element>
      <xs:element name="Other" type="xs:decimal" ></xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="LoanData">
    <xs:sequence>
      <xs:element name="LoanNumber" type="xs:string"></xs:element>
      <xs:element name="BorrowerName" type="xs:string"></xs:element>
      <xs:element name="BorrowerAddr1" type="xs:string"></xs:element>
      <xs:element name="BorrowerAddr2" type="xs:string"></xs:element>
      <xs:element name="BorrowerCity" type="xs:string"></xs:element>
      <xs:element name="BorrowerState" type="xs:string"></xs:element>
      <xs:element name="BorrowerPostal" type="xs:string"></xs:element>
      <xs:element name="PropertyName" type="xs:string"></xs:element>
      <xs:element name="PropertyAddr1" type="xs:string"></xs:element>
      <xs:element name="PropertyAddr2" type="xs:string"></xs:element>
      <xs:element name="PropertyCity" type="xs:string"></xs:element>
      <xs:element name="PropertyState" type="xs:string"></xs:element>
      <xs:element name="PropertyPostal" type="xs:string"></xs:element>
      <xs:element name="InterestRate" type="xs:decimal"></xs:element>
      <xs:element name="MaturityDate" type="xs:date"></xs:element>
      <xs:element name="OriginalTerm" type="xs:integer"></xs:element>
      <xs:element name="PrincipalBalance" type="xs:decimal"></xs:element>
      <xs:element name="EscrowBalance" type="xs:decimal"></xs:element>
      <xs:element name="ReserveBalance" type="xs:decimal"></xs:element>
      <xs:element name="DeferredLateFeeDue" type="xs:decimal"></xs:element>
      <xs:element name="MiscDue" type="xs:decimal"></xs:element>
      <xs:element name="LPI" type="xs:date"></xs:element>

      <xs:element name="DueRecords" type="LoanDueData" minOccurs="0" maxOccurs="unbounded"></xs:element>
    </xs:sequence>
  </xs:complexType>

  <xs:element name="PAMmort">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="GlobalData" type="GlobalData" minOccurs="1" maxOccurs="1"></xs:element>
        <xs:element name="LoanData" type="LoanData" minOccurs="0" maxOccurs="unbounded"></xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
