How to write BreakPoint Condtions
Posted: Thu Jan 16, 2020 5:22 pm
I have XML and XSLT code with below structure. I want to know how to write Breakpoint condition to spit out the record which has multiple national ID (identifier_Type = 'ABC')?
XML Code:
<pi:PayGroup>
<pi:Header>
<pi:Version/>
<pi:Payroll_Company_ID> </pi:Payroll_Company_ID>
<pi:Payroll_Company_Name> </pi:Payroll_Company_Name>
<pi:Pay_Group_ID/>
<pi:Pay_Group_Name/>
</pi:Header>
<pi:Employee>
<pi:Summary>
<pi:Employee_ID/>
<pi:Name> dolor</pi:Name>
<pi:Payroll_Company_ID> </pi:Payroll_Company_ID>
<pi:Payroll_Company_Name> </pi:Payroll_Company_Name>
<pi:Pay_Group_ID/>
<pi:Pay_Group_Name> </pi:Pay_Group_Name>
</pi:Summary>
<pi:Personal>
<pi:First_Name pi:PriorValue=""/>
</pi:Personal>
<pi:Status>
<pi:Payroll_Company pi:PriorValue=""> </pi:Payroll_Company>
<pi:Pay_Group pi:PriorValue=""> </pi:Pay_Group>
</pi:Status>
<pi:Identifier>
<pi:Operation/>
<pi:Identifier_Type pi:PriorValue="">ABC</pi:Identifier_Type>
<pi:Identifier_Value pi:PriorValue="">123-456-7891</pi:Identifier_Value>
</pi:Identifier>
<pi:Identifier>
<pi:Operation/>
<pi:Identifier_Type pi:PriorValue="">ABC</pi:Identifier_Type>
<pi:Identifier_Value pi:PriorValue="">123-456-7891</pi:Identifier_Value>
</pi:Identifier>
</pi:Employee>
</pi:PayGroup>
XSLT Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs" xmlns:xtt="urn:com.workday/xtt"
xmlns:this="urn:this-stylesheet" version="2.0">
<xsl:template match="Payroll_Extract_Employees">
<File xtt:quotes="always" xtt:quoteStyle="double">
<xsl:call-template name="fieldHeaders"/>
<xsl:apply-templates/>
</File>
</xsl:template>
<xsl:template name="fieldHeaders">
<FieldHeaders xtt:separator="," xtt:endTag=" ">
<!-- Header Details -->
</FieldHeaders>
</xsl:template>
<!--Do nothing for the PayGroup Headers -->
<xsl:template match="PayGroup/Header"/>
<!-- Detail Records -->
<xsl:template match="PayGroup/Employee">
<!-- Extract Record details-->
</xsl:template>
</xsl:stylesheet>
XML Code:
<pi:PayGroup>
<pi:Header>
<pi:Version/>
<pi:Payroll_Company_ID> </pi:Payroll_Company_ID>
<pi:Payroll_Company_Name> </pi:Payroll_Company_Name>
<pi:Pay_Group_ID/>
<pi:Pay_Group_Name/>
</pi:Header>
<pi:Employee>
<pi:Summary>
<pi:Employee_ID/>
<pi:Name> dolor</pi:Name>
<pi:Payroll_Company_ID> </pi:Payroll_Company_ID>
<pi:Payroll_Company_Name> </pi:Payroll_Company_Name>
<pi:Pay_Group_ID/>
<pi:Pay_Group_Name> </pi:Pay_Group_Name>
</pi:Summary>
<pi:Personal>
<pi:First_Name pi:PriorValue=""/>
</pi:Personal>
<pi:Status>
<pi:Payroll_Company pi:PriorValue=""> </pi:Payroll_Company>
<pi:Pay_Group pi:PriorValue=""> </pi:Pay_Group>
</pi:Status>
<pi:Identifier>
<pi:Operation/>
<pi:Identifier_Type pi:PriorValue="">ABC</pi:Identifier_Type>
<pi:Identifier_Value pi:PriorValue="">123-456-7891</pi:Identifier_Value>
</pi:Identifier>
<pi:Identifier>
<pi:Operation/>
<pi:Identifier_Type pi:PriorValue="">ABC</pi:Identifier_Type>
<pi:Identifier_Value pi:PriorValue="">123-456-7891</pi:Identifier_Value>
</pi:Identifier>
</pi:Employee>
</pi:PayGroup>
XSLT Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs" xmlns:xtt="urn:com.workday/xtt"
xmlns:this="urn:this-stylesheet" version="2.0">
<xsl:template match="Payroll_Extract_Employees">
<File xtt:quotes="always" xtt:quoteStyle="double">
<xsl:call-template name="fieldHeaders"/>
<xsl:apply-templates/>
</File>
</xsl:template>
<xsl:template name="fieldHeaders">
<FieldHeaders xtt:separator="," xtt:endTag=" ">
<!-- Header Details -->
</FieldHeaders>
</xsl:template>
<!--Do nothing for the PayGroup Headers -->
<xsl:template match="PayGroup/Header"/>
<!-- Detail Records -->
<xsl:template match="PayGroup/Employee">
<!-- Extract Record details-->
</xsl:template>
</xsl:stylesheet>