|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xsl:stylesheet xmlns="http://www.csp.com/Securitization/csp-cdm-entities"
|
|
xmlns:mismo="http://www.csp.com/Securitization/ext-collateral"
|
|
xmlns:cspfn="http://www.csp.com/Securitization"
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
|
xmlns:date="http://www.oracle.com/XSL/Transform/java/java.util.Date"
|
|
xmlns:sdf="http://www.oracle.com/XSL/Transform/java/java.text.SimpleDateFormat"
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
xmlns:plus="http://www.csp.com/Securitization/csp-uldd-plus"
|
|
xmlns:ue="http://www.csp.com/Securitization/csp-event-payload"
|
|
xmlns:edm="http://www.csp.com/csp-message-envelope/2.0"
|
|
xmlns:req="http://www.csp.com/Securitization/csp-request-response"
|
|
xmlns:dc="java:com.css.csp.interfaces.transform.adapters.DateCalcHelper"
|
|
xmlns:md="java:com.css.csp.interfaces.transform.adapters.MasterDataAdapter"
|
|
xmlns:xslmd="java:com.css.csp.interfaces.transform.adapters.XSLTDataAdapter"
|
|
version="2.0"
|
|
exclude-result-prefixes="mismo cspfn xsl date sdf xs plus ue edm md dc xslmd">
|
|
<xsl:include href="../common/defaultValues.xsl"/>
|
|
<xsl:include href="../common/JavaUtils-stub.xsl"/>
|
|
<xsl:include href="../common/GenericFunctions.xsl"/>
|
|
<xsl:param name="unittestmode" select="0"/>
|
|
<xsl:param name="debug" select="1"/>
|
|
<xsl:variable name="LoanPosition" select="//mismo:LOAN_POSITIONS/mismo:LOAN_POSITION"/>
|
|
<xsl:variable name="LoanPositionGeneral"
|
|
select="$LoanPosition/mismo:LOAN_POSITION_GENERAL"/>
|
|
<xsl:variable name="LoanPositionsGeneral"
|
|
select="//mismo:LOAN_POSITIONS/mismo:LOAN_POSITIONS_GENERAL"/>
|
|
<xsl:variable name="LoanPositionInvestorView"
|
|
select="$LoanPosition/mismo:LOAN_POSITION_VIEWS/mismo:LOAN_POSITION_INVESTOR_VIEW"/>
|
|
<xsl:variable name="CurrentInterestRatePercent"
|
|
select="$LoanPositionGeneral/mismo:CurrentInterestRatePercent"/>
|
|
<xsl:variable name="IssuerIdentifier"
|
|
select="$LoanPositionsGeneral/mismo:IssuerIdentifier"/>
|
|
<xsl:variable name="isFannie" select="$IssuerIdentifier='354684'"/>
|
|
<xsl:variable name="issuerLoanId"
|
|
select="$LoanPositionGeneral/mismo:InvestorLoanIdentifier"/>
|
|
<xsl:variable name="LoanUtilityIdentifier"
|
|
select="xslmd:getLoanUtilityIdentifier($IssuerIdentifier, $issuerLoanId)"/>
|
|
<xsl:variable name="LoanPrincipalandInterestPaymentAmount"
|
|
select="$LoanPositionGeneral/mismo:PrincipalAndInterestPaymentAmount"/>
|
|
<xsl:variable name="LoanInterestRateEffectiveDate"
|
|
select="$LoanPositionGeneral/mismo:LoanInterestRateEffectiveDate"/>
|
|
<xsl:variable name="SecurityCusip" select="xslmd:getLinkedCUSIP($issuerLoanId)"/>
|
|
<xsl:template match="/"><!-- we need to find the Servicer Party Id associated with loan 54 is the Party Role Type Code for Servicer -->
|
|
<xsl:variable name="partyRlspOwnId" select="$IssuerIdentifier"/>
|
|
<xsl:variable name="partyRoleAltId"
|
|
select="$LoanPositionGeneral/mismo:ServicerIdentifier"/>
|
|
<xsl:variable name="partyRoleTypeCode">
|
|
<xsl:text>54</xsl:text>
|
|
</xsl:variable>
|
|
<xsl:variable name="TransferorServicerIdentifier"
|
|
select=" xslmd:getLoanServicerPartyId($LoanUtilityIdentifier, $partyRoleTypeCode)"/>
|
|
<xsl:variable name="TransfereeServicerIdentifier"
|
|
select=" xslmd:getPartyId($IssuerIdentifier, $partyRoleAltId, $partyRlspOwnId, 'Servicer')"/>
|
|
<xsl:variable name="RequestEffectiveDateTime" select="//*:RequestEffectiveDateTime"/>
|
|
<xsl:variable name="RequestEffectiveDate"
|
|
select="tokenize($RequestEffectiveDateTime,'T')[1]"/>
|
|
<ue:ExternalCollateralLoanPositionPayload>
|
|
<xsl:if test="not($TransferorServicerIdentifier = $TransfereeServicerIdentifier)">
|
|
<ue:ServicingTransfer>
|
|
<ue:LoanReportingCycleStartTransferIndicator>
|
|
<xsl:text>N</xsl:text>
|
|
</ue:LoanReportingCycleStartTransferIndicator>
|
|
<ue:LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</ue:LoanUtilityIdentifier>
|
|
<ue:TransfereeServicerIdentifier>
|
|
<xsl:value-of select="$TransfereeServicerIdentifier"/>
|
|
</ue:TransfereeServicerIdentifier>
|
|
<ue:TransferorServicerIdentifier>
|
|
<xsl:value-of select="$TransferorServicerIdentifier"/>
|
|
</ue:TransferorServicerIdentifier>
|
|
<ue:TransactionRequestEffectiveDate>
|
|
<xsl:value-of select="($LoanInterestRateEffectiveDate,cspfn:getCalendarServiceSystemDate())[1]"/>
|
|
</ue:TransactionRequestEffectiveDate>
|
|
<ue:TransactionServicingTransferRequestTypeCode>
|
|
<xsl:text>10</xsl:text>
|
|
</ue:TransactionServicingTransferRequestTypeCode>
|
|
</ue:ServicingTransfer>
|
|
</xsl:if>
|
|
<ue:ExternalCollateralLoanPosition>
|
|
<ue:LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</ue:LoanUtilityIdentifier>
|
|
<ue:ServicerIdentifier>
|
|
<xsl:value-of select="$TransfereeServicerIdentifier"/>
|
|
</ue:ServicerIdentifier>
|
|
<ue:LoanReportingPeriod>
|
|
<xsl:value-of select="$LoanPositionsGeneral/mismo:LoanReportingPeriod"/>
|
|
</ue:LoanReportingPeriod>
|
|
<ue:LoanMonthsDelinquentCurrentMonthCount>
|
|
<xsl:value-of select="$LoanPositionGeneral/mismo:LoanMonthsDelinquentCurrentMonthCount"/>
|
|
</ue:LoanMonthsDelinquentCurrentMonthCount>
|
|
<ue:LoanPaymentOtherFeesCollectedAmount>
|
|
<xsl:value-of select="$LoanPositionGeneral/mismo:LoanPaymentOtherFeesCollectedAmount"/>
|
|
</ue:LoanPaymentOtherFeesCollectedAmount>
|
|
<xsl:for-each select="$LoanPositionInvestorView">
|
|
<ue:ExternalCollateralLoanPositionInvestorView>
|
|
<ue:SecurityCUSIPIdentifier>
|
|
<xsl:value-of select="($SecurityCusip,mismo:SecurityCUSIPIdentifier)[1]"/>
|
|
</ue:SecurityCUSIPIdentifier>
|
|
<ue:LoanInvestorBalanceAmount>
|
|
<xsl:value-of select="mismo:LoanInvestorBalanceAmount"/>
|
|
</ue:LoanInvestorBalanceAmount>
|
|
<ue:LoanInvestorTotalPrincipalDistributionAmount>
|
|
<xsl:value-of select="mismo:LoanInvestorTotalPrincipalDistributionAmount"/>
|
|
</ue:LoanInvestorTotalPrincipalDistributionAmount>
|
|
<ue:LoanInvestorInstallmentPrincipalDistributionAmount>
|
|
<xsl:value-of select="mismo:LoanInvestorInstallmentPrincipalDistributionAmount"/>
|
|
</ue:LoanInvestorInstallmentPrincipalDistributionAmount>
|
|
<ue:LoanInvestorUnscheduledPrincipalDistributionAmount>
|
|
<xsl:value-of select="mismo:LoanInvestorUnscheduledPrincipalDistributionAmount"/>
|
|
</ue:LoanInvestorUnscheduledPrincipalDistributionAmount>
|
|
<ue:LoanInvestorInterestAmount>
|
|
<xsl:value-of select="mismo:LoanInvestorInterestAmount"/>
|
|
</ue:LoanInvestorInterestAmount>
|
|
<ue:LoanDeferredInterestAmount>
|
|
<xsl:value-of select="mismo:LoanDeferredInterestAmount"/>
|
|
</ue:LoanDeferredInterestAmount>
|
|
<ue:LoanLiquidationStatusTypeCode>
|
|
<xsl:value-of select="cspfn:get-reference-data('LoanLiquidationStatusType', mismo:LoanLiquidationStatusType)"/>
|
|
</ue:LoanLiquidationStatusTypeCode>
|
|
</ue:ExternalCollateralLoanPositionInvestorView>
|
|
</xsl:for-each>
|
|
<xsl:if test="string($CurrentInterestRatePercent)">
|
|
<ue:LoanInterestRate>
|
|
<FinancialIndexValuePercent/>
|
|
<LoanExcessServicingFeePercent/>
|
|
<!-- <LoanGuarantyFeeRatePercent></LoanGuarantyFeeRatePercent> -->
|
|
<LoanInterestRateEffectiveDate>
|
|
<xsl:value-of select="cspfn:DefaultDateToFirstDateOfMonth($LoanInterestRateEffectiveDate)"/>
|
|
</LoanInterestRateEffectiveDate>
|
|
<LoanInterestRateExpirationDate/>
|
|
<xsl:for-each select="$LoanPositionInvestorView">
|
|
<LoanInterestRateInvestorComponent>
|
|
<xsl:variable name="CollateralCollectionUtilityIdentifier"
|
|
select="md:getCollateralCollectionIdentifierByFclInstIdAndCusip($LoanUtilityIdentifier ,*:SecurityCUSIPIdentifier)"/>
|
|
<CollateralCollectionUtilityIdentifier>
|
|
<xsl:value-of select="$CollateralCollectionUtilityIdentifier"/>
|
|
</CollateralCollectionUtilityIdentifier>
|
|
<!-- <LoanGuarantyFeeRatePercent>99.99999</LoanGuarantyFeeRatePercent> -->
|
|
<LoanInterestRateEffectiveDate>
|
|
<xsl:value-of select="cspfn:DefaultDateToFirstDateOfMonth($LoanInterestRateEffectiveDate)"/>
|
|
</LoanInterestRateEffectiveDate>
|
|
<LoanInterestRateInvestorComponentEffectiveDate>
|
|
<xsl:value-of select="cspfn:DefaultDateToFirstDateOfMonth($LoanInterestRateEffectiveDate)"/>
|
|
</LoanInterestRateInvestorComponentEffectiveDate>
|
|
<!-- <LoanInterestRateInvestorComponentExpirationDate>1957-08-13</LoanInterestRateInvestorComponentExpirationDate> -->
|
|
<LoanInvestorPassThroughRate>
|
|
<xsl:value-of select="mismo:LoanInvestorPassThroughRate"/>
|
|
</LoanInvestorPassThroughRate>
|
|
<LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</LoanUtilityIdentifier>
|
|
</LoanInterestRateInvestorComponent>
|
|
</xsl:for-each>
|
|
<LoanInterestRatePercent>
|
|
<xsl:value-of select="$CurrentInterestRatePercent"/>
|
|
</LoanInterestRatePercent>
|
|
<LoanLenderPassThroughRate/>
|
|
<LoanNetMarginPercent/>
|
|
<xsl:variable name="LoanOriginalNextInterestRateAdjustmentDate"
|
|
select="$LoanPositionGeneral/mismo:NextRateAdjustmentEffectiveDate"/>
|
|
<LoanNextInterestRateAdjustmentDate>
|
|
<xsl:value-of select="cspfn:add-months-to-date-for-fnm-and-date-not-01($LoanOriginalNextInterestRateAdjustmentDate,$IssuerIdentifier)"/>
|
|
</LoanNextInterestRateAdjustmentDate>
|
|
<LoanOriginalNextInterestRateAdjustmentDate>
|
|
<xsl:value-of select="$LoanPositionGeneral/mismo:NextRateAdjustmentEffectiveDate"/>
|
|
</LoanOriginalNextInterestRateAdjustmentDate>
|
|
<LoanServicingFeeRatePercent/>
|
|
<LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</LoanUtilityIdentifier>
|
|
</ue:LoanInterestRate>
|
|
<xsl:for-each select="$LoanPositionInvestorView">
|
|
<ue:LoanInterestRateInvestorComponent>
|
|
<xsl:variable name="CollateralCollectionUtilityIdentifier"
|
|
select="md:getCollateralCollectionIdentifierByFclInstIdAndCusip($LoanUtilityIdentifier ,*:SecurityCUSIPIdentifier)"/>
|
|
<CollateralCollectionUtilityIdentifier>
|
|
<xsl:value-of select="$CollateralCollectionUtilityIdentifier"/>
|
|
</CollateralCollectionUtilityIdentifier>
|
|
<!-- <LoanGuarantyFeeRatePercent>99.99999</LoanGuarantyFeeRatePercent> -->
|
|
<LoanInterestRateEffectiveDate>
|
|
<xsl:value-of select="cspfn:DefaultDateToFirstDateOfMonth($LoanInterestRateEffectiveDate)"/>
|
|
</LoanInterestRateEffectiveDate>
|
|
<LoanInterestRateInvestorComponentEffectiveDate>
|
|
<xsl:value-of select="cspfn:DefaultDateToFirstDateOfMonth($LoanInterestRateEffectiveDate)"/>
|
|
</LoanInterestRateInvestorComponentEffectiveDate>
|
|
<!-- <LoanInterestRateInvestorComponentExpirationDate>1957-08-13</LoanInterestRateInvestorComponentExpirationDate> -->
|
|
<LoanInvestorPassThroughRate>
|
|
<xsl:value-of select="mismo:LoanInvestorPassThroughRate"/>
|
|
</LoanInvestorPassThroughRate>
|
|
<LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</LoanUtilityIdentifier>
|
|
</ue:LoanInterestRateInvestorComponent>
|
|
</xsl:for-each>
|
|
</xsl:if>
|
|
<xsl:if test="$LoanPrincipalandInterestPaymentAmount">
|
|
<ue:LoanPrincipalAndInterestPayment>
|
|
<LoanPrincipalandInterestPaymentAmount>
|
|
<xsl:value-of select="$LoanPrincipalandInterestPaymentAmount"/>
|
|
</LoanPrincipalandInterestPaymentAmount>
|
|
<LoanPrincipalandInterestPaymentEffectiveDate>
|
|
<xsl:value-of select="($LoanPositionGeneral/mismo:LoanPrincipalandInterestPaymentEffectiveDate, cspfn:getCalendarServiceSystemDate())[1]"/>
|
|
</LoanPrincipalandInterestPaymentEffectiveDate>
|
|
<LoanPrincipalandInterestPaymentExpirationDate/>
|
|
<LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</LoanUtilityIdentifier>
|
|
</ue:LoanPrincipalAndInterestPayment>
|
|
</xsl:if>
|
|
<xsl:variable name="MICoveragePercent"
|
|
select="$LoanPositionGeneral/mismo:MICoveragePercent"/>
|
|
<xsl:if test="string($MICoveragePercent)">
|
|
<ue:LoanMortgageInsurance>
|
|
<LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</LoanUtilityIdentifier>
|
|
<MortgageInsuranceCoveragePercent>
|
|
<xsl:value-of select="$MICoveragePercent"/>
|
|
</MortgageInsuranceCoveragePercent>
|
|
<MortgageInsuranceEffectiveDate>
|
|
<xsl:value-of select="($RequestEffectiveDate,cspfn:getCalendarServiceSystemDate())[1]"/>
|
|
</MortgageInsuranceEffectiveDate>
|
|
<MortgageInsuranceExpirationDate>
|
|
<xsl:text>9999-12-31</xsl:text>
|
|
</MortgageInsuranceExpirationDate>
|
|
</ue:LoanMortgageInsurance>
|
|
</xsl:if>
|
|
<ue:LoanNetAccrualRate>
|
|
<xsl:value-of select="$LoanPositionGeneral/mismo:NetAccrualRate"/>
|
|
</ue:LoanNetAccrualRate>
|
|
</ue:ExternalCollateralLoanPosition>
|
|
<xsl:if test="$LoanPositionInvestorView[not(mismo:LoanLiquidationStatusType = 'DidNotLiquidate')]"><!-- This container is opened if there is at least one LoanPositionInvestorView where the liquidation status type is NOT 'DidNotLiquidate' -->
|
|
<ue:LoanRemoval>
|
|
<ue:LoanUtilityIdentifier>
|
|
<xsl:value-of select="$LoanUtilityIdentifier"/>
|
|
</ue:LoanUtilityIdentifier>
|
|
<ue:TransferIssuerProgram/>
|
|
<ue:LoanRemittanceTypeCode/>
|
|
<ue:LoanRemovalEffectiveDate>
|
|
<xsl:value-of select="($LoanInterestRateEffectiveDate, cspfn:getCalendarServiceSystemDate())[1]"/>
|
|
</ue:LoanRemovalEffectiveDate>
|
|
<xsl:for-each select="$LoanPositionInvestorView[not(mismo:LoanLiquidationStatusType = 'DidNotLiquidate')]">
|
|
<ue:SecurityCUSIPIdentifier>
|
|
<xsl:value-of select="($SecurityCusip,mismo:SecurityCUSIPIdentifier)[1]"/>
|
|
</ue:SecurityCUSIPIdentifier>
|
|
</xsl:for-each>
|
|
<ue:LoanRemovalReasonTypeCode>
|
|
<xsl:choose>
|
|
<xsl:when test="mismo:LoanLiquidationStatusType = 'Repurchased'">
|
|
<xsl:text>3</xsl:text>
|
|
</xsl:when>
|
|
<xsl:otherwise>
|
|
<xsl:text>2</xsl:text>
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</ue:LoanRemovalReasonTypeCode>
|
|
</ue:LoanRemoval>
|
|
</xsl:if>
|
|
</ue:ExternalCollateralLoanPositionPayload>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|