cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping - help

Former Member
0 Kudos

Hi All,

I am new to XSLT mapping.

My requirement is: file to XML file with CDATA, for this I am planning to use the XSLT Mapping.

I downloaded the Stylus studio, then what next, Please help meu2026

In source flat file I have 5 fileds, and target I need to generate the XML file with CDATA set for 5 fields.

Thanks,

ANU-

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member1275317
Participant
0 Kudos

Hi Anu,

Is your requirement is sending 5 fields into one string on target side ,If yes

this code might help you for CDATA section

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

<xsl:template match="/">

<MT_TARGET>

<String>

<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[?xml version=\"1.0\"

encoding=\"ISO-8859-1\"?>]]]]></xsl:text>

<xsl:copy-of select="*"/>

<xsl:text disable-output-escaping="yes"><!CDATA[]]]></xsl:text>

<xsl:text disable-output-escaping="yes"><![CDATA>]></xsl:text>

</String>

</MT_TARGET>

</xsl:template>

</xsl:Stylesheet>

//if you use " * " then entire source structure will go into target StringUsers node

Regards,

Sandeep

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

You have to learn XSLT Programming,its very easy to write, go for w3schools.com,u wl find some code snnipets and learn some XSLT functions.

XSLT Mapping will genarate output in 3 formats one is XML ,HTML and TEXT,you need to genarate XML format so select output method as XML.

Regards,

Raj

JaganMohan
Participant
0 Kudos

Dear Anu,

The following blog will help you on this requirement.

/people/michal.krawczyk2/blog/2005/11/01/xi-xml-node-into-a-string-with-graphical-mapping

Regards,

JP.

abhijitbolakhe
Advisor
Advisor
0 Kudos