I am trying to have ION transform an XML Sync.Person BOD and create a flat file from it. I have got that process working but what I am integrating to requires headers on my delimited file.
I was able to get the XSLT create a record with the headers, and the other piece with the data but when ION takes this and makes it a flat file, then it only generates the header. Has anyone else had this issue?
Here is what my XSLT looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Mapping: HALO_Map_Person_CoreTeam
Description: Map Person BOD to Core Team Flat file
Version: 3
Created by: Patricia Reeves
Created on: 2020-12-31 15:31:11 CST
Last updated by:
Last updated on:
Input: Sync.Person
Output: Sync.HALO_CoreTeam_Flat
Product Version: Infor ION 2020-06
XSLT Code Generator: V2
Copyright © 2020 Infor. All rights reserved.
The word and design marks set forth herein are trademarks and/or registered trademarks of Infor and/or its affiliates and subsidiaries.
All rights reserved. All other trademarks listed herein are the property of their respective owners.
www.infor.com
-->
<xsl:stylesheet version="2.0" xmlns="">schema.infor.com/.../2" xmlns:expath-zip="">http://expath.org/ns/zip" xmlns:fn="">www.w3.org/.../xpath-functions" xmlns:dns="">schema.infor.com/.../2" xmlns:saxon="">http://saxon.sf.net/" xmlns:udf1="">http://infor.com/custom" xmlns:expath-file="">http://expath.org/ns/file" xmlns:xsi="">www.w3.org/.../XMLSchema-instance" xmlns:xsl="">www.w3.org/.../Transform" xmlns:exslt-random="">http://exslt.org/random" xmlns:exslt-common="">http://exslt.org/common" xmlns:exslt-math="">http://exslt.org/math" xmlns:xs="">www.w3.org/.../XMLSchema" xmlns:math="">www.w3.org/.../math" xmlns:map="">www.w3.org/.../map" xmlns:infor="">http://infor.com/infor-custom" exclude-result-prefixes="xs xsl fn expath-file expath-zip exslt-common exslt-math exslt-random map math saxon xsi ">
<xsl:output method="xml" encoding="UTF-8" indent="no" byte-order-mark="no"/>
<xsl:strip-space elements="*"/>
<xsl:function name="udf1:get-first-value">
<xsl:param name="input-list"/>
<xsl:value-of select="$input-list[1]"/>
</xsl:function>
<xsl:template match="/">
<xsl:if test="/*:SyncPerson">
<xsl:element name="SyncHALO_CoreTeam_Flat">
<xsl:namespace name="xs" select="'">www.w3.org/.../>
<xsl:if test="/*:SyncPerson/@languageCode">
<xsl:attribute name="languageCode">
<xsl:value-of select="/*:SyncPerson/@languageCode"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="/*:SyncPerson/@releaseID">
<xsl:attribute name="releaseID">
<xsl:value-of select="/*:SyncPerson/@releaseID"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="/*:SyncPerson/@systemEnvironmentCode">
<xsl:attribute name="systemEnvironmentCode">
<xsl:value-of select="/*:SyncPerson/@systemEnvironmentCode"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="/*:SyncPerson/@versionID">
<xsl:attribute name="versionID">
<xsl:value-of select="/*:SyncPerson/@versionID"/>
</xsl:attribute>
</xsl:if>
<xsl:copy-of select="/*:SyncPerson/*:ApplicationArea" copy-namespaces="no" />
<xsl:if test="/*:SyncPerson/*:DataArea">
<xsl:element name="DataArea">
<xsl:copy-of select="/*:SyncPerson/*:DataArea/*:Sync" copy-namespaces="no" />
<xsl:element name="HALO_CoreTeam_Flat">
<xsl:element name="TeamCode">
<xsl:text>Team Code</xsl:text>
</xsl:element>
<xsl:element name="TeamName">
<xsl:text>Team Name</xsl:text>
</xsl:element>
<xsl:element name="CommissionTable">
<xsl:text>Commission Table</xsl:text>
</xsl:element>
<xsl:element name="BusinessUnit">
<xsl:text>Business Area</xsl:text>
</xsl:element>
<xsl:if test="/*:SyncPerson/*:DataArea/*:Person/*:Status/*:Code">
<xsl:element name="Status">
<xsl:text>Status</xsl:text>
</xsl:element>
</xsl:if>
<xsl:element name="PrimaryAE">
<xsl:text>Primary AE Number</xsl:text>
</xsl:element>
<xsl:element name="DefaultMarketing">
<xsl:text>Exclude Marketing Fund</xsl:text>
</xsl:element>
<xsl:element name="StartDate">
<xsl:text>Start Date</xsl:text>
</xsl:element>
<xsl:element name="EndDate">
<xsl:text>End Date</xsl:text>
</xsl:element>
<xsl:if test="/*:SyncPerson/*:ApplicationArea/*:CreationDateTime">
<xsl:element name="ChangeDate">
<xsl:text>Change Date</xsl:text>
</xsl:element>
</xsl:if>
</xsl:element>
<xsl:element name="HALO_CoreTeam_Flat">
<xsl:element name="TeamCode">
<xsl:variable name="data000">
<xsl:value-of select="udf1:get-first-value(/*:SyncPerson/*:DataArea/*:Person/*:ID)"/>
</xsl:variable>
<xsl:value-of select="fn:string($data000)"/>
</xsl:element>
<xsl:element name="TeamName">
<xsl:variable name="data000">
<xsl:value-of select="udf1:get-first-value(/*:SyncPerson/*:DataArea/*:Person/*:Name)"/>
</xsl:variable>
<xsl:value-of select="fn:string($data000)"/>
</xsl:element>
<xsl:element name="CommissionTable">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='commTable']"/>
</xsl:element>
<xsl:element name="BusinessUnit">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='businessArea']"/>
</xsl:element>
<xsl:if test="/*:SyncPerson/*:DataArea/*:Person/*:Status/*:Code">
<xsl:element name="Status">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:Status/*:Code/text()"/>
</xsl:element>
</xsl:if>
<xsl:element name="PrimaryAE">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='teamPrimarySlsPsnCode']"/>
</xsl:element>
<xsl:element name="DefaultMarketing">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='excludeMarketingFund']"/>
</xsl:element>
<xsl:element name="StartDate">
<xsl:value-of select="fn:replace(/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='startDate'], '(d{4})(d{2})(d{2})', '$2-$3-$1')" />
</xsl:element>
<xsl:element name="EndDate">
<xsl:value-of select="/*:SyncPerson/*:DataArea/*:Person/*:UserArea/*:Property/*:NameValue[@name='endDate']"/>
</xsl:element>
<xsl:if test="/*:SyncPerson/*:ApplicationArea/*:CreationDateTime">
<xsl:element name="ChangeDate">
<xsl:value-of select="format-dateTime(fn:current-dateTime(),'[M01]/[D01]/[Y0001] [h1]:[m01]:[s01] [P]')" />
</xsl:element>
</xsl:if>
</xsl:element>
<xsl:value-of select="/*:SyncPerson/*:DataArea/text()"/>
</xsl:element>
</xsl:if>
<xsl:value-of select="/*:SyncPerson/text()"/>
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:function name="infor:equals">
<xsl:param name="Parameter1"/>
<xsl:param name="Parameter2"/>
<xsl:sequence select="$Parameter1 = $Parameter2"/>
</xsl:function>
</xsl:stylesheet>
This is the result when I run the test in the mapper:
<?xml version="1.0" encoding="UTF-8"?>
<SyncHALO_CoreTeam_Flat xmlns="">schema.infor.com/.../2" xmlns:xs="">www.w3.org/.../XMLSchema" languageCode="GB" releaseID="9.2" systemEnvironmentCode="Production" versionID="2.12.0">
<ApplicationArea>
<Sender>
<LogicalID schemeVersionID="0.0.0">lid://infor.m3.m3be</LogicalID>
<ComponentID schemeVersionID="MCP10-1514-01">M3BE</ComponentID>
<ConfirmationCode>OnError</ConfirmationCode>
</Sender>
<CreationDateTime>2020-12-31T20:39:08.269Z</CreationDateTime>
<BODID>93699f50-8851-472d-a7d4-7dcbf69b1d0c</BODID>
</ApplicationArea>
<DataArea>
<Sync>
<AccountingEntityID>210_</AccountingEntityID>
<ActionCriteria>
<ActionExpression actionCode="Replace"/>
</ActionCriteria>
</Sync>
<HALO_CoreTeam_Flat>
<TeamCode>Team Code</TeamCode>
<TeamName>Team Name</TeamName>
<CommissionTable>Commission Table</CommissionTable>
<BusinessUnit>Business Area</BusinessUnit>
<Status>Status</Status>
<PrimaryAE>Primary AE Number</PrimaryAE>
<DefaultMarketing>Exclude Marketing Fund</DefaultMarketing>
<StartDate>Start Date</StartDate>
<EndDate>End Date</EndDate>
<ChangeDate>Change Date</ChangeDate>
</HALO_CoreTeam_Flat>
<HALO_CoreTeam_Flat>
<TeamCode>1019</TeamCode>
<TeamName>PRIBBLE, JIM</TeamName>
<CommissionTable>STAND</CommissionTable>
<BusinessUnit>PRO</BusinessUnit>
<Status>Open</Status>
<PrimaryAE>1019</PrimaryAE>
<DefaultMarketing>N</DefaultMarketing>
<StartDate>05-21-1986</StartDate>
<EndDate/>
<ChangeDate>01/05/2021 9:03:46 p.m.</ChangeDate>
</HALO_CoreTeam_Flat>
</DataArea>
</SyncHALO_CoreTeam_Flat>