Skip to Content

XSLT Mapping


I have to send an XML message inside a XML tag of a Message Type TestRQ_MT defined as String type.

XML message is going to be embedded in my message Type TestRQ_MT

<TestRQ><POS><Source Currency="USD"/> </POS></TestRQ>

<?xml version="1.0" encoding="UTF-8"?>">

<![CDATA[<TestRQ><POS><Source Currency="USD"/> </POS></TestRQ>]]></ns0:TestRQ_MT>

I want that target message should be free from CDATA

<TestRQ><POS><Source Currency="USD"/> </POS></TestRQ>

Please help me in how to remove CDATA in XSLT mapping

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 07:14 PM


    See if the below helps..

    Source XML


    <p>This is some text.</p>

    <programlisting><![CDATA[This is a paragraph

    with some newlines

    does it work?]]></programlisting>


    xsl StyleSheet"


    <xsl:template match="/">








    <xsl:template match="p">



    <xsl:template match="programlisting">

    <span style="font-family:monospace">

    <xsl:call-template name="br-replace">

    <xsl:with-param name="word" select="."/>




    <xsl:template name="br-replace">

    <xsl:param name="word"/>

    <!-- </xsl:text> on next line on purpose to get newline -->

    <xsl:variable name="cr"><xsl:text>



    <xsl:when test="contains($word,$cr)">

    <xsl:value-of select="substring-before($word,$cr)"/>


    <xsl:call-template name="br-replace">

    <xsl:with-param name="word"





    <xsl:value-of select="$word"/>










    <p>This is some text.</p>

    <span style=

    "font-family:monospace">This is a paragraph<br> with some

    newlines<br> does it work?</span>



    Hope that helps


    Ravi Raman

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.