cancel
Showing results for 
Search instead for 
Did you mean: 

xslt mapping

Former Member
0 Kudos

hi all,

i am completely new to XSLT mapping, so had posted a query

fname, lname to name

how can i do it

so i was suggested the code below , that is fine.

but my prob is i dont know where to write this code , so any one can plz explain me in more detailed manner.

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:n1="urn:xitest:Scenario" xmlns="urn:xitest:Scenario" xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="fn n1 xs">

<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

<xsl:template match="/n1:MT_In">

<MT_Out>

<xsl:attribute name="xsi:schemaLocation">urn:xitest:Scenario C:/MT_Out.xsd</xsl:attribute>

<Record xmlns="">

<xsl:for-each select="Record">

<xsl:variable name="VmarkerloopRecord" select="."/>

<xsl:for-each select="Fname">

<xsl:variable name="VmarkerloopFname" select="."/>

<xsl:for-each select="$VmarkerloopRecord/Lname">

<xsl:variable name="VmarkerloopLname" select="."/>

<xsl:variable name="Vvar7_RESULTOF_concat" select="fn:concat(fn:string( $VmarkerloopFname ), fn:string( $VmarkerloopLname ))"/>

<Name>

<xsl:value-of select="fn:string( $Vvar7_RESULTOF_concat )"/>

</Name>

</xsl:for-each>

</xsl:for-each>

</xsl:for-each>

</Record>

</MT_Out>

</xsl:template>

</xsl:stylesheet>

By the way , use Altova Map force, the above code is generated using that.

Accepted Solutions (1)

Accepted Solutions (1)

udo_martens
Active Contributor
0 Kudos

Hi super checker,

u r posting that simple question for the !

I posted u the answer allready, why do u ask if u dont read the answer?

U can write the source code to a textfile (*.xsl), zip it and load it up to an archive at IB repository.

No Regards,

Udo

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Hey,

As suggested by UDO. You need to zip the .xsl file and import them into XI as Imported archive. There is no Message mapping for this scenario. Go to Interface mapping choose ur source and target while choosing mapping program choose XSL from the drop down list and choose the imported archive . Run the scenario.

-raj.