0
votes

I am using bpel composite, in the composite I use mediator component and in that I use xsl to transform incoming payload data to outbound payload. I have a requirement where I need to append to one of the xml element in the outbound schema. I tried using in .xsl file the follwing code:

<ns1:request>
        <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
        <xsl:value-of disable-output-escaping="yes" select="/imp1:error-event-payload/imp1:error-payload"/>
        <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
      </ns1:request>

but this is not generating output as <request><![CDATA somedata ]]> </request> . Is there any way where i can transform the xml elment with CDATA section.

1

1 Answers

1
votes

Well CDATA sections are a serialization option you can specify with

<xsl:output cdata-section-elements="ns1:request"/>

That will only work if your XSLT processor or tool chain serializes the result tree to a file, not if a result tree (e.g. DOM tree or XPath/XSLT tree implementation) is passed on.