View Single Post
  #3  
Old 27th June 2017, 05:47
vik.patil vik.patil is offline
Member
 
Join Date: Apr 2008
Posts: 54
vik.patil is on a distinguished road
Baan: ERP LN - DB: MS-SQL - OS: MS-WINDOWS
Thanks Bhushan.

I got information on how to add field using XSLT. Now when I have added code to add new fields which is working fine if source xml doesn't have namespace xmlns="http://schema.infor.com/InforOAGIS/2" in source XML File.
Following is code I am using as XSLT:

xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xslutput method="xml" indent="yes"/>

<xsl:template match="@* | node()" name="identity-copy">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="DataArea/Process">
<xsl:copy>
<xsl:apply-templates select="@* | *"/>
<AccountingEntityID>201</AccountingEntityID>
<LocationID>S_201</LocationID>

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

This code works if Source XML doesn't have xmlns="http://schema.infor.com/InforOAGIS/2" and with this namespace we are not able to add new columns in xml file to pass it to LN.

Please let me know anything missing in XSLT Code

Regards,

Vikram
Reply With Quote