|
<?xml version="1.0" encoding="utf-16"?>
|
|
<xsl:stylesheet xmlns:xalan="http://xml.apache.org/xalan" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" version="1.0">
|
|
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
|
|
<xsl:template match="Data">
|
|
<xsl:element name="Data">
|
|
<xsl:call-template name="ApplicationData" />
|
|
<xsl:call-template name="ApplicantsData" />
|
|
</xsl:element>
|
|
</xsl:template>
|
|
<xsl:template name="ApplicationData">
|
|
<xsl:element name="ApplicationData">
|
|
<xsl:copy-of select="ApplicationData/@*" />
|
|
<xsl:if test="/Data/DocumentInput/RequestedProduct/@BranchCode!=''">
|
|
<xsl:attribute name="BranchCode">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@BranchCode" />
|
|
</xsl:attribute>
|
|
</xsl:if>
|
|
<xsl:attribute name="Source">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@Source" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Channel">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@Channel" />
|
|
</xsl:attribute>
|
|
<xsl:if test="/Data/DocumentCodebook/CB_policy_code_lv2/Item/@Value='IAC'">
|
|
<xsl:attribute name="Program">
|
|
<xsl:value-of select="/Data/DocumentCodebook/CB_policy_code_lv2/Item[@Value='IAC']/@Value" />
|
|
</xsl:attribute>
|
|
</xsl:if>
|
|
<xsl:attribute name="WebpageStatus">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@WebpageStatus" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="T24_StatusCode_Flag">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@T24_StatusCode_Flag" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="CurrentUserOfApp">
|
|
<xsl:value-of select="/Data/DocumentContext/Identity/UserID" />
|
|
</xsl:attribute>
|
|
<xsl:copy-of select="ApplicationData/*[(name(.)!='StrategyOneResult') and (name(.)!='RequestedProduct')]" />
|
|
<xsl:element name="RequestedProduct">
|
|
<xsl:copy-of select="ApplicationData/RequestedProduct/@*" />
|
|
<xsl:if test="/Data/DocumentInput/RequestedProduct/@ProductType='CREDIT_CARD'">
|
|
<xsl:attribute name="ProductType">
|
|
<xsl:value-of select="'CC'" />
|
|
</xsl:attribute>
|
|
</xsl:if>
|
|
<!-- Start - MVP1B new fields added -->
|
|
<xsl:attribute name="CorrelationId">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@CorrelationId" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="IdentityType">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@IdentityType" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Identity">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@Identity" />
|
|
</xsl:attribute>
|
|
<!-- End - MVP1B new fields added -->
|
|
</xsl:element>
|
|
<xsl:element name="StrategyOneResult">
|
|
<xsl:copy-of select="ApplicationData/StrategyOneResult/@*" />
|
|
<xsl:attribute name="ApprovalResult">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@Strategy_result" />
|
|
</xsl:attribute>
|
|
<xsl:copy-of select="ApplicationData/StrategyOneResult/*" />
|
|
</xsl:element>
|
|
</xsl:element>
|
|
</xsl:template>
|
|
<xsl:template name="ApplicantsData">
|
|
<xsl:element name="ApplicantsData">
|
|
<xsl:copy-of select="ApplicantsData/@*" />
|
|
<xsl:for-each select="/Data/ApplicantsData/SubjectInfo">
|
|
<xsl:element name="SubjectInfo">
|
|
<xsl:copy-of select="./@*" />
|
|
<xsl:attribute name="CustomerDispositionFlag">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@CustomerDispositionFlag" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="CustomerPriority">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@CustomerPriority" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="ETB_NTB_Flag">
|
|
<xsl:value-of select="/Data/DocumentInput/RequestedProduct/@ETB_NTB_Flag" />
|
|
</xsl:attribute>
|
|
<xsl:choose>
|
|
<!-- MVP1B CC Start -->
|
|
<xsl:when test="count(/Data/DocumentInput/SubjectInfo)>0">
|
|
<xsl:copy-of select="./*[local-name()!='PersonalInfo' and local-name()!='ContactInfo' and local-name()!='DocumentInfo']" />
|
|
<xsl:element name="PersonalInfo">
|
|
<xsl:attribute name="FullName">
|
|
<xsl:value-of select="/Data/DocumentInput/SubjectInfo/PersonalInfo/@FullName" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="BirthDate">
|
|
<xsl:value-of select="/Data/DocumentInput/SubjectInfo/PersonalInfo/@BirthDate" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Nationality">
|
|
<xsl:value-of select="/Data/DocumentInput/SubjectInfo/PersonalInfo/@Nationality" />
|
|
</xsl:attribute>
|
|
<xsl:copy-of select="@*[not(name(.)='FullName' and name(.)='BirthDate' and name(.)='Nationality')]" />
|
|
</xsl:element>
|
|
<xsl:element name="DocumentInfo">
|
|
<xsl:variable name="ApplicantsDocumentInfoNode" select="./IDDocument" />
|
|
<xsl:copy-of select="./DocumentInfo/*[local-name()!='IDDocument']" />
|
|
<xsl:for-each select="/Data/DocumentInput/SubjectInfo/DocumentInfo/IDDocument">
|
|
<xsl:element name="IDDocument">
|
|
<xsl:attribute name="Type">
|
|
<xsl:value-of select="@Type" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Number">
|
|
<xsl:value-of select="@Number" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Primary">
|
|
<xsl:value-of select="@Primary" />
|
|
</xsl:attribute>
|
|
<xsl:copy-of select="@*[not(name(.)='Type' and name(.)='Number' and name(.)='Primary')]" />
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
<xsl:element name="ContactInfo">
|
|
<xsl:copy-of select="./ContactInfo/*[local-name()!='Contacts']" />
|
|
<xsl:for-each select="/Data/DocumentInput/SubjectInfo/ContactInfo/Contacts">
|
|
<xsl:element name="Contacts">
|
|
<xsl:attribute name="Type">
|
|
<xsl:value-of select="@Type" />
|
|
</xsl:attribute>
|
|
<xsl:attribute name="Value">
|
|
<xsl:value-of select="@Value" />
|
|
</xsl:attribute>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:when>
|
|
<!-- MVP1B CC End -->
|
|
<xsl:otherwise>
|
|
<xsl:copy-of select="./*" />
|
|
</xsl:otherwise>
|
|
</xsl:choose>
|
|
</xsl:element>
|
|
</xsl:for-each>
|
|
</xsl:element>
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|