HCM Extract - Inbound Feed - BI Template

 <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:fo="http://www.w3.org/1999/XSL/Format" 
xmlns:ora="http://www.oracle.com/XSL/Transform/java/" 
xmlns:xdofo="http://xmlns.oracle.com/oxp/fo/extensions" 
xmlns:xdoxslt="http://www.oracle.com/XSL/Transform/java/oracle.xdo.template.rtf.XSLTFunctions" 
xmlns:xdoxliff="urn:oasis:names:tc:xliff:document:1.1" 
xmlns:xlink="http://www.w3.org/1999/xlink">
<!--
<xsl:param name="FromDate" select="/DATA_DS/FROMDATE" />
<xsl:param name="ThruDate" select="/DATA_DS/TODATE" />
<xsl:param name="ToDate" select="concat(substring($ThruDate,1,4),substring($ThruDate,6,2),substring($ThruDate,9,2))" />
-->
<xsl:output method="text" indent="yes" encoding="ISO-8859-1" />
<xsl:param name="_XDOCTX">#</xsl:param>


<xsl:template match="/">

<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'MultipleEntryCount', xdoxslt:format_date(xdoxslt:current_date('',''),'yyyyMMdd','',''))" />
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'PayBeginDt', xdoxslt:format_date('2021-05-30T00:00:00.000+00:00','yyyy/MM/dd','',''))" />
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'PayEndDt', xdoxslt:format_date('2021-06-12T00:00:00.000+00:00','yyyy/MM/dd','',''))" />



<xsl:text>METADATA|ElementEntry|ElementEntryId|EffectiveStartDate|EffectiveEndDate|MultipleEntryCount|AssignmentNumber|CreatorType|ElementName|LegislativeDataGroupName|EntryType|ReplaceLastEffectiveEndDate</xsl:text>
<xsl:text>&#xD;&#xA;</xsl:text>


<xsl:for-each select="DATA_DS/G_1/G_2/FILE_FRAGMENT/ABC_Create_Severance_Pay/WrkDG/BenTR/BenDG/BenRec">
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'AsgNum', ../../../WrkRec/AsgDG/AsgRec/AsgNum)" />
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'Print', 'Y')" />

<xsl:variable name="ElementName">
<xsl:choose>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'PRETAX'">
<xsl:text>Medical Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'AFTERTAX'">
<xsl:text>Medical Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'NOTAPPLICABLE'">
<xsl:text>Medical Plan ER Catch Up</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'PRETAX'">
<xsl:text>Dental Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'AFTERTAX'">
<xsl:text>Dental Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'NOTAPPLICABLE'">
<xsl:text>Dental Plan ER Catch Up</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Vision' and PlanName != 'Waive Vision' and TaxType = 'PRETAX'">
<xsl:text>Vision Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Vision' and PlanName != 'Waive Vision' and TaxType = 'AFTERTAX'">
<xsl:text>Vision Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Healthcare FSA' and PlanName != 'Waive Healthcare FSA' and TaxType = 'PRETAX'">
<xsl:text>Healthcare FSA Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Spousal Surcharge' and PlanName != 'Waive Working Surcharge' and TaxType = 'PRETAX'">
<xsl:text>Working Spouse Premium Catch Up</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'Print', 'N')" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:if test="xdoxslt:get_variable($_XDOCTX, 'Print') = 'Y'">
<xsl:text>MERGE|ElementEntry||</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'PayBeginDt')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'PayEndDt')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'MultipleEntryCount')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'AsgNum')" />
<xsl:text>|F|</xsl:text>
<xsl:value-of select="$ElementName" />
<xsl:text>|US Legislative Data Group|E|Y</xsl:text>
<xsl:text>&#xD;&#xA;</xsl:text>
</xsl:if>

</xsl:for-each>



<xsl:text>METADATA|ElementEntryValue|ElementEntryValueId|ElementEntryId|EffectiveStartDate|EffectiveEndDate|MultipleEntryCount|InputValueName|ScreenEntryValue|AssignmentNumber|ElementName|LegislativeDataGroupName|LegislationCode|EntryType|ReplaceLastEffectiveEndDate</xsl:text>
<xsl:text>&#xD;&#xA;</xsl:text>

<xsl:for-each select="DATA_DS/G_1/G_2/FILE_FRAGMENT/ABC_Create_Severance_Pay/WrkDG/BenTR/BenDG/BenRec">

<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'AsgNum', ../../../WrkRec/AsgDG/AsgRec/AsgNum)" />
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'Print', 'Y')" />

<xsl:variable name="ElementName">
<xsl:choose>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'PRETAX'">
<xsl:text>Medical Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'AFTERTAX'">
<xsl:text>Medical Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Medical' and PlanName != 'Waive Medical' and TaxType = 'NOTAPPLICABLE'">
<xsl:text>Medical Plan ER Catch Up</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'PRETAX'">
<xsl:text>Dental Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'AFTERTAX'">
<xsl:text>Dental Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Dental' and PlanName != 'Waive Dental' and TaxType = 'NOTAPPLICABLE'">
<xsl:text>Dental Plan ER Catch Up</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Vision' and PlanName != 'Waive Vision' and TaxType = 'PRETAX'">
<xsl:text>Vision Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Vision' and PlanName != 'Waive Vision' and TaxType = 'AFTERTAX'">
<xsl:text>Vision Catchup After Tax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Healthcare FSA' and PlanName != 'Waive Healthcare FSA' and TaxType = 'PRETAX'">
<xsl:text>Healthcare FSA Catchup Pretax</xsl:text>
</xsl:when>
<xsl:when test="PlanType='Spousal Surcharge' and PlanName != 'Waive Working Surcharge' and TaxType = 'PRETAX'">
<xsl:text>Working Spouse Premium Catch Up</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="xdoxslt:set_variable($_XDOCTX, 'Print', 'N')" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:if test="xdoxslt:get_variable($_XDOCTX, 'Print') = 'Y'">
<xsl:text>MERGE|ElementEntryValue|||</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'PayBeginDt')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'PayEndDt')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'MultipleEntryCount')" />
<xsl:text>|Amount|</xsl:text>
<xsl:value-of select="Rate" />
<xsl:text>|</xsl:text>
<xsl:value-of select="xdoxslt:get_variable($_XDOCTX, 'AsgNum')" />
<xsl:text>|</xsl:text>
<xsl:value-of select="$ElementName" />
<xsl:text>|US Legislative Data Group|US|E|Y</xsl:text>
<xsl:text>&#xD;&#xA;</xsl:text>
</xsl:if>

</xsl:for-each>


</xsl:template>
</xsl:stylesheet>

No comments:

Post a Comment

Oracle HCM Cloud technical tips to grow your skills

Few information around Oracle HCM Cloud.