on 09-18-2006 7:36 AM
Hi All,
I am trying to understand XSLT mapping. My source msg is
<?xml version="1.0" encoding="UTF-8"?>
<ns5:MT_JAI_SND xmlns:ns5="urn:jai:test">
<Root>
<Emp_Id>1000</Emp_Id>
<First_Name>Jai Shankar</First_Name>
<Last_Name>Ramakrishnan</Last_Name>
<Department>Net Weaver</Department>
</Root>
</ns5:MT_JAI_SND>
and I expect the output msg as
<?xml version="1.0" encoding="UTF-8"?>
<ns5:MT_JAI_REC xmlns:ns5="urn:jai:test">
<Root>
<Emp_Id>1000</Emp_Id>
<Emp_Name>JaiShankar-Ramakrishnan</Emp_Name>
<Department>Net Weaver</Department>
</Root>
</ns5:MT_JAI_SND>
How do I create the XSLT mapping for this? I know this can be done in graphical mapping. This is for my understanding of XSLT mapping. Do we require any tools or editor for the same?
Thanks & Regards,
Jai Shankar.
Hi ,
<i>How do I create the XSLT mapping for this</i>
The XSLT mapping program can be created using any of the XML editors.Check this weblog...
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Its pretty simple and here is the code
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns5:MT_JAI_REC xmlns:ns5="urn:jai:test">
<Root>
<Emp_Id><xsl:value-of select="ns5:MT_JAI_SND/Emp_Id"/></Emp_Id>
<Emp_Name><xsl:value-of select="ns5:MT_JAI_SND/First_Name"/>-<xsl:value-of select="ns5:MT_JAI_SND/Last_Name"/></Emp_Name>
<Department><xsl:value-of select="ns5:MT_JAI_SND/Department"/></Department>
</Root>
</ns5:MT_JAI_SND>
</xsl:template>
</xsl:stylesheet>
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use the concat funtion in XSLT to acheive the same.
Eg.
<xsl:variable name="Emp_Name"
select="<b>concat</b>($Fname,'-',$Lname"/>
Message was edited by: Shabarish Vijayakumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Check this blog....he explained all types of mappings with the simple example.
/people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
Sekhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.